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: TAB for non-editing modes Date: Mon, 24 Sep 2007 02:59:36 +0300 Organization: JURTA Message-ID: <87odftlyqf.fsf@jurta.org> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1190594680 18112 80.91.229.12 (24 Sep 2007 00:44:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 24 Sep 2007 00:44:40 +0000 (UTC) Cc: emacs-devel@gnu.org To: "Drew Adams" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 24 02:44:35 2007 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 1IZc3u-0007LK-QM for ged-emacs-devel@m.gmane.org; Mon, 24 Sep 2007 02:44:35 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IZc3s-0003ZV-4E for ged-emacs-devel@m.gmane.org; Sun, 23 Sep 2007 20:44:32 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IZc3L-0003Dl-7Q for emacs-devel@gnu.org; Sun, 23 Sep 2007 20:43:59 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IZc3K-0003DC-Gp for emacs-devel@gnu.org; Sun, 23 Sep 2007 20:43:58 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IZc3K-0003D6-BY for emacs-devel@gnu.org; Sun, 23 Sep 2007 20:43:58 -0400 Original-Received: from relay01.kiev.sovam.com ([62.64.120.200]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IZc3J-00052D-JH for emacs-devel@gnu.org; Sun, 23 Sep 2007 20:43:58 -0400 Original-Received: from [83.170.232.243] (helo=smtp.svitonline.com) by relay01.kiev.sovam.com with esmtp (Exim 4.67) (envelope-from ) id 1IZc39-000IJw-JT; Mon, 24 Sep 2007 03:43:56 +0300 In-Reply-To: (Drew Adams's message of "Sat\, 22 Sep 2007 15\:44\:11 -0700") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux) X-Scanner-Signature: 5e2df25549de819b25d1bfd51e9f52eb X-DrWeb-checked: yes X-SpamTest-Envelope-From: juri@jurta.org X-SpamTest-Group-ID: 00000000 X-SpamTest-Header: Not Detected X-SpamTest-Info: Profiles 1513 [September 21 2007] X-SpamTest-Info: helo_type=3 X-SpamTest-Info: {HEADERS: header Content-Type found without required header Content-Transfer-Encoding} X-SpamTest-Method: none X-SpamTest-Rate: 25 X-SpamTest-Status: Not detected X-SpamTest-Status-Extended: not_detected X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0255], KAS30/Release X-Detected-Kernel: FreeBSD 4.8-5.1 (or MacOS X 10.2-10.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:79644 Archived-At: > - `TAB' is used for indenting, which can be context-dependent. Someday > perhaps we will have a notion of indenting for Dired. (No idea what such > indentation might mean - perhaps for inserted subdirs?) > > - `TAB' is used for completion - both minibuffer and buffer text. Someday > perhaps we will have some notion of "completing" a file or directory entry > in Dired. (No idea what such completion might mean.) FWIW, I use a combination of two functionalities with the same TAB key. If TAB is typed on a symbol, then it is used for completion. Otherwise - for indenting: (defun my-lisp-indent-or-complete () (interactive) (if (and (memq (char-syntax (preceding-char)) (list ?w ?_)) (not (bobp))) (lisp-complete-symbol) (indent-for-tab-command))) (define-key emacs-lisp-mode-map [tab] 'my-lisp-indent-or-complete) This even works without a modification with the latest changes Dan made to use TAB to indent the active region. > - `TAB' is used for field navigation (particularly outside Emacs), as > Lennart mentioned. Someday perhaps we will have fields of some sort in > Dired. I've TAB bound in dired to the command that navigates to the next/previous directory, and I find this useful: (defun my-dired-move-to-next-dir (arg) (interactive "P") (if (not (memq ?R (append dired-actual-switches nil))) (dired-next-dirline-cycle 1) (progn (dired-next-subdir 1)))) (define-key dired-mode-map [tab] 'my-dired-move-to-next-dir) Another good binding for TAB in dired would be `other-window' like it is used in most commander-like file managers to switch to another file panel. I tried this once but have found that this is useful only in a configuration where both Emacs windows contain dired buffers. However, a habit of using TAB to switch between dired buffers fails when one of dired buffers gets replaced with a visited file, and typing TAB in a file buffer doesn't switch back to the dired buffer in another window, because TAB has another binding in the file buffer. > I'm not familiar with wdired, but perhaps it has such a notion of field, so > that some editing commands get their specific effect from the kind of field > the cursor is in. I don't know. In that case, letting `TAB' move among > fields might be useful. Yes, wdired has editable fields where TAB would be useful, but wdired is a separate mode, so this fact is irrelevant here. -- Juri Linkov http://www.jurta.org/emacs/