all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Uday S Reddy <u.s.reddy@cs.bham.ac.uk>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: Uday S Reddy <u.s.reddy@cs.bham.ac.uk>,
	"Stephen J. Turnbull" <stephen@xemacs.org>,
	Teemu Likonen <tlikonen@iki.fi>,
	emacs-devel@gnu.org
Subject: Re: Key bindings proposal
Date: Thu, 29 Jul 2010 16:28:24 +0100	[thread overview]
Message-ID: <19537.40472.267000.563053@gargle.gargle.HOWL> (raw)
In-Reply-To: <jwvsk35kzg8.fsf-monnier+emacs@gnu.org>

Stefan Monnier writes:

> The main problem is not whether the method is declarative or not, but
> rather the problem is to make intentions clear.

The reason for asking for declarative methods is that they are easier
for users and/or third-party customizers to deal with.  The
whac-a-mole effect is hard enough for them to address.  Side-effects
would introduce unseen interactions which would make it even harder to
figure out what is going on.

The way X windows deals with X resources is a perfectly fine way to
provide customization information.  I don't see why we can't duplicate
that in Emacs.

> The issue with "intentions" is typically along the lines of "do you want
> to bind `foo' to C-x C-x or do you want to bind it to the C-x key within
> the main prefix keymap, or do you want to bind it to the repetition of
> the key-sequence to which this main keymap is bound, or maybe only to
> the repetition of just the last key in this key-sequence, or maybe to
> the repetition of C-"the key above my "alt" key, or maybe you want to
> bind it to whichever key `foobar' is bound in such-and-such-mode, ..."
> 
> If all Emacs packages could replace their `define-key' calls by others
> that make the intentions clear, then it would be a lot easier/cleaner to
> redefine key-bindings.

It is laudable goal, but I think it may be way too ambitious.  If you
can try and do it for one mode out there and demonstrate how it can be
done, then we could make some progress.

But I have a feeling that we have the key binding stuff blown way out
of proportion.  When RMS started Gnu Emacs, he seemed to have a clear
sense that the most important and frequently used functions would be
bound to keys, the rest would be done using M-x.  But that idea is
totally lost now.  Most Emacs coders today seem to think that every
function has to be on a key or people won't use it.  And the key
combinations keep getting weirder and weirder.  Like M-s a C-s to do
an isearch!  

It would be a good idea for us to question ourselves why we are so
obsessed with key bindings whereas the rest of the world gets by
perfectly fine with very few key bindings.  Here are two answers that
come to my mind (and perhaps there are others).

- In most modern OS's, one can navigate menus with keys.  Emacs
doesn't use this mode of usage at all.  The menu items don't have key
strokes associated with them, and the menus look totally
disorganized.  In principle, this can give us much more "real estate"
to work with, without having to memorize arcane key bindings that make
our fingers twist.

- We have totally ignored the potential of command names.  I can type
`M-x isearch' a lot faster than I can type `M-s a C-s', but the later
is supposed to a holy cow whereas "isearch" doesn't exist as a
concept.  Why can't we have two name spaces of global commands and
local commands, and bind them to functions?

I am not digressing.  If we can start exploring some of these other
options, they can reduce the burden that the key bindings are having
to carry at the moment.

> But if you look at the average quality of Elisp code, you'll quickly
> learn that most authors have much better things to do than to worry
> about such problems (i.e. their main worry is to get it to work for
> the very specific Emacs they're currently using, with their current
> .emacs).

Then let us discourage them from binding too many keys, and leave it
to the users to bind their own keys.  There is only a limited amount
of key space out there!  The predefined key bindings are even
defeating the remap-bindings as we have just discovered.

> That's yet more difficult.  It means that the author and/or the user
> needs to explicitly indicate when something should take precedence over
> something else, and when not.  In most cases I know of, this tends to be
> too heavy to use and instead the system is designed to use a default
> precedence scheme (witness the "use first matching pattern" rule in
> ML-style or Prolog pattern matching).
> So I'd expect "conflict detection" to come with a lot of user complaints
> (already we have occasional bug-reports about the errors signaled by
> define-key when you define a binding for C-a C-b when C-a is already bound
> to a command).

My feeling is that, if we have a decent infrastructure for developing
and exchanging keymaps, people will do the work for themselves.  (I
recall that when X Windows first started, people found it to be a
nightmare to customize them.  But, very quickly, people started
writing .Xdefaults files and exchanging them and the knowhow spread
around.  We can ask ourselves why people find it so much harder to do
keymaps as compared to Xdefaults.)

