From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Hongxu Chen Newsgroups: gmane.emacs.help Subject: Re: How to suppress/avoid *Async Shell Command* buffer? Date: Sat, 18 May 2013 22:39:43 +0800 Message-ID: <87li7c1he8.fsf@gmail.com> References: <5197784A.1020500@easy-emacs.de> <87sj1ktmnq.fsf@math.ethz.ch> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1368888012 31432 80.91.229.3 (18 May 2013 14:40:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 18 May 2013 14:40:12 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Marius Hofert Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat May 18 16:40:11 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UdiIt-0000Pr-4b for geh-help-gnu-emacs@m.gmane.org; Sat, 18 May 2013 16:40:11 +0200 Original-Received: from localhost ([::1]:51048 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UdiIs-0007v8-Nz for geh-help-gnu-emacs@m.gmane.org; Sat, 18 May 2013 10:40:10 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:58443) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UdiId-0007mQ-OO for help-gnu-emacs@gnu.org; Sat, 18 May 2013 10:40:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UdiIa-0004cG-6x for help-gnu-emacs@gnu.org; Sat, 18 May 2013 10:39:55 -0400 Original-Received: from mail-pb0-x22a.google.com ([2607:f8b0:400e:c01::22a]:44352) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UdiIZ-0004c7-VS for help-gnu-emacs@gnu.org; Sat, 18 May 2013 10:39:52 -0400 Original-Received: by mail-pb0-f42.google.com with SMTP id up7so4144910pbc.15 for ; Sat, 18 May 2013 07:39:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type :content-transfer-encoding; bh=Krrlb5McM4v4g88nF4da520yY+APLh1zbhAAANYsxrc=; b=WMs9AALK6O2xStu8RJ9nGXdqSriujS/Mrn3u7AkrLaR6qwjHwDavygwhoclttjrAti NgiyE/+nJyTxaX3OOVNGjN1VG7pPGD6u/X8J1AgzltS1axO27UN5Y+EQVey74O6OZKsb DW6Wl/EqRXk9E9kPbhx9F6YQiC3NZXeGU3Dt71Dco7AK3TPXRpdAYkO70PfKsnAEGpu+ +ozoLZ+4iWpAuT/bwhjH5KU2dYrVnTEiz1y7SzKrCM9jdluTIL2fN6hwg5ydUCMM/Iqq 1SpciSboCN8AT8bnlsxgq4Ytv8JCojexAkaezsP7WS6YshXbD0uxzyu9O2e8gcUXp63k 6/Rg== X-Received: by 10.66.155.39 with SMTP id vt7mr52832201pab.99.1368887990515; Sat, 18 May 2013 07:39:50 -0700 (PDT) Original-Received: from nonoobPC.STAP ([123.151.32.162]) by mx.google.com with ESMTPSA id fp2sm15863732pbb.36.2013.05.18.07.39.47 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 18 May 2013 07:39:49 -0700 (PDT) In-Reply-To: <87sj1ktmnq.fsf@math.ethz.ch> (Marius Hofert's message of "Sat, 18 May 2013 15:58:33 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c01::22a X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:90897 Archived-At: 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 writes: > Andreas R=C3=B6hler 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 --dir= ed-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 sa= ve >>> 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 v= iew >>> pdfs in Okular. I also have other 'dired-guess-shell-alist-user' settin= gs >>> 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 ema= cs >>> lisp... >>> >> >> >> Let's see how it comes out in this case. >> >> Andreas >> >>> Cheers, >>> >>> Marius >>> > > --=20 Regards, Hongxu Chen