From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stephen J. Turnbull" Newsgroups: gmane.emacs.devel Subject: Re: dired-jump keybinding and autoload Date: Mon, 24 May 2010 14:03:32 +0900 Message-ID: <8739xhnb6j.fsf@uwakimon.sk.tsukuba.ac.jp> References: <874p9954u9.fsf@escher.local.home> <86r6ccooam.fsf@lola.quinscape.zz> <87skws4w3l.fsf@escher.local.home> <87lk2j83m1.fsf@jurta.org> <87iq6kzuhh.fsf@mail.jurta.org> <87typyei05.fsf@gmail.com> <87d3wmr4dn.fsf@mail.jurta.org> <9A67516A216749079A10805DBCAD67D1@us.oracle.com> <87632em7tk.fsf@uwakimon.sk.tsukuba.ac.jp> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1274677400 18071 80.91.229.12 (24 May 2010 05:03:20 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 24 May 2010 05:03:20 +0000 (UTC) Cc: Juri Linkov , Wojciech Meyer , Drew Adams , emacs-devel@gnu.org To: Lennart Borgman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 24 07:03:10 2010 connect(): No such file or directory Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OGPog-0006wT-Rr for ged-emacs-devel@m.gmane.org; Mon, 24 May 2010 07:03:07 +0200 Original-Received: from localhost ([127.0.0.1]:58119 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OGPog-0004bn-72 for ged-emacs-devel@m.gmane.org; Mon, 24 May 2010 01:03:06 -0400 Original-Received: from [140.186.70.92] (port=57357 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OGPoY-0004bd-JF for emacs-devel@gnu.org; Mon, 24 May 2010 01:02:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OGPoW-0001gM-Gx for emacs-devel@gnu.org; Mon, 24 May 2010 01:02:58 -0400 Original-Received: from mtps02.sk.tsukuba.ac.jp ([130.158.97.224]:55480) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OGPoW-0001fz-2b for emacs-devel@gnu.org; Mon, 24 May 2010 01:02:56 -0400 Original-Received: from uwakimon.sk.tsukuba.ac.jp (uwakimon.sk.tsukuba.ac.jp [130.158.99.156]) by mtps02.sk.tsukuba.ac.jp (Postfix) with ESMTP id 1365F7FFA; Mon, 24 May 2010 14:02:52 +0900 (JST) Original-Received: by uwakimon.sk.tsukuba.ac.jp (Postfix, from userid 1000) id 14A6D1A36DB; Mon, 24 May 2010 14:03:32 +0900 (JST) In-Reply-To: X-Mailer: VM 8.0.12-devo-585 under 21.5 (beta29) "garbanzo" a03421eb562b XEmacs Lucid (x86_64-unknown-linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:125160 Archived-At: 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!