[Top][All Lists]

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

Re: dired-do-shell-command as "bash program"

From: Josef . Bauer . NOSPAM
Subject: Re: dired-do-shell-command as "bash program"
Date: 14 May 2008 10:29:51 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3


    Torben> I have taken a look but I have difficulties to find doc
    Torben> telling what it does and how it compares to
    Torben> dired-do-shell-command.


this is what I use (in my '.emacs'):


(defun dired-do-shell-command-in-background (command)
  "In dired, do shell command in background on the file or directory named on 
this line."
   (list (dired-read-shell-command (concat "& on " "%s: ") nil (list 
  (call-process command nil 0 nil (dired-get-filename)))

(add-hook 'dired-load-hook
          (function (lambda ()
                      (load "dired-x")
                      (define-key dired-mode-map "&" 

(setq dired-guess-shell-alist-user
      (list (list "\\.wav$" "wavesurfer") (list "\\.au$" "wavesurfer") (list 
"\\.pdf$" "acroread")
            (list "\\.doc$" "OOo" ) (list "\\.xls$" "OOo") (list "\\.tif$" 
"gqview") (list "\\.jpg$" "gqview")))


In dired (over the respective file) press '&' to start a shell command
in the background. Command completion is the same as in

I had posted this long ago in Usenet but Google does not find it any more



reply via email to

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