From: William Xu <william.xwl@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: emacs waiting for external program to exit
Date: Thu, 13 Sep 2007 17:51:32 +0900 [thread overview]
Message-ID: <87abrrx817.fsf@gmail.com> (raw)
In-Reply-To: m28x7cb8i2.fsf@cam.ac.uk
Leo <sdl.web@gmail.com> writes:
> If I open a .pdf file in dired with evince, Emacs is frozen until that
> program exits.
>
> Is there anyway I can't avoid that i.e. I'd like to be able to continue
> using the same Emacs session?
Just redefining `dired-run-shell-command' by replacing shell-command
works for me.
,----
| (require 'dired-aux)
|
| (defun xwl-shell-command-asynchronously (cmd)
| (start-process-shell-command cmd nil cmd))
|
| ;; Run shell command at background
| (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)))
| (xwl-shell-command-asynchronously command))) ; xwl
| ;; Return nil for sake of nconc in dired-bunch-files.
| nil)
`----
--
William
next prev parent reply other threads:[~2007-09-13 8:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-12 8:20 emacs waiting for external program to exit Leo
2007-09-12 8:58 ` Peter Dyballa
2007-09-12 9:33 ` Leo
2007-09-12 10:15 ` Peter Dyballa
[not found] ` <mailman.749.1189589698.18990.help-gnu-emacs@gnu.org>
2007-09-13 15:28 ` Thien-Thi Nguyen
2007-09-13 16:04 ` Leo
[not found] ` <mailman.746.1189587514.18990.help-gnu-emacs@gnu.org>
2007-09-12 21:36 ` Fabian Braennstroem
2007-09-13 8:51 ` William Xu [this message]
2007-10-06 8:28 ` Leo
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=87abrrx817.fsf@gmail.com \
--to=william.xwl@gmail.com \
--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.