From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Uday S Reddy Newsgroups: gmane.emacs.devel Subject: Re: Key bindings proposal Date: Tue, 27 Jul 2010 18:52:31 +0100 Message-ID: <19535.7391.127000.704995@gargle.gargle.HOWL> References: <19534.1494.627000.357123@gargle.gargle.HOWL> <87sk35upn2.fsf@uwakimon.sk.tsukuba.ac.jp> <87mxtcvpux.fsf@uwakimon.sk.tsukuba.ac.jp> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1280253209 6847 80.91.229.12 (27 Jul 2010 17:53:29 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 27 Jul 2010 17:53:29 +0000 (UTC) Cc: Uday S Reddy , Teemu Likonen , Stefan Monnier , emacs-devel@gnu.org To: "Stephen J. Turnbull" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 27 19:53:25 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 1OdoLB-0008D4-1Z for ged-emacs-devel@m.gmane.org; Tue, 27 Jul 2010 19:53:21 +0200 Original-Received: from localhost ([127.0.0.1]:57942 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OdoLA-00081Q-FE for ged-emacs-devel@m.gmane.org; Tue, 27 Jul 2010 13:53:20 -0400 Original-Received: from [140.186.70.92] (port=53494 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OdoKU-0007bm-1P for emacs-devel@gnu.org; Tue, 27 Jul 2010 13:52:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OdoKS-0000CN-OM for emacs-devel@gnu.org; Tue, 27 Jul 2010 13:52:37 -0400 Original-Received: from sun60.bham.ac.uk ([147.188.128.137]:35735) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OdoKS-0000Br-Jb for emacs-devel@gnu.org; Tue, 27 Jul 2010 13:52:36 -0400 Original-Received: from [147.188.128.127] (helo=bham.ac.uk) by sun60.bham.ac.uk with esmtp (Exim 4.67) (envelope-from ) id 1OdoKP-0006qA-Md; Tue, 27 Jul 2010 18:52:33 +0100 Original-Received: from mx1.cs.bham.ac.uk ([147.188.192.53]) by bham.ac.uk with esmtp (Exim 4.43) id 1OdoKO-0004bI-Fz; Tue, 27 Jul 2010 18:52:32 +0100 Original-Received: from acws-0068.cs.bham.ac.uk ([147.188.194.56]) by mx1.cs.bham.ac.uk with esmtp (Exim 4.51) id 1OdoKO-000320-S6; Tue, 27 Jul 2010 18:52:32 +0100 In-Reply-To: <87mxtcvpux.fsf@uwakimon.sk.tsukuba.ac.jp> X-Mailer: VM 8.1.92a under 23.1.1 (i386-mingw-nt5.1.2600) X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) 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:127881 Archived-At: Stephen J. Turnbull writes: > I don't see how this use of remap helps Uday or the > CUA-should-be-default crowd, since much of the time no such > relationship applies. This is not a solution to the broad problem I posed. I shouldn't pretend that it is. But it helps partially in the following sense. The irritation for the user is that it is not enough to just rebind keys at the global level, but he/she must go and rebind them for every mode. The latter is hard, and one needs to be reasonably expert at the innards of Emacs to do it correctly. The remap idea helps in that the modes can piggy back on the global bindings at least to some extent. But the applicability is limited. I was just looking at dired-mode, which seems to have some 100 odd key-bindings, but only 2 remap's. Not much of a win. To catch the majority of the other generic bindings, something like the "action" idea seems necessary. > (define-key vm-summary-map [remap next-line] #'vm-summary-next) > > does make sense to me, but guess what? #'next-line is a useful > command in VM Summary mode, even if much less useful than it is in > most modes. So I'd be very bummed if Uday used [remap] instead of an > explicit keystroke binding there. You are right. But, if there were action-based bindings, I could do: (define-key vm-summary-map [action quick-next-line] #'vm-summary-next) and the quick-next-line action might be bound to the key `n' (or `C-n' or `M-n' or whatever else the user might wish). Gnus, Dired, buff-menu and a host of other modes that need "quick" actions could all share their key bindings without having to do anything. Cheers, Uday