From: Marius Hofert <marius.hofert@math.ethz.ch>
To: "Hongxu Chen" <leftcopy.chx@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: How to suppress/avoid *Async Shell Command* buffer?
Date: Sat, 18 May 2013 20:52:14 +0200 [thread overview]
Message-ID: <87r4h4azoh.fsf@math.ethz.ch> (raw)
In-Reply-To: <87li7c1he8.fsf@gmail.com>
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
>>>>
>>
>>
next prev parent reply other threads:[~2013-05-18 18:52 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-18 10:05 How to suppress/avoid *Async Shell Command* buffer? Marius Hofert
2013-05-18 12:47 ` Andreas Röhler
2013-05-18 13:58 ` Marius Hofert
2013-05-18 14:33 ` Andreas Röhler
2013-05-18 14:37 ` Marius Hofert
2013-05-18 17:13 ` Andreas Röhler
2013-05-18 18:03 ` Marius Hofert
2013-05-18 18:58 ` Andreas Röhler
[not found] ` <mailman.41.1368897044.22516.help-gnu-emacs@gnu.org>
2013-05-18 17:48 ` Barry Margolin
2013-05-18 21:19 ` Marius Hofert
2013-05-18 14:39 ` Hongxu Chen
2013-05-18 18:52 ` Marius Hofert [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-05-18 0:03 Marius Hofert
2013-05-18 8:48 ` Andreas Röhler
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r4h4azoh.fsf@math.ethz.ch \
--to=marius.hofert@math.ethz.ch \
--cc=help-gnu-emacs@gnu.org \
--cc=leftcopy.chx@gmail.com \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).