From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marius Hofert Newsgroups: gmane.emacs.help Subject: Re: How to suppress/avoid *Async Shell Command* buffer? Date: Sat, 18 May 2013 20:03:57 +0200 Message-ID: <87sj1kb1wy.fsf@math.ethz.ch> References: <5197784A.1020500@easy-emacs.de> <87sj1ktmnq.fsf@math.ethz.ch> <5197913E.1010702@easy-emacs.de> <87mwrstku1.fsf@math.ethz.ch> <5197B6A8.7070305@easy-emacs.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1368900261 13820 80.91.229.3 (18 May 2013 18:04:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 18 May 2013 18:04:21 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: =?utf-8?Q?Andreas_R=C3=B6hler?= Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat May 18 20:04:19 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 1UdlUQ-0000my-RL for geh-help-gnu-emacs@m.gmane.org; Sat, 18 May 2013 20:04:18 +0200 Original-Received: from localhost ([::1]:54619 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UdlUQ-0002ue-9W for geh-help-gnu-emacs@m.gmane.org; Sat, 18 May 2013 14:04:18 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:60444) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UdlUC-0002uF-J1 for help-gnu-emacs@gnu.org; Sat, 18 May 2013 14:04:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UdlUA-0000Sf-37 for help-gnu-emacs@gnu.org; Sat, 18 May 2013 14:04:04 -0400 Original-Received: from mail-wi0-x232.google.com ([2a00:1450:400c:c05::232]:63963) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UdlU9-0000SU-SU for help-gnu-emacs@gnu.org; Sat, 18 May 2013 14:04:02 -0400 Original-Received: by mail-wi0-f178.google.com with SMTP id ey16so1093762wid.17 for ; Sat, 18 May 2013 11:04:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:user-agent:in-reply-to:date :message-id:mime-version:content-type:content-transfer-encoding; bh=lVwO8oaiCGuJkHTy0xXjxU5pgwbOoacJ2unMFhSsxXQ=; b=l2ka8dDec272whnaI+hWb+qXj4V4KLotKU+hgrFnKp2V38ECFHRvQE6HDqJDIORX+7 n7KiL6ydjDdhi12RhwAV8FtW0d1zidtruY5vN95poRmkJK6T1MkidqeRaMMzLz1zv7hH lc7LL4odwMelf/3qyca8fSf2wfEoTwmGyFPzoaQSuaHbJCW0qb11IbWBSaIGaAX3NCy8 VJn7PyneTiTYCPXeSn2keL+yApENxWPQ1oFF1bsvkHKJA+Mw980tyRob3DYrp+iGaqXq vO85duKJCK/nWm0gP7tAuZyyJ+GO4WBbCKTnW4n4z1rOQWqyo7UMmqrumMNmC1CmaUY0 Tm8Q== X-Received: by 10.180.79.69 with SMTP id h5mr3245578wix.14.1368900241068; Sat, 18 May 2013 11:04:01 -0700 (PDT) Original-Received: from sklar (178-83-94-113.dynamic.hispeed.ch. [178.83.94.113]) by mx.google.com with ESMTPSA id d5sm4144602wic.1.2013.05.18.11.03.59 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 18 May 2013 11:04:00 -0700 (PDT) User-agent: mu4e 0.9.9.5; emacs 24.3.50.1 In-reply-to: <5197B6A8.7070305@easy-emacs.de> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::232 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:90905 Archived-At: Andreas Röhler writes: > Am 18.05.2013 16:37, schrieb Marius Hofert: >> Hi Andreas, >> >> what do you mean by 'caused'? >> >> The question mark is a place holder for the file (foo.pdf). > > Okay, see dired-do-shell-command reads it > >> What does this have to do with *Async Shell Command* being opened? >> > > Nothing. It's the ampersand following ? which matters. Yes, this runs the command *asynchronously* (that's where the name of the annoying buffer comes from). If not run asynchronously (i.e., if run without ampersand), emacs is blocked. Also, closing emacs closes the external application, too. Both behaviors I find strange / are undesirable. > >> Note: The behavior of "!" on foo.pdf in dired mode is fine (in the sense >> that Okular opens, the pdf is shown, everything asynchronously), I just want >> to avoid the buffer *Async Shell Command* being opened. >> > > Which seems the buffer Emacs connects the process to. > Deleting it should end the processes, probably not a good idea. When run asynchronously, closing emacs does *not* close the external application. I like this behavior very much. > > > So the ampersand seems the culprit - not the question mark. > What happens when calling your stuff without it? Then no buffer is open (which was clear since the command is not run asynchronously). The question is how to avoid the buffer being opened *when* using the command asynchronously. I currently do some testing with the suggestions of Hongxu. I reply later. Cheers, Marius > > > Andreas > >> Let me know if anything isn't clear. >> >> Cheers, >> >> Marius >> >> >> >> Andreas Röhler writes: >> >>> Am 18.05.2013 15:58, schrieb Marius Hofert: >>> >>>> >>>> >>> Looks like caused by the question mark after okular >>> >>> (("\\.\\(?:pdf\\|djvu\\|jp?g\\)\\'" "okular ? &") >> >>