I guess we will discover what precedence rules are needed as we play
with these features.  For instance, it would have been much nicer if
remap had precedence over the hard-coded bindings whereas it is the
other way around at present.  I think it would be best if the user can
say which way the precedence should go.

I will continue playing with the features you mentioned and see how
well they work.

Cheers,
Uday



  parent reply	other threads:[~2010-07-29 15:28 UTC|newest]

Thread overview: 277+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-26 22:01 Key bindings proposal [Was: Emacs learning curve] Uday S Reddy
2010-07-27  3:17 ` Stephen J. Turnbull
2010-07-27 10:32 ` Key bindings proposal Stefan Monnier
2010-07-27 11:30   ` Eric M. Ludlam
2010-07-27 11:32   ` Stephen J. Turnbull
2010-07-27 12:03     ` Stefan Monnier
2010-07-27 16:41       ` Uday S Reddy
2010-07-27 23:32         ` Miles Bader
2010-07-29 14:05           ` Stefan Monnier
2010-07-27 16:41       ` Stephen J. Turnbull
2010-07-27 17:52         ` Uday S Reddy
2010-07-28  5:57           ` Stephen J. Turnbull
2010-07-28 18:32             ` Uday S Reddy
2010-07-29  5:47               ` Stephen J. Turnbull
2010-07-29 15:28   ` Uday S Reddy [this message]
2010-07-29 16:05     ` Andreas Röhler
2010-07-31  7:16     ` Mathias Dahl
2010-07-31 10:04       ` Uday S Reddy
2010-07-31 14:07         ` Alan Mackenzie
2010-07-31 18:17         ` Drew Adams
2010-08-02 14:59           ` Uday S Reddy
2010-08-02 17:59             ` Drew Adams
2010-08-02 18:10               ` Lennart Borgman
2010-08-03  9:45                 ` Jan Djärv
2010-08-03 10:02                   ` Lennart Borgman
2010-08-03  2:09               ` Stephen J. Turnbull
2010-08-03 11:56               ` Uday S Reddy
2010-08-03 14:04                 ` Juanma Barranquero
2010-08-03 15:02                   ` Lennart Borgman
2010-08-03 15:16                     ` Juanma Barranquero
2010-08-03 15:54                       ` Lennart Borgman
2010-08-03 15:18                     ` David Kastrup
2010-08-03 15:51                       ` Lennart Borgman
2010-08-03 15:58                         ` no forking relation (was: Key bindings proposal) Drew Adams
2010-08-05  8:39                   ` Key bindings proposal Uday S Reddy
2010-08-05  9:22                     ` Juanma Barranquero
2010-08-05 11:00                       ` Lennart Borgman
2010-08-05 11:24                         ` Juanma Barranquero
2010-08-05 12:16                           ` Lennart Borgman
2010-08-05 13:59                             ` Uday S Reddy
2010-08-05 14:07                               ` Lennart Borgman
2010-08-05 13:10                         ` Uday S Reddy
2010-08-05 13:13                           ` Juanma Barranquero
2010-08-05 13:22                           ` Lennart Borgman
2010-08-05 13:48                             ` Uday S Reddy
2010-08-05 14:01                               ` Lennart Borgman
2010-08-05 14:01                                 ` Lennart Borgman
2010-08-05 17:08                                   ` Uday S Reddy
     [not found]                                 ` <19546.51009.703000.960158@gargle.gargle.HOWL>
