From: Leo <sdl.web@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: emacs waiting for external program to exit
Date: Sat, 06 Oct 2007 09:28:19 +0100 [thread overview]
Message-ID: <m2fy0o3avw.fsf@cam.ac.uk> (raw)
In-Reply-To: 87abrrx817.fsf@gmail.com
On 2007-09-13 09:51 +0100, William Xu wrote:
> 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)
> `----
Thanks! I just re-define dired-run-shell-command in my .emacs
--
.: Leo :. [ sdl.web AT gmail.com ] .: [ GPG Key: 9283AA3F ] :.
Use the most powerful email client -- http://gnus.org/
prev parent reply other threads:[~2007-10-06 8:28 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
2007-10-06 8:28 ` Leo [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=m2fy0o3avw.fsf@cam.ac.uk \
--to=sdl.web@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.