From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Eric M. Ludlam" Newsgroups: gmane.emacs.devel Subject: Re: Key bindings proposal Date: Tue, 27 Jul 2010 07:30:09 -0400 Message-ID: <4C4EC341.8010305@siege-engine.com> References: <19534.1494.627000.357123@gargle.gargle.HOWL> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1280230227 17192 80.91.229.12 (27 Jul 2010 11:30:27 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 27 Jul 2010 11:30:27 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 27 13:30:24 2010 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 1OdiMZ-0001Ij-LZ for ged-emacs-devel@m.gmane.org; Tue, 27 Jul 2010 13:30:24 +0200 Original-Received: from localhost ([127.0.0.1]:53840 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OdiMY-0004SV-MV for ged-emacs-devel@m.gmane.org; Tue, 27 Jul 2010 07:30:22 -0400 Original-Received: from [140.186.70.92] (port=35046 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OdiMT-0004SG-Mw for emacs-devel@gnu.org; Tue, 27 Jul 2010 07:30:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OdiMP-0002h1-Hj for emacs-devel@gnu.org; Tue, 27 Jul 2010 07:30:17 -0400 Original-Received: from bird.interbax.net ([75.126.100.114]:58289) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OdiMP-0002gZ-DI for emacs-devel@gnu.org; Tue, 27 Jul 2010 07:30:13 -0400 Original-Received: (qmail 26313 invoked from network); 27 Jul 2010 06:30:10 -0500 Original-Received: from static-71-184-83-10.bstnma.fios.verizon.net (HELO ?192.168.1.201?) (71.184.83.10) by interbax.net with SMTP; 27 Jul 2010 06:30:10 -0500 User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.3a1pre) Gecko/20091222 Shredder/3.1a1pre In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Windows 98 (1) 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:127870 Archived-At: On 07/27/2010 06:32 AM, Stefan Monnier wrote: >> If Emacs did take key binding customization seriously, it would have >> > provided a whole bunch of*declarative* methods for specifying key >> > bindings, along with rules for how they override each other or not >> > override, as the need may be. > I understand what you want. But, I'm not 100% sure what a good solution > would look like, and I'm even less clear on how we could get to such > a solution starting from Emacs's current system. > > The main problem is not whether the method is declarative or not, but > rather the problem is to make intentions clear. > > 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, ..." Hi, While it may not cover the gamut of possible keybinding remapping, one way to express intention is to make all the commands that get bound into global maps be overridable in some way. Some commands like beginning/end of line have this feature already. Modes of all sorts would then override the behavior they want to change instead of binding their custom functions to keys. This would then make it much easier to just move all the Emacs core commands around while allowing the modes to follow easily. Using something like mode-local.el is one way to do this in a declarative way which I used extensively in CEDET. Eric