Emacs obviously can handle multiple asynchronous sub-processes, otherwise a multi-language programming environment like org-babel, to give an example, wouldn't be possible.
However, when I'm in Dired and start an asynchronous shell command to view a pdf file (& evince), and then try to do the same on a second pdf file, I get the following message:
"A command is running - kill it? Yes or No?"
Is there a way to run several asynchronous shell commands in parallel, when in Dired?
When you use dired-do-async-shell-command
Emacs create a *Async Shell Command*
buffer. If you want another async command you need to rename this buffer, for example using M-x rename-uniquely
you could try to change the comportment of dired-do-async-shell-command
by advising it:
(defadvice shell-command (after shell-in-new-buffer (command &optional output-buffer error-buffer))
(when (get-buffer "*Async Shell Command*")
(with-current-buffer "*Async Shell Command*"
(rename-uniquely))))
(ad-activate 'shell-command)
note that I really advice the shell-command Emacs command because it's called by dired.
I don't think it's possible with dired-do-async-shell-command
, but if you just want to open some file is certain external application I suggest using OpenWith, which allows any number of external processes running.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With