all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Torben Knudsen <tk@es.aau.dk>
To: help-gnu-emacs@gnu.org
Subject: Re: dired-do-shell-command as "bash program"
Date: Fri, 16 May 2008 08:15:39 +0200	[thread overview]
Message-ID: <87ej82vkok.fsf@es.aau.dk> (raw)
In-Reply-To: wtpd4npcmps.fsf@storch.mchp.siemens.de

>>>>> "Josef" == Josef Bauer NOSPAM <Josef.Bauer.NOSPAM@web.de> writes:

I think the below function should be part of emacs somehow
 
Rodrigo> http://www.jgk.org/src/background.el

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.

Josef> Hi,

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

Josef> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

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

Josef> (add-hook 'dired-load-hook (function (lambda () (load
Josef> "dired-x") (define-key dired-mode-map "&"
Josef> 'dired-do-shell-command-in-background))))

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

Josef> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


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

Josef> I had posted this long ago in Usenet but Google does not find
Josef> it any more :-(

Josef> Greetings

Josef> Josef

-- 
Associate Prof. Ph.D Torben Knudsen	Mobile	: (+45) 2787 9826
Section of Automation and Control,	Email	: tk@es.aau.dk   
Department of Electronic Systems,	
Aalborg University 
Fredrik Bajersvej 7 
DK-9220 Aalborg Ø
Denmark 


      parent reply	other threads:[~2008-05-16  6:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-09  6:37 dired-do-shell-command as "bash program" Torben Knudsen
2008-05-09  7:06 ` David Hansen
2008-05-09 14:42 ` Rodrigo Lazo
     [not found] ` <mailman.11364.1210316908.18990.help-gnu-emacs@gnu.org>
2008-05-13  8:02   ` Torben Knudsen
2008-05-13 12:49     ` Kevin Rodgers
     [not found]     ` <mailman.11546.1210682964.18990.help-gnu-emacs@gnu.org>
2008-05-14  7:13       ` Torben Knudsen
     [not found] ` <mailman.11380.1210346409.18990.help-gnu-emacs@gnu.org>
2008-05-13  8:04   ` Torben Knudsen
2008-05-14  8:29     ` Josef.Bauer.NOSPAM
2008-05-16  6:12       ` Torben Knudsen
2008-05-16  6:15       ` Torben Knudsen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ej82vkok.fsf@es.aau.dk \
    --to=tk@es.aau.dk \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.