Multiple asynchronous shell commands in Emacs-Dired?

Emacs can obviously handle several asynchronous subprocesses, otherwise a multilingual programming environment such as org-babel would not be possible to give an example.

However, when I am in Dired and run the asynchronous shell command to view the pdf file (& evince), and then try to do the same in the second pdf file, I get the following message:

"The team is running - kill her? Yes or No?"

Is there a way to run multiple asynchronous shell commands in parallel when in Dired?

+5
source share
3 answers

, dired-do-async-shell-command, - , , OpenWith, .

+2

dired-do-async-shell-command Emacs *Async Shell Command*. async, , , M-x rename-uniquely

dired-do-async-shell-command, :

 (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)

, Emacs shell-command, .

+11

, dired-run-shell-command, shell:

(defun dired-run-shell-command (command)
       (let ((handler
          (find-file-name-handler (directory-file-name default-directory)
                      'shell-command)))
     (if handler (apply handler 'shell-command (list command))
       (shell-command command
              (generate-new-buffer-name
               (concat "*Shell Command Output: '" command "'*")))))
       ;; Return nil for sake of nconc in dired-bunch-files.
       nil)
0

All Articles