Yesterday, PJ Weisberg wrote:
> On Tue, Jan 24, 2012 at 12:47 PM, York Zhao <[email protected]> wrote:
> > Hi there,
> >
> > I use "long log" much more than "short log", thus, I would like to
> > switch key binding for them. I want "l" for long log and "L" for
> > short log, is there a simple way to achieve this without having to
> > redefine the entire variable `magit-key-mode-groups'?
>
> Simple? Not really. [...]
A related inconvenience that I have is that I always rebase when I
pull, so I need to use `F-rF' instead of the much quicker `FF'.
(There's probably a way to do that, but so far I was too lazy to look
for it.)
So here's a sketch of a semi-ambitious way to solve this:
* Get rid of most of the log "actions" that are really translated to
different arguments, and turn them into arguments. Looking at the
log action keys, they're all going away, and get replaced by flags
for long/short, start/end, and a reflog toggle.
* Add functionality to remember the configuration that was used in
each of the key windows, so when you hit `l' you get the same
switches and args you had last time.
* Extend this to a list of such configurations, and add keys to
navigate them. For example, after you hit `l' you get the last
configuration, and you can now use `<' to go back to the
configuration before that, `>' goes forward. Also, in analogy to
the usual Emacs prompts, hitting `>' when you're at the last
configuration sets the "default" one which is actually no switches
or args.
With this, you get `ll' to quickly do the same as your last log view,
and `l>' is the equivalent of what you currently get with `l'.
(An even more ambitious extension could save this history in the
repository, possibly also in some .emacs.d file for defaults.)
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://barzilay.org/ Maze is Life!