From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Teemu Likonen Newsgroups: gmane.emacs.devel Subject: Re: Key Mapping Proposal Date: Sat, 16 Jan 2010 10:25:23 +0200 Message-ID: <876372ihho.fsf@mithlond.arda> References: <16d22e431001151603i5d2fab77u4f3054bb7e708323@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1263630353 23558 80.91.229.12 (16 Jan 2010 08:25:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 16 Jan 2010 08:25:53 +0000 (UTC) Cc: emacs-devel@gnu.org To: Noah Lavine Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 16 09:25:45 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.50) id 1NW3yZ-0004Ou-EB for ged-emacs-devel@m.gmane.org; Sat, 16 Jan 2010 09:25:43 +0100 Original-Received: from localhost ([127.0.0.1]:43083 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NW3yZ-0000NN-Vh for ged-emacs-devel@m.gmane.org; Sat, 16 Jan 2010 03:25:44 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NW3yT-0000Kj-RH for emacs-devel@gnu.org; Sat, 16 Jan 2010 03:25:37 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NW3yP-0000C7-Nn for emacs-devel@gnu.org; Sat, 16 Jan 2010 03:25:37 -0500 Original-Received: from [199.232.76.173] (port=36414 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NW3yP-0000Bg-Jb for emacs-devel@gnu.org; Sat, 16 Jan 2010 03:25:33 -0500 Original-Received: from mta-out.inet.fi ([195.156.147.13]:43648 helo=kirsi1.inet.fi) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NW3yO-0001rE-Qi for emacs-devel@gnu.org; Sat, 16 Jan 2010 03:25:33 -0500 Original-Received: from mithlond.arda (84.251.132.215) by kirsi1.inet.fi (8.5.014) id 4B1D0B4D0190E1DE; Sat, 16 Jan 2010 10:25:24 +0200 Original-Received: from dtw by mithlond.arda with local (Exim 4.69) (envelope-from ) id 1NW3yF-0001MY-Ez; Sat, 16 Jan 2010 10:25:23 +0200 In-Reply-To: <16d22e431001151603i5d2fab77u4f3054bb7e708323@mail.gmail.com> (Noah Lavine's message of "Fri, 15 Jan 2010 19:03:03 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 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:120094 Archived-At: On 2010-01-15 19:03 (-0500), Noah Lavine wrote: > I'd like to suggest a change to the way modes bind keys, to make it > easier for users to customize keys. > My suggestion is this: have one location which stores the user's > keybinding for the "forward" key, whatever "forward" means for a > particular mode. Any given mode would then use this to bind their > particular "forward" function to whatever key the user wanted. Do the > same for other keys with conventional meaning, and then modify the > major modes to use these in their keybindings. I don't know how difficult and how much work this would be but as a user I would like such feature very much. I faced a related problem with my ergo-movement-mode [1] which, for example, uses i M- j k l keys for basic cursor movements. The mode actually doesn't bind them directly but relatively. That is, M-l is bound to (lambda () (interactive) (call-interactively (key-binding "\C-f"))) so it executes whatever command is bound to C-f. This works in all major modes automatically but the problem is that I can't rebind C-f to anything. The default Emacs global keybindings are not practically customizable. --------------- 1. http://www.emacswiki.org/emacs/ErgoMovementMode