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. Someone should make a feature request. In the meantime, this code would do what you want: (setf (second (assoc "l" (assoc-default 'actions (assoc-default 'logging magit-key-mode-groups)))) "Long") (setf (third (assoc "l" (assoc-default 'actions (assoc-default 'logging magit-key-mode-groups)))) 'magit-log-long) (setf (second (assoc "L" (assoc-default 'actions (assoc-default 'logging magit-key-mode-groups)))) "Short") (setf (third (assoc "L" (assoc-default 'actions (assoc-default 'logging magit-key-mode-groups)))) 'magit-log) (setq magit-key-mode-key-maps nil) -PJ
