[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dired shell command on background
From: |
Josef . Bauer . NOSPAM |
Subject: |
Re: dired shell command on background |
Date: |
16 May 2006 13:34:38 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 |
rodrigo> I've seen something called
rodrigo> dired-do-background-shell-command on some pages about
rodrigo> tree-dired but I have no idea what it is about
Here 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."
(interactive
(list (dired-read-shell-command (concat "& on " "%s: ") nil (list
(dired-get-filename)))))
(call-process command nil 0 nil (dired-get-filename)))
(add-hook 'dired-load-hook
(function (lambda ()
(load "dired-x")
(define-key dired-mode-map "&"
'dired-do-shell-command-in-background))))
(setq dired-guess-shell-alist-user
(list (list "\\.wav$" "snack") (list "\\.au$" "snack") (list "\\.pdf$"
"acroread")
(list "\\.doc$" "OOo" ) (list "\\.xls$" "OOo")))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Once in dired-mode over e.g. a PDF file press '&' and proceed.
Regards
Josef