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: Mon, 23 Aug 2010 14:45:27 +0100 Organization: JURTA Message-ID: <87tymlv41y.fsf@mail.jurta.org> References: <19534.1494.627000.357123@gargle.gargle.HOWL> <19537.40472.267000.563053@gargle.gargle.HOWL> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1282571927 14174 80.91.229.12 (23 Aug 2010 13:58:47 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 23 Aug 2010 13:58:47 +0000 (UTC) Cc: emacs-devel@gnu.org To: Uday S Reddy Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 23 15:58: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.69) (envelope-from ) id 1OnXXw-00061e-IC for ged-emacs-devel@m.gmane.org; Mon, 23 Aug 2010 15:58:44 +0200 Original-Received: from localhost ([127.0.0.1]:60579 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OnXXw-0002GL-1I for ged-emacs-devel@m.gmane.org; Mon, 23 Aug 2010 09:58:44 -0400 Original-Received: from [140.186.70.92] (port=32972 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OnXX2-0001rP-OX for emacs-devel@gnu.org; Mon, 23 Aug 2010 09:57:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OnXX1-0004NS-Ct for emacs-devel@gnu.org; Mon, 23 Aug 2010 09:57:48 -0400 Original-Received: from smarty.dreamhost.com ([208.113.175.8]:49574) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OnXX1-0004NN-99 for emacs-devel@gnu.org; Mon, 23 Aug 2010 09:57:47 -0400 Original-Received: from ps18281.dreamhostps.com (ps18281.dreamhost.com [69.163.218.105]) by smarty.dreamhost.com (Postfix) with ESMTP id CCF196E8058; Mon, 23 Aug 2010 06:57:46 -0700 (PDT) Original-Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 7D361451C0C7; Mon, 23 Aug 2010 06:57:45 -0700 (PDT) In-Reply-To: (Mathias Dahl's message of "Sat, 31 Jul 2010 09:16:40 +0200") 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:129085 Archived-At: > function has to be on a key or people won't use it. > And the key combinations keep getting weirder and weirder. > Like M-s a C-s to do an isearch! Well, we have 4 basic input trees for input sequences and usually are trying to add a command to all of them: 1. Command names for M-x. An input sequence comprises of characters of the command name, and completion helps making the input sequence shorter. This have to be taken into account when designing a scheme for command names (using an unique command name prefix, etc.) To improve this type of input, we could try adding dwim completions for M-x. For instance, like the `calc-execute-extended-command' command basically does the same as `execute-extended-command' but prefills the minibuffer's input with the `calc-' prefix: M-x calc- Similarly e.g. in Dired, M-x could guess the `dired-' prefix for Dired commands, so you could just add `isearch' to run `dired-isearch-filenames'. For more convenience, this could also behave like completions in text fields in web browsers and push the most likely completions combined with more frequent items from the input history to the top of the completions list. 2. Menus. In a menu-driven program with menu accelerators using Alt+Letter in a sequence like `M-s a C-s' selects an action from the main menu. So if we had a separate top-level menu "_S_earch" then using the menu accelerator key `M-s' would open the Search menu. Then the next key `a' will select a submenu with the menu accelerator `a', and the final key `C-s' will run a command bound to the menu item. If the last key is RET, it will select the first menu item. 3. Key sequences of input events. You seem to suggest that we have to refrain from binding each and every command to a key sequence since it duplicates two other input types above. I tend to agree provided that M-x completions are as short as possible and the menu structure is well-thought-out (balanced breadth and depth, e.g. to reduce the length of the overlong File menu, print-related items could be moved into a submenu with the "_P_rint" menu accelerator, etc.) 4. Toolbar (a flat menu with icons). All in all, is it a conclusion we are leaning towards: 1. All commands should have a name designed for M-x completions. 2. Most commands should be presented in the main menu. 3. Few basic commands should be bound to a key sequence. 4. Some of most frequently used command should be added to the toolbar.