Two hours ago, Eli Barzilay wrote:
> I have recently started to use magit and found a bunch of little
> things to fix, and will do a pull request soon. But one thing is
> not just a fix: I find myself following the Emacs habit of hitting
> `q' when I want to quick the popup that magit-key-mode generates.
> It looks like there is no use for it ATM. Does anyone mind adding
> that as a default? (=> making it do the same thing that `C-g' does
> now.)
I've sent that request, including the above.
But here's the thing that made me start looking at the sources. It's
really nice to have an interface that makes it convenient to use git
options that I would have never remembered without digging through man
pages. (And that means that I usually just don't use them.) But
magit itself has a whole bunch of keys that are hard to remember.
It's true that the menu bar should help in learning them, but it's
nice to have it without it too. There's also `tmm-menubar', but
that's not useful to learn the keys either.
So here's what I tried: I took all of the status mode bidings out and
made a new `status' entry in `magit-key-mode-groups' with them.
Instead of the code that made the original bindings, I bind `h' to the
new popup, and then I dig them out of `magit-key-mode-groups' and bind
them too. The result of all of this is that the bindings are
available as usual, and `h' brings up a convenient popup with them
all.
[There are two minor issues: looks like a popup can't invoke another,
and it's really awkward to have all the bindings defined in the
key-mode file instead of next to the relevant code. Both are probably
easy to fix.]
As a minor data point -- after I got this working, it took about 5
seconds for me to discover a useful new feature (changing the diff
hunk sizes).
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://barzilay.org/ Maze is Life!