From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Global keymaps Date: Sun, 29 Jun 2008 19:17:47 +0300 Organization: JURTA Message-ID: <87r6agjnc8.fsf@jurta.org> References: <4853F884.7000609@gmail.com> <7dbe73ed0806141442h342f8ff0u83863f3980a7e229@mail.gmail.com> <48545D78.8080103@gmail.com> <4854E536.8040407@gmail.com> <87k5gql900.fsf@jurta.org> <87hcbt59s6.fsf@jurta.org> <87y74ubfnc.fsf@jurta.org> <87fxr1fe7d.fsf@jurta.org> <87ej6l5ffi.fsf@catnip.gol.com> <87bq1mxyem.fsf@jurta.org> <87prq2z9lo.fsf@catnip.gol.com> <87tzfd5wdh.fsf@jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1214756955 23625 80.91.229.12 (29 Jun 2008 16:29:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 29 Jun 2008 16:29:15 +0000 (UTC) Cc: emacs-devel@gnu.org, Miles Bader To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 29 18:30:00 2008 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.50) id 1KCzmn-0005fM-7U for ged-emacs-devel@m.gmane.org; Sun, 29 Jun 2008 18:29:57 +0200 Original-Received: from localhost ([127.0.0.1]:59482 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KCzlw-0006PI-Uo for ged-emacs-devel@m.gmane.org; Sun, 29 Jun 2008 12:29:04 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KCzl9-0005cA-EQ for emacs-devel@gnu.org; Sun, 29 Jun 2008 12:28:15 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KCzl8-0005Zz-0o for emacs-devel@gnu.org; Sun, 29 Jun 2008 12:28:14 -0400 Original-Received: from [199.232.76.173] (port=48386 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KCzl7-0005Zj-JC for emacs-devel@gnu.org; Sun, 29 Jun 2008 12:28:13 -0400 Original-Received: from relay01.kiev.sovam.com ([62.64.120.200]:4397) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KCzl2-00035H-Cd; Sun, 29 Jun 2008 12:28:08 -0400 Original-Received: from [83.170.232.243] (helo=smtp.svitonline.com) by relay01.kiev.sovam.com with esmtp (Exim 4.67) (envelope-from ) id 1KCzkz-0001Je-Lj; Sun, 29 Jun 2008 19:28:06 +0300 In-Reply-To: (Stefan Monnier's message of "Sat, 28 Jun 2008 18:51:06 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-pc-linux-gnu) X-Scanner-Signature: bf674e48040b805769da4ba4af5b826b X-DrWeb-checked: yes X-SpamTest-Envelope-From: juri@jurta.org X-SpamTest-Group-ID: 00000000 X-SpamTest-Header: Trusted X-SpamTest-Info: Profiles 4143 [June 29 2008] X-SpamTest-Info: {received from trusted relay: common white list} X-SpamTest-Info: {HEADERS: header Content-Type found without required header Content-Transfer-Encoding} X-SpamTest-Method: white ip list X-SpamTest-Rate: 10 X-SpamTest-Status: Trusted X-SpamTest-Status-Extended: trusted X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0278], KAS30/Release X-detected-kernel: by monty-python.gnu.org: FreeBSD 4.8-5.1 (or MacOS X 10.2-10.3) 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:100140 Archived-At: >> A name like `ctl-x-n-map' is not descriptive indeed, but at least it >> doesn't limit the keymap to one particular functionality, and keeps >> it open for further unrelated bindings. Since we already very tight >> on available keys, who knows what commands we will need in future on >> these keymaps especially if they will have unrelated but good mnemonics. > > Hopefully, by the time we bump into this problem, we'll have multiple > inheritance for keymaps, so we can just define ctl-x-n-map to be a map > that inherits from narrow-map and from the-other-n-thing-map. I'd like to ascertain what could be done now. In addition to register and rectangle commands, `C-x r' also includes keybindings for the bookmark package. So a keymap name like `register-rectangle-bookmark-and-anything-more-map' clearly is not an option. So we need to separate "physical" maps (bound to physical key sequences) and "logical" maps (like narrow-map and abbrev-map where keys are grouped by functionality). The package bookmark.el already defines a map `bookmark-map', but it is not bound to any key by default. It also adds three keys to the `C-x r' prefix as: ;;;###autoload (define-key ctl-x-map "rb" 'bookmark-jump) ;;;###autoload (define-key ctl-x-map "rm" 'bookmark-set) ;;;###autoload (define-key ctl-x-map "rl" 'bookmark-bmenu-list) So it seems inevitable to create a new map `ctl-x-r-map' and bind these key to it as: ;;;###autoload (define-key ctl-x-r-map "b" 'bookmark-jump) ;;;###autoload (define-key ctl-x-r-map "m" 'bookmark-set) ;;;###autoload (define-key ctl-x-r-map "l" 'bookmark-bmenu-list) Alternatively, when multiple inheritance will be available, a keymap with these three keys could be named as `bookmark-mixin-map' to be merged with register and rectangle maps in ctl-x-r-map. -- Juri Linkov http://www.jurta.org/emacs/