help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: dired shell command on background


From: Peter Dyballa
Subject: Re: dired shell command on background
Date: Sat, 13 May 2006 00:50:18 +0200


Am 12.05.2006 um 00:21 schrieb rodrigo lazo:

how could I make dired to execute a shell command on a file on the background

How about this: you augment for GNU Emacs only the PATH environment variable by one extra directory on top, which can be done in .emacs, and in this extra directory you have little executable shell scripts for each background command you need. You type ! or X on that file or the marked files in the dired buffer and then enter one such script's name, RET. This way Emacs would find for example the xpdf shell script first, which has a contents à la:

        #!/bin/sh
        # some comments or description ...
        
        /usr/local/bin/xpdf "$*" &


In case of xpdf it only accepts one file name. So it might be more appropriate to write:

        #!/bin/sh
        # some comments or description ...
        
        while [ $# -gt 0 ]; do
            /usr/local/bin/xpdf $1 &
            shift
        done


--
Greetings

  Pete


"Evolution"            o           __o                     _o _
          °\___o      /0~         -\<,              ^\___ /=\\_/-%
oo~_______ /\ /\______/ \_________O/ O_______________o===>-->O--o____
""






reply via email to

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