emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Key bindings proposal


From: Uday S Reddy
Subject: Re: Key bindings proposal
Date: Tue, 27 Jul 2010 18:52:31 +0100

Stephen J. Turnbull writes:

> I don't see how this use of remap helps Uday or the
> CUA-should-be-default crowd, since much of the time no such
> relationship applies.  

This is not a solution to the broad problem I posed.  I shouldn't
pretend that it is.  But it helps partially in the following sense.

The irritation for the user is that it is not enough to just rebind
keys at the global level, but he/she must go and rebind them for every
mode.  The latter is hard, and one needs to be reasonably expert at
the innards of Emacs to do it correctly.  The remap idea helps in that
the modes can piggy back on the global bindings at least to some
extent.  

But the applicability is limited.  I was just looking at dired-mode,
which seems to have some 100 odd key-bindings, but only 2 remap's.
Not much of a win.  To catch the majority of the other generic
bindings, something like the "action" idea seems necessary.

> (define-key vm-summary-map [remap next-line] #'vm-summary-next)
> 
> does make sense to me, but guess what?  #'next-line is a useful
> command in VM Summary mode, even if much less useful than it is in
> most modes.  So I'd be very bummed if Uday used [remap] instead of an
> explicit keystroke binding there.

You are right.  But, if there were action-based bindings, I could do:

(define-key vm-summary-map [action quick-next-line] #'vm-summary-next)

and the quick-next-line action might be bound to the key `n' (or `C-n'
or `M-n' or whatever else the user might wish).  Gnus, Dired,
buff-menu and a host of other modes that need "quick" actions could
all share their key bindings without having to do anything.

Cheers,
Uday



reply via email to

[Prev in Thread] Current Thread [Next in Thread]