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: Key bindings proposal Date: Fri, 27 Aug 2010 00:22:10 +0100 Organization: JURTA Message-ID: <87wrrd3qot.fsf@mail.jurta.org> References: <19534.1494.627000.357123@gargle.gargle.HOWL> <19537.40472.267000.563053@gargle.gargle.HOWL> <87tymlv41y.fsf@mail.jurta.org> <8D701A9E7D444011925CB68BF0883D2B@us.oracle.com> <87hbikdss4.fsf@mail.jurta.org> <87iq2yzvpo.fsf@mail.jurta.org> <15A1E47393A44678811B41A238C09E73@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1282865853 31286 80.91.229.12 (26 Aug 2010 23:37:33 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 26 Aug 2010 23:37:33 +0000 (UTC) Cc: emacs-devel@gnu.org To: "Drew Adams" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 27 01:37:31 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 1Oom0f-0004J1-G5 for ged-emacs-devel@m.gmane.org; Fri, 27 Aug 2010 01:37:29 +0200 Original-Received: from localhost ([127.0.0.1]:57885 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oom0e-0003rA-5c for ged-emacs-devel@m.gmane.org; Thu, 26 Aug 2010 19:37:28 -0400 Original-Received: from [140.186.70.92] (port=35944 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oom0T-0003qG-4R for emacs-devel@gnu.org; Thu, 26 Aug 2010 19:37:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oom0O-0007Ni-1t for emacs-devel@gnu.org; Thu, 26 Aug 2010 19:37:17 -0400 Original-Received: from smarty.dreamhost.com ([208.113.175.8]:47212) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oom0N-0007Ne-TE for emacs-devel@gnu.org; Thu, 26 Aug 2010 19:37:11 -0400 Original-Received: from ps18281.dreamhostps.com (ps18281.dreamhost.com [69.163.218.105]) by smarty.dreamhost.com (Postfix) with ESMTP id C650C6E805E; Thu, 26 Aug 2010 16:37:09 -0700 (PDT) Original-Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 3D586451C15B; Thu, 26 Aug 2010 16:37:05 -0700 (PDT) In-Reply-To: <15A1E47393A44678811B41A238C09E73@us.oracle.com> (Drew Adams's message of "Wed, 25 Aug 2010 08:07:31 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.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:129268 Archived-At: > Simple analogy: Imagine that `C-x C-f' did not use the actual file and > directory names, but required you to use a TMM-like UI where you > drilled down from the root each time using single-key codes (~menu > accelerators). Is that a better UI for navigation? Tmm is a good alternative to binding every command to a key sequence. When you remember where the command is located in the menu tree, you can run it by typing its menu accelerators (either in the graphical menu or in text-based tmm menu) with fewer key strokes than with completion. For instance, currently to run `gnus', I need to type `M-x gnus RET' - 7 keys. With menu accelerators, the key sequence will be more than twice shorter - ` t g' ("Tools -> Gnus" menu) - 3 keys. (And with enabled top-level menu accelerators also 3 keys - `M-t g'.) > Anyway, Uday's point was about menu accelerators, and my reply was > that Emacs has them (XEmacs, Lennart/Windows) or could have them. > And I support it doing so. IIUC, Windows defines menu accelerators by prepending "~" in front of the accelerator character in the menu label, Gtk - by prepending "_". These two are incompatible with each other. A common Emacs way would be to define a new underlined face and put it on the accelerator character. Then menu accelerators will appear underlined automatically in tmm (but not in Gtk and Windows). Or more consistent with Emacs menu definitions would be to use a menu property like `:key-sequence' and `:keys', e.g. `key-accel': (define-key menu-bar-file-menu [write-file] `(menu-item ,(purecopy "Save As...") write-file :key-accel "A" :help ,(purecopy "Write current buffer to another file")))