From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Global keymaps Date: Sun, 29 Jun 2008 14:03:01 -0400 Message-ID: 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> <87r6agjnc8.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 1214762603 8996 80.91.229.12 (29 Jun 2008 18:03:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 29 Jun 2008 18:03:23 +0000 (UTC) Cc: emacs-devel@gnu.org, Miles Bader To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 29 20:04:08 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 1KD1Fs-00062o-Su for ged-emacs-devel@m.gmane.org; Sun, 29 Jun 2008 20:04:05 +0200 Original-Received: from localhost ([127.0.0.1]:55837 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KD1F2-0004Cj-Ur for ged-emacs-devel@m.gmane.org; Sun, 29 Jun 2008 14:03:12 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KD1Ez-0004CH-3y for emacs-devel@gnu.org; Sun, 29 Jun 2008 14:03:09 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KD1Ex-0004Bt-Hd for emacs-devel@gnu.org; Sun, 29 Jun 2008 14:03:08 -0400 Original-Received: from [199.232.76.173] (port=33105 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KD1Ex-0004Bo-Cd for emacs-devel@gnu.org; Sun, 29 Jun 2008 14:03:07 -0400 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182]:51786 helo=ironport2-out.teksavvy.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KD1Es-0006F3-7O; Sun, 29 Jun 2008 14:03:02 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjQFAPdqZ0hFxIdG/2dsb2JhbACBW6xngXo X-IronPort-AV: E=Sophos;i="4.27,723,1204520400"; d="scan'208";a="23741034" Original-Received: from 69-196-135-70.dsl.teksavvy.com (HELO pastel.home) ([69.196.135.70]) by ironport2-out.teksavvy.com with ESMTP; 29 Jun 2008 14:03:01 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 5C47F835A; Sun, 29 Jun 2008 14:03:01 -0400 (EDT) In-Reply-To: <87r6agjnc8.fsf@jurta.org> (Juri Linkov's message of "Sun, 29 Jun 2008 19:17:47 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. 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:100147 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. Yes, Stefan