2010-08-05 14:18                                   ` Lennart Borgman
2010-08-06  0:50                             ` Jason Rumney
2010-08-06  1:28                               ` Lennart Borgman
2010-08-06  1:35                                 ` Jason Rumney
2010-08-06  1:41                                   ` Lennart Borgman
2010-08-06  1:58                                     ` Lennart Borgman
2010-08-06  2:16                                       ` Óscar Fuentes
2010-08-06  2:38                                         ` Lennart Borgman
2010-08-06  2:34                                       ` Lennart Borgman
2010-08-06  2:55                                         ` Lennart Borgman
2010-08-06  3:11                                           ` Lennart Borgman
2010-08-06  6:05                                             ` Jason Rumney
2010-08-06 15:07                                               ` Lennart Borgman
2010-08-06 15:29                                                 ` Lennart Borgman
2010-08-05 20:33                           ` Óscar Fuentes
2010-08-05 21:26                             ` Uday S Reddy
2010-08-05 22:55                               ` Lennart Borgman
2010-08-06  0:05                               ` Drew Adams
2010-08-06  7:46                                 ` Eli Zaretskii
2010-08-06  3:21                             ` Stephen J. Turnbull
2010-08-06  3:25                               ` Lennart Borgman
2010-08-06  5:22                                 ` Stephen J. Turnbull
2010-08-06  6:21                                   ` Tassilo Horn
2010-08-06  5:09                               ` Miles Bader
2010-08-06  9:02                                 ` Stephen J. Turnbull
2010-08-06 17:32                               ` Uday S Reddy
2010-08-06 17:46                                 ` Óscar Fuentes
2010-08-06 18:40                                   ` Uday S Reddy
2010-08-06 19:13                                   ` Drew Adams
2010-08-06 19:04                                 ` Juanma Barranquero
2010-08-08 22:22                                 ` Chong Yidong
2010-08-08 22:29                                   ` Lennart Borgman
2010-08-08 23:06                                     ` David De La Harpe Golden
2010-08-08 23:09                                     ` Chong Yidong
     [not found]                                       ` <AANLkTim86uB8Yb3P9_HX2NN=RQ6svVTvXfyvUQfAJAnE@mail.gmail! .com>
2010-08-08 23:19                                       ` Lennart Borgman
2010-08-08 23:42                                         ` Chong Yidong
     [not found]                                           ` <AANLkTikRWNmYsEqJX7ccPFGsBobNLkeYRY+1BvnBDOt9!! @mail.gmail.com>
     [not found]                                           ` <AANLkTikRWNmYsEqJX7ccPFGsBobNLkeYRY+1BvnBDOt9! @mail.gmail.com>
2010-08-09 14:50                                           ` Lennart Borgman
2010-08-09 15:16                                             ` Uday S Reddy
2010-08-09 16:08                                               ` Drew Adams
2010-08-10  7:30                                                 ` Stephen J. Turnbull
2010-08-12 15:21                                             ` Chong Yidong
2010-08-12 15:46                                               ` Andreas Schwab
2010-08-12 16:13                                                 ` Jan Djärv
2010-08-12 15:59                                               ` Lennart Borgman
2010-08-12 21:20                                                 ` Juanma Barranquero
2010-08-12 21:57                                                   ` Uday S Reddy
2010-08-12 22:06                                                     ` Uday S Reddy
2010-08-12 22:12                                                     ` Juanma Barranquero
2010-08-12 23:02                                                       ` Lennart Borgman
2010-08-12 23:11                                                         ` Juanma Barranquero
2010-08-13  8:57                                                       ` Uday S Reddy
2010-08-13 14:42                                                         ` Drew Adams
2010-08-13 14:57                                                           ` Lennart Borgman
2010-08-13 16:09                                                             ` Drew Adams
2010-08-13 16:15                                                               ` Lennart Borgman
2010-08-13 17:40                                                                 ` David Robinow
2010-08-14  0:01                                                                 ` Drew Adams
2010-08-13 16:07                                                           ` Uday S Reddy
2010-08-13 22:34                                                             ` Juanma Barranquero
2010-08-14  0:01                                                             ` Drew Adams
2010-08-14  9:23                                                               ` Uday S Reddy
2010-08-13 22:53                                                         ` Juanma Barranquero
2010-08-14  7:08                                                           ` Uday S Reddy
2010-08-13 15:37                                                     ` Chong Yidong
2010-08-13 15:46                                                       ` Óscar Fuentes
2010-08-13 16:50                                                         ` Chong Yidong
2010-08-13 20:32                                                           ` Óscar Fuentes
2010-08-13 22:37                                                             ` Juanma Barranquero
2010-08-13 23:30                                                               ` Óscar Fuentes
2010-08-13 23:53                                                                 ` Juanma Barranquero
2010-08-14  0:21                                                                   ` Óscar Fuentes
2010-08-15 22:21                                                                     ` Juanma Barranquero
2010-08-14  0:00                                                             ` Drew Adams
2010-08-14  0:25                                                               ` Óscar Fuentes
2010-08-14  2:05                                                                 ` Drew Adams
2010-08-14 10:20                                                                   ` Jeff Clough
2010-08-14  7:48                                                             ` Uday S Reddy
2010-08-14  8:18                                                               ` Jason Rumney
2010-08-15 22:27                                                               ` Juanma Barranquero
2010-08-16  7:25                                                           ` christian.lynbech
2010-08-16  7:37                                                             ` Miles Bader
2010-08-13 16:01                                                       ` Jason Rumney
2010-08-13 22:40                                                         ` Juanma Barranquero
2010-08-13 22:46                                                           ` Lennart Borgman
2010-08-13 16:04                                                       ` Lennart Borgman
2010-08-13 16:53                                                         ` Chong Yidong
2010-08-14  0:41                                                           ` Jason Rumney
2010-08-14  1:24                                                             ` Chong Yidong
2010-08-14  2:13                                                               ` Jason Rumney
2010-08-14  2:02                                                             ` Drew Adams
2010-08-13 22:43                                                         ` Juanma Barranquero
2010-08-14  0:30                                                         ` Jason Rumney
2010-08-14 12:07                                                           ` Lennart Borgman
2010-08-14 13:56                                                             ` Jason Rumney
2010-08-09  1:01                                         ` Juanma Barranquero
2010-08-09  8:48                                           ` Uday S Reddy
2010-08-09  8:13                                   ` Uday S Reddy
2010-08-10  7:52                                   ` Uday Reddy
2010-08-13  9:05                                   ` Uday S Reddy
2010-08-03 15:54                 ` Stephen J. Turnbull
2010-08-04  9:52                   ` Uday S Reddy
2010-08-04 10:20                     ` joakim
2010-08-04 10:52                       ` Lennart Borgman
2010-08-04 11:11                         ` joakim
2010-08-04 11:25                           ` Lennart Borgman
2010-08-04 11:44                             ` joakim
2010-08-04 13:24                             ` Jason Rumney
2010-08-04 13:29                               ` Lennart Borgman
2010-08-04 11:19                         ` Jan Djärv
2010-08-04 11:27                           ` Lennart Borgman
2010-08-04 13:27                             ` Jason Rumney
2010-08-04 13:45                               ` Lennart Borgman
2010-08-04 11:16                       ` Uday S Reddy
2010-08-04 11:28                         ` Andreas Schwab
2010-08-04 11:36                           ` Uday S Reddy
2010-08-04 12:03                             ` Andreas Schwab
2010-08-04 12:09                               ` Lennart Borgman
2010-08-04 12:13                                 ` Andreas Schwab
2010-08-04 12:17                                   ` Lennart Borgman
2010-08-04 12:33                               ` Uday S Reddy
2010-08-04 16:19                                 ` Tom
2010-08-04 17:38                                   ` Stuart Hacking
2010-08-05  2:39                                     ` Stephen J. Turnbull
2010-08-05  8:16                                       ` Stuart Hacking
2010-08-05  8:34                                       ` Andreas Schwab
2010-08-05 11:55                                         ` Stephen J. Turnbull
2010-08-05 12:20                                           ` Andreas Schwab
2010-08-05 12:37                                             ` Stephen J. Turnbull
2010-08-05 12:47                                               ` Andreas Schwab
2010-08-05  2:28                                   ` Chong Yidong
2010-08-05  3:14                                     ` Stephen J. Turnbull
2010-08-05  7:46                                       ` Uday S Reddy
2010-08-05 15:17                                         ` David Kastrup
2010-08-06  3:12                                         ` Stephen J. Turnbull
2010-08-06  5:54                                           ` Jan Djärv
2010-08-06  6:20                                             ` Stephen J. Turnbull
2010-08-05 14:01                                     ` Richard Stallman
2010-08-05 14:55                                       ` Eli Zaretskii
2010-08-04 14:06                               ` Stephen J. Turnbull
2010-08-04 13:53                         ` Stephen J. Turnbull
2010-08-04 13:15                       ` Jason Rumney
2010-08-04 10:54                     ` Stephen J. Turnbull
2010-08-04 11:25                       ` Uday S Reddy
2010-08-04 14:25                         ` Stephen J. Turnbull
2010-08-04 15:21                       ` Óscar Fuentes
2010-08-04 15:45                         ` joakim
2010-08-04 12:57                 ` Stefan Monnier
2010-08-02  9:42         ` Stuart Hacking
2010-08-02 10:58           ` Uday S Reddy
2010-08-02 11:17             ` Stuart Hacking
2010-08-02 11:58               ` Uday S Reddy
2010-08-03  3:03                 ` Stephen J. Turnbull
2010-08-02 10:12         ` Tassilo Horn
2010-08-02 11:24           ` Uday S Reddy
2010-08-23 13:45       ` Juri Linkov
2010-08-23 14:14         ` Thierry Volpiatto
2010-08-23 20:56           ` Juri Linkov
2010-08-23 21:15             ` Thierry Volpiatto
2010-08-23 22:36               ` Drew Adams
2010-08-24 13:55                 ` Juri Linkov
2010-08-24 15:20                   ` Thierry Volpiatto
2010-08-24 16:38                   ` Drew Adams
2010-08-25 13:47                     ` Juri Linkov
2010-08-23 14:39         ` Drew Adams
2010-08-23 20:45           ` Juri Linkov
2010-08-24 13:50           ` Juri Linkov
2010-08-24 16:34             ` Drew Adams
2010-08-25 13:48               ` Juri Linkov
2010-08-25 15:07                 ` Drew Adams
2010-08-26 23:22                   ` Juri Linkov
2010-08-27 12:10                     ` Jason Rumney
2010-08-27 22:38                       ` Juri Linkov
2010-08-28  0:01                         ` Stefan Monnier
2010-08-28  7:28                           ` Eli Zaretskii
2010-08-30 14:37                             ` Stefan Monnier
2010-08-30 15:34                               ` Drew Adams
2010-08-30 15:39                                 ` Lennart Borgman
2010-08-30 15:53                                   ` Drew Adams
2010-08-30 16:06                                     ` Lennart Borgman
2010-08-30 15:54                                 ` Andreas Schwab
2010-08-30 21:39                                 ` Davis Herring
2010-08-31  5:49                                   ` Jan Djärv
2010-08-31  9:54                                     ` Lennart Borgman
2010-08-31 12:14                                       ` Jan Djärv
2010-08-31 21:25                                         ` Lennart Borgman
2010-08-28  9:25                           ` Jan Djärv
2010-08-28  1:02                         ` Jason Rumney
2010-08-28  9:20                         ` Jan Djärv
2010-08-28  9:23                           ` Jason Rumney
2010-08-28  9:41                             ` Jan Djärv
2010-08-28 10:13                               ` Jason Rumney
2010-08-28 10:58                                 ` Jan Djärv
2010-08-28 23:16                                   ` Juri Linkov
2010-08-29  7:46                                     ` Jan Djärv
2010-08-29 11:58                                       ` David Kastrup
2010-08-29 12:24                                         ` Jan Djärv
2010-08-25 16:34                 ` Stephen J. Turnbull
2010-08-26 23:23                   ` Juri Linkov
2010-08-27  0:17                     ` Miles Bader
2010-08-27 22:38                       ` Juri Linkov
2010-08-27  8:56           ` Uday S Reddy
2010-08-23 17:10         ` Andreas Schwab
2010-08-27  8:18         ` Uday S Reddy
2010-08-27 22:34           ` Juri Linkov
2010-08-27 23:12             ` Lennart Borgman
2010-08-28 23:27               ` Juri Linkov
2010-07-30  2:04   ` coding guidelines? (was Re: Key bindings proposal) Joe Brenner
2010-07-30  8:33     ` Andreas Schwab
2010-07-30  9:32     ` Stephen J. Turnbull
2010-07-31 19:19       ` Joe Brenner
2010-07-31 19:45         ` Joe Brenner
  -- strict thread matches above, loose matches on Subject: below --
