[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ! in Dired--what was the outcome?

From: David Kastrup
Subject: Re: ! in Dired--what was the outcome?
Date: Fri, 15 Oct 2004 10:12:20 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux)

Reinhard Kotucha <address@hidden> writes:

>>>>>> "Johan" == Johan Vromans <address@hidden> 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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]