emacs-devel
[Top][All Lists]
Advanced

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

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


From: Reinhard Kotucha
Subject: Re: ! in Dired--what was the outcome?
Date: Fri, 15 Oct 2004 01:30:25 +0200

>>>>> "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.

Regards,
  Reinhard

-- 
----------------------------------------------------------------------------
Reinhard Kotucha                                      Phone: +49-511-4592165
Marschnerstr. 25
D-30167 Hannover                              mailto:address@hidden
----------------------------------------------------------------------------
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.
----------------------------------------------------------------------------





reply via email to

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