From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: John Williams Newsgroups: gmane.emacs.devel Subject: Re: patches for etags and shell-command Date: Sat, 21 Jan 2006 16:17:46 -0600 Message-ID: <43D2B30A.3050500@pobox.com> References: <43D10FF4.8030202@pobox.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1137881921 1119 80.91.229.2 (21 Jan 2006 22:18:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 21 Jan 2006 22:18:41 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 21 23:18:40 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1F0R43-000233-MV for ged-emacs-devel@m.gmane.org; Sat, 21 Jan 2006 23:18:32 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F0R6c-0000zg-0p for ged-emacs-devel@m.gmane.org; Sat, 21 Jan 2006 17:21:10 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1F0R6G-0000t4-HI for emacs-devel@gnu.org; Sat, 21 Jan 2006 17:20:48 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1F0R6F-0000rE-Hn for emacs-devel@gnu.org; Sat, 21 Jan 2006 17:20:47 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F0R6F-0000qk-Bn for emacs-devel@gnu.org; Sat, 21 Jan 2006 17:20:47 -0500 Original-Received: from [216.84.45.195] (helo=www.languagecomputer.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1F0RAg-0001i1-OP; Sat, 21 Jan 2006 17:25:22 -0500 Original-Received: from [192.168.1.37] (unknown [216.84.45.194]) by www.languagecomputer.com (Postfix) with ESMTP id 79D4F2B92A; Sat, 21 Jan 2006 16:26:19 -0600 (CST) User-Agent: Thunderbird 1.5 (X11/20051201) Original-To: rms@gnu.org In-Reply-To: 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:49365 Archived-At: Richard M. Stallman wrote: > I have two patches today; the first one changes shell-command so that the > default interactive argument is the current buffer's filename. > > Is the idea that you type M-n to bring the current buffer's filename > into the minibuffer, and then you type the rest of the command around > it? Access to that file name would be useful, but at the same time, > this interface would be rather inconvenient to use. > > This patch corrects a bug in etags that causes completion to only > consider the tags in a single TAGS buffer. With the match tag > completion will consider tags from all the active TAGS buffers. > > That seems like a clean extension. I will forward it to the etags > maintainer. > It takes a little getting used to, but it's quite natural to use once you get used to M-! M-n meaning "run a shell command on the current file." Most of the commands you'd use in conjunction with the current file name accept the file name as their last argument, so running a command usually involves this key sequence: M-! M-n SPC RET (If I'd though of it before now I would have added a space at the beginning of the default argument since it's probably needed anyway 99% of the time.) Not being able to insert the current filename in the minibuffer seemed like a glaring omission when I started using Emacs after years of using Vim, so I would really like to see some way of achieving that functionality became part of Emacs. Before I came up with the idea to use M-n, I also considered expanding "%" the way Vim does, but I think that's too likely to cause surprises to users unfamiliar with the feature. I also tried adding a special key binding to insert the current file name, but I don't think the added flexibility is worth the cost of having to remember yet another key combination. --jw