emacs-devel
[Top][All Lists]
Advanced

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

Re: Emacs learning curve


From: Teemu Likonen
Subject: Re: Emacs learning curve
Date: Sat, 17 Jul 2010 18:56:27 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2.50 (gnu/linux)

* 2010-07-17 15:28 (+0100), Uday S. Reddy wrote:

> On 7/17/2010 7:02 AM, Teemu Likonen wrote:
>> Anyway, I'm not trying to change anybody's mind about the default key
>> bindings. I have just been hoping that user could practically design
>> her own global bindings but even that's not quite possible because
>> the f-b-n-p mnemonics and other default keys are so deeply hard-coded
>> everywhere. There's not enough abstraction on that front.
>
> I think you are right. I was thinking the same thing this morning.
>
> In a supposedly configurable editor, it is pretty hard to change key
> bindings. This seems like a deep flaw in the architecture of Emacs.
> Perhaps this is what the emacs developers should focus on: make the
> key bindings configurable. Then there would be no need to go through
> debates like this any more.

And to not sound too much like "Emacs developers should do this" I can
do some of the work myself.

In my opinion the cleanest way to create and experiment with different
global key bindings is to create global minor modes. Such modes are
clearly separate units from other parts of emacs and can be published in
places like the Emacs wiki. Currently the global minor mode approach
doesn't work very well because

  - modes use function substitute-key-definition which refer to the
    global-map directly. Key bindings in global minor modes won't be
    substituted.

  - modes overwrite global keys by hard-coding keys to commands.

If those both are changed to _command_ remapping, such as

    (define-key MAP [remap next-line] 'modes-custom-next-line)

then the minor mode approach would work and we would be quite far
already.

But do we agree that using substitute-key-definition with reference to
global-map is bad and should be replaced with command remapping (see
above)?



reply via email to

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