From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Josef.Bauer.NOSPAM@web.de Newsgroups: gmane.emacs.help Subject: Re: Dired shell command on file asymchronously Date: 24 Jun 2005 19:43:34 +0200 Organization: Linux Private Site Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1119634721 13995 80.91.229.2 (24 Jun 2005 17:38:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 24 Jun 2005 17:38:41 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jun 24 19:38:41 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Dls7v-0007yc-0C for geh-help-gnu-emacs@m.gmane.org; Fri, 24 Jun 2005 19:38:03 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DlsEz-0006Qe-9G for geh-help-gnu-emacs@m.gmane.org; Fri, 24 Jun 2005 13:45:21 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!news-fra1.dfn.de!news0.de.colt.net!newsfeed1.sbs.de!news.mch.sbs.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 27 Original-NNTP-Posting-Host: uhu.mchp.siemens.de Original-X-Trace: news.mch.sbs.de 1119635014 28937 139.23.202.29 (24 Jun 2005 17:43:34 GMT) Original-X-Complaints-To: abuse@siemens.de Original-NNTP-Posting-Date: Fri, 24 Jun 2005 17:43:34 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 Original-Xref: shelby.stanford.edu gnu.emacs.help:132164 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:27639 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:27639 Hi, I just found that I added a minor improvement in the meantime. Using 'shell-quote-argument' file names with spaces and such are working. Here is the new version: ;----------------------------------------------------------------- (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 (shell-quote-argument (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 "\\.doc$" "OOo" ) (list "\\.xls$" "OOo"))) ;----------------------------------------------------------------- Greetings Josef