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: Marius Hofert
Subject: Re: How to suppress/avoid *Async Shell Command* buffer?
Date: Sat, 18 May 2013 20:52:14 +0200
User-agent: mu4e 0.9.9.5; emacs 24.3.50.1

Hongxu Chen writes:

> 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

This is indeed interesting, thanks a lot. Both approaches use
'start-process' (which seems good). The approach by Lee seems to be
fine. It calls xdg-open.

I tried with "!" -> "xdg-open ?" and it opens foo.pdf externally (in a
persistent way), but emacs is blocked. However, when I use 'xdg-open ?
&' then *Messages* says "xdg-open rank.pdf: finished." but nothing is
opened. ... Do you know why?  Was just wondering...

>
> Hope these would be helpful.

Indeed, many thanks!

Cheers,

Marius

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



reply via email to

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