2010-07-29  0:08 Key bindings proposal [Was: Emacs learning curve] Noah Lavine
2010-07-29 11:26 ` Uday S Reddy
2010-07-29 12:21   ` Key bindings proposal joakim
2010-07-29 14:16     ` Stefan Monnier
2010-08-03 20:10 MON KEY
2010-08-03 22:19 ` Uday S Reddy
2010-08-03 20:39 MON KEY
2010-08-04  0:11 ` Lennart Borgman
     [not found] <0LflI2-1PHZPs2uvS-00oe0Z@mx.perfora.net>
2010-08-13 10:21 ` Xah Lee
2010-08-13 11:32 grischka
2010-08-13 12:49 ` Uday S Reddy
2010-08-13 20:24   ` grischka
2010-08-14  6:37     ` Uday S Reddy
2010-08-14  7:59       ` Stephen J. Turnbull
2010-08-14  9:39         ` Uday S Reddy
2010-08-23 13:45       ` Juri Linkov
     [not found] <0LpLKf-1PMJpV3jOf-00eqos@mx.perfora.net>
2010-08-13 17:40 ` Xah Lee
     [not found] <0LuegS-1Osh2D2A3E-00zozI@mx.perfora.net>
2010-08-14  0:14 ` Xah Lee
     [not found] <0MKXcd-1OjFjG3Si7-001yF5@mx.perfora.net>
2010-08-14  0:18 ` Xah Lee
     [not found] <0LyWQo-1Ovn6v30nm-01699h@mx.perfora.net>
2010-08-14 15:19 ` Xah Lee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19537.40472.267000.563053@gargle.gargle.HOWL \
    --to=u.s.reddy@cs.bham.ac.uk \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@IRO.UMontreal.CA \
    --cc=stephen@xemacs.org \
    --cc=tlikonen@iki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.