From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: ! in Dired--what was the outcome? Date: Fri, 15 Oct 2004 10:12:20 +0200 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: References: <87vfdgezro.fsf@jurta.org> <200410130301.i9D31GM02856@raven.dms.auburn.edu> <16751.3089.79455.136342@zarniwoop.ms25.local> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1097828029 8952 80.91.229.6 (15 Oct 2004 08:13:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 15 Oct 2004 08:13:49 +0000 (UTC) Cc: Johan Vromans , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 15 10:13:40 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CINDX-0008SF-00 for ; Fri, 15 Oct 2004 10:13:39 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CINKf-0000Gp-EC for ged-emacs-devel@m.gmane.org; Fri, 15 Oct 2004 04:21:01 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CINJe-00009d-HP for emacs-devel@gnu.org; Fri, 15 Oct 2004 04:19:58 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CINJd-000097-CD for emacs-devel@gnu.org; Fri, 15 Oct 2004 04:19:57 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CINJd-000092-1x for emacs-devel@gnu.org; Fri, 15 Oct 2004 04:19:57 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CINCH-00034k-UI for emacs-devel@gnu.org; Fri, 15 Oct 2004 04:12:22 -0400 Original-Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.34) id 1CINCH-000107-Dt; Fri, 15 Oct 2004 04:12:21 -0400 Original-To: Reinhard Kotucha In-Reply-To: <16751.3089.79455.136342@zarniwoop.ms25.local> (Reinhard Kotucha's message of "Fri, 15 Oct 2004 01:30:25 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) 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: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:28423 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:28423 Reinhard Kotucha writes: >>>>>> "Johan" == Johan Vromans writes: > > > Likewise, {} could be made available to 'shell-command' as well, > > to make it easy to run arbitrary commands on the file associated > > with the current buffer. For example C-x C-s M-! cp {} {}.save > > RET before starting to make possibly hazardous changes... > > The example is quite special. It allows to append an extension, but > it disallows to remove one. > > What I do very often in bash is > > for file in *.ps ; do > convert $file ${file%%ps}pdf > done > > Maybe your syntax can be extended, for instance like this: > > convert {} {/ps$//}pdf > or > convert {} {/ps$/pdf/} > > Using regexps is much more powerful than the substring approach in > bash anyway. No. If you need a shell, use a shell. Like i={};convert $i ${i%%ps}pdf There is no sense in converting Emacs into a shell in a dozen of different ways. If we wanted to add in-built intelligence, the way to do that would be to use eshell for it. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum