help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to suppress/avoid *Async Shell Command* buffer?


From: Hongxu Chen
Subject: Re: How to suppress/avoid *Async Shell Command* buffer?
Date: Sat, 18 May 2013 22:39:43 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

There is a tool called `openwith' that might meet your needs; you might
see this page for details:
http://www.emacswiki.org/emacs/OpenWith
It is available in elpa but I recommend that you customize the external
apps yourself.

Also Lee Xah has written a snippet for this issue, and you can just map
some key.
http://ergoemacs.org/emacs/emacs_dired_open_file_in_ext_apps.html

Hope these would be helpful.

Marius Hofert <marius.hofert@math.ethz.ch> writes:

> Andreas Röhler writes:
>
>> Am 18.05.2013 12:05, schrieb Marius Hofert:
>>> Hi Andreas,
>>>
>>> Thanks a lot for helping.
>>>
>>> The purpose is simply for opening them (asynchronously), viewing the pdf
>>
>> Hmm, probably don't understand yet, what is the difference WRT RET 
>> --dired-find-file-- ?
>
> dired-find-file opens it *in Emacs*. I can't edit it then and it's also
> a bit slow.
>
> I would like to open the file with *Okular* from Emacs.
>
>>
>>> (continuing to work in Emacs), (maybe add annotations to the pdf and save
>>> it).
>>>
>>
>> which would mean edit, not just view the pdf(?)
>
> yes.
>
> Maybe I wasn't clear. You can use "!" in dired mode to execute commands
> on the file at point. I use that to call Okular to open the file
> (in Okular; standalone). The same happens when I cd in the terminal to
> the directory containing the pdf file, then type 'okular foo.pdf &', but
> that's more tedious of course (also, it exits Okular if I quit the
> terminal -- which does not happen if I start it from dired-mode).
>
>>
>>
>>
>>> I use 'dired-mode' as 'file manager' and often would like to open and view
>>> pdfs in Okular. I also have other 'dired-guess-shell-alist-user' settings
>>> like opening pngs in eog or mp3s in VLC. But everytime I open a file, I get
>>> this annoying *Async Shell Command* buffer (either empty or with debug
>>> output) and I have to manually close it via C-x 0 etc. to get rid of it.
>>
>>
>> Please give an example of the shell-command used than.
>
> Due to my settings for dired-guess-shell-alist-user (as posted), I
> receive the suggestion 'okular ? &' when hitting '!' with the point on
> the pdf file. This executes "okular foo.pdf &" in the background (as far
> as I know), where 'foo.pdf' is the pdf file at point. Hitting RET starts
> Okular, opens foo.pdf (great), but also opens the *Async Shell Command*
> buffer in Emacs (as described; not so great).
>
> Cheers,
>
> Marius
>
>>
>>   I
>>> know that it might contain useful information sometimes and I wouldn't be
>>> against it appearing hidden (in the buffer list). But being distracted by
>>> this buffer in dired-mode is really unpleasant. If I only knew more emacs
>>> lisp...
>>>
>>
>>
>> Let's see how it comes out in this case.
>>
>> Andreas
>>
>>> Cheers,
>>>
>>> Marius
>>>
>
>

-- 
Regards,
Hongxu Chen



reply via email to

[Prev in Thread] Current Thread [Next in Thread]