unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Stephen J. Turnbull" <stephen@xemacs.org>
To: Lennart Borgman <lennart.borgman@gmail.com>
Cc: Juri Linkov <juri@jurta.org>,
	Wojciech Meyer <wojciech.meyer@googlemail.com>,
	Drew Adams <drew.adams@oracle.com>,
	emacs-devel@gnu.org
Subject: Re: dired-jump keybinding and autoload
Date: Mon, 24 May 2010 14:03:32 +0900	[thread overview]
Message-ID: <8739xhnb6j.fsf@uwakimon.sk.tsukuba.ac.jp> (raw)
In-Reply-To: <AANLkTikMZcvc9ji5F2ELQvJZ4olHs7tmKeU1nkGzzFo5@mail.gmail.com>

Lennart Borgman writes:

 > You have a point there of course. I get too upset when this conflict
 > is ignored.. ;-)

Well, you're just going to have to deal with that.  I sympathize with
your pain, but not with your position.  I prefer X-style GUI and Emacs
keybindings myself. :-)  Since that seems to the be majority position
in Emacs core, I think the only solution for people who want CUA
bindings (or other nontraditional maps, such as vi[1]) is going to be
a really excellent keymap skinning method that allows even more
convenient switching (and maintenance of personal variants) than
cua.el or viper.

 > There are some thing there I do not understand:
 > 
 > -. Does all C-x bindings go into Control-X-prefix? How does that work?

Yes and no.  The basic answer is "yes, because the control-X prefix
map is bound early, and the keybinding code automatically searches
through the maps found along the keystroke sequence, and puts bindings
in the leaf-most map it finds."

The full answer is "theoretically, not necessarily, because you can
unbind C-x in a mode before binding C-x sequences, but in practice
only someone intent on sabotage would do that in an editing mode".  I
can't recall ever typing C-x C-f and getting something other than
find-file (including errors), or C-x b and getting something other
than switch-to-buffer, so I would guess that even rather specialized
modes pretty much all preserve the binding of control-x to that
keymap.

 > - Why is Control-X-prefix a full keymap (and not a sparse dito)?

Saves some consing, that's all.  Eg, in XEmacs they're both resizable
hashtables, make-sparse-keymap starts with room for 8 entries (and the
hashtable implementation rounds up to 19), while make-keymap makes a
much bigger one (at least 60 entries which rounds up to 79 -- not
quite big enough, my current session has 82 entries :-) by default.
Otherwise the functionality of both kinds of keymap is identical.

In Emacs the implementation is different, but I would imagine that the
rationale is the same, a tradeoff of consing vs a certain amount of
space, and the API has exactly the same semantics for both kinds of
hashtable.


Footnotes: 
[1]  For values of tradition == Emacs', of course!





  reply	other threads:[~2010-05-24  5:03 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-08 12:59 dired-jump keybinding and autoload Stephen Berman
2008-05-08 14:12 ` Stefan Monnier
2008-05-08 14:36   ` David Kastrup
2008-05-08 16:08     ` Stephen Berman
2008-05-09 23:52       ` Juri Linkov
2010-05-18 22:59         ` Juri Linkov
2010-05-23 15:48           ` Wojciech Meyer
2010-05-23 16:04             ` Juri Linkov
2010-05-23 16:45               ` Drew Adams
2010-05-23 16:50                 ` Lennart Borgman
2010-05-23 17:11                   ` Drew Adams
2010-05-23 17:24                     ` Lennart Borgman
2010-05-23 18:14                       ` Drew Adams
2010-05-23 18:47                         ` Lennart Borgman
2010-05-23 20:56                           ` Drew Adams
2010-05-23 21:08                             ` Lennart Borgman
2010-05-24  1:01                   ` Stephen J. Turnbull
2010-05-24  1:30                     ` Lennart Borgman
2010-05-24  5:03                       ` Stephen J. Turnbull [this message]
2010-05-23 16:59               ` Leo
2010-05-24 16:00                 ` Juri Linkov
2010-05-24 16:17                   ` Lennart Borgman
2010-05-24 16:46                     ` Drew Adams
2010-05-24 16:53                       ` Lennart Borgman
2010-05-24 16:35                   ` Drew Adams
2010-05-24  5:05             ` Miles Bader
2010-05-24  7:19               ` Wojciech Meyer
2010-05-24 17:39                 ` Lennart Borgman
2010-05-25  6:35                 ` Miles Bader

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=8739xhnb6j.fsf@uwakimon.sk.tsukuba.ac.jp \
    --to=stephen@xemacs.org \
    --cc=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=juri@jurta.org \
    --cc=lennart.borgman@gmail.com \
    --cc=wojciech.meyer@googlemail.com \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).