[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: emacs waiting for external program to exit
From: |
Leo |
Subject: |
Re: emacs waiting for external program to exit |
Date: |
Sat, 06 Oct 2007 09:28:19 +0100 |
User-agent: |
Gnus/5.110007 Emacs/23.0.50 (20070922) Fedora 7 (gnu/linux) |
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 in Thread] |
Current Thread |
[Next in Thread] |
- Re: emacs waiting for external program to exit,
Leo <=