From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Joe Corneli Newsgroups: gmane.emacs.bugs Subject: bug#18326: 24.4.50; allow-no-window for async-shell-command in temp buffer Date: Tue, 26 Aug 2014 23:59:29 +0100 Message-ID: References: <8738cl20nz.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1409094028 25356 80.91.229.3 (26 Aug 2014 23:00:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 26 Aug 2014 23:00:28 +0000 (UTC) Cc: 18326@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Aug 27 01:00:21 2014 Return-path: Envelope-to: geb-bug-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 1XMPiv-0003hP-BO for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Aug 2014 01:00:21 +0200 Original-Received: from localhost ([::1]:55930 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMPiu-0003J9-W4 for geb-bug-gnu-emacs@m.gmane.org; Tue, 26 Aug 2014 19:00:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34316) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMPil-0003Hi-Ju for bug-gnu-emacs@gnu.org; Tue, 26 Aug 2014 19:00:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XMPif-0003lt-AM for bug-gnu-emacs@gnu.org; Tue, 26 Aug 2014 19:00:11 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45867) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMPif-0003kN-2f for bug-gnu-emacs@gnu.org; Tue, 26 Aug 2014 19:00:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XMPie-0004eT-0J for bug-gnu-emacs@gnu.org; Tue, 26 Aug 2014 19:00:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Joe Corneli Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 26 Aug 2014 23:00:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18326 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18326-submit@debbugs.gnu.org id=B18326.140909397817816 (code B ref 18326); Tue, 26 Aug 2014 23:00:03 +0000 Original-Received: (at 18326) by debbugs.gnu.org; 26 Aug 2014 22:59:38 +0000 Original-Received: from localhost ([127.0.0.1]:52810 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XMPiD-0004dI-HG for submit@debbugs.gnu.org; Tue, 26 Aug 2014 18:59:38 -0400 Original-Received: from mail-oi0-f48.google.com ([209.85.218.48]:59317) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XMPiB-0004d3-2X for 18326@debbugs.gnu.org; Tue, 26 Aug 2014 18:59:35 -0400 Original-Received: by mail-oi0-f48.google.com with SMTP id v63so2249837oia.7 for <18326@debbugs.gnu.org>; Tue, 26 Aug 2014 15:59:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=//2j2pnItVP/UxeXdM8Hhuti+GvXibQPrxnCPB9O+8M=; b=RxWLpQ7vsT+0IwP00+XQ1fFo1oB3Z73nqrnv4P1DOBLJ0n05ncVKKvusVkQsm1H1Bc lv1vy6MY/3uOJYDs1fmfo9uzsq38TcP/bxhNKl7gJhRUJNvuyImqn2nVnNLzSpvDAB/v PT7rT0eqSNV/iuba50zBTG6nmdBgdxMylAC7vlWb70Rpwk/T4EeVC/+T85DSmsxS0IZS vbkrjnywR9FfVdofZWKGRk3hj592YqhFKQ+1ZkFL1mLVTz9dHV2RUnsqBuJH6tlijlxH Osmm+R4iBMlGjmlRw33pmAxoC9zZ47PktuMHYenqyl77y/IFxXrfPJpUFme/GEnTak7A gMDw== X-Received: by 10.60.156.198 with SMTP id wg6mr12150965oeb.69.1409093969196; Tue, 26 Aug 2014 15:59:29 -0700 (PDT) Original-Received: by 10.182.4.146 with HTTP; Tue, 26 Aug 2014 15:59:29 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:92692 Archived-At: Hi Stefan: I tried this: (setq display-buffer-alist '(("\\*Async Shell Command\\*" . (display-buffer-no-window . nil)))) (defun sudo-shell-command (command) (interactive "MShell command (root): ") (with-temp-buffer (cd "/sudo::/") (async-shell-command command))) (sudo-shell-command "touch /dev/null") The buffer still pops up. The docs say: (async-shell-command COMMAND &optional OUTPUT-BUFFER ERROR-BUFFER) [...] To run COMMAND without displaying the output in a window you can configure `display-buffer-alist' to use the action `display-buffer-no-window' for the buffer `*Async Shell Command*'. OK, would be be able to tell me how I do that? It seems that I've now tried two seemingly sensible ways to do this configuration, and the docs led me to the previous configuration, and not clearly to anything else. display-buffer-alist is a variable defined in `window.el'. [...] This is a list of elements (CONDITION . ACTION), where: CONDITION is either a regexp matching buffer names, or a function that takes two arguments - a buffer name and the ACTION argument of `display-buffer' - and returns a boolean. ACTION is a cons cell (FUNCTION . ALIST), where FUNCTION is a function or a list of functions. Each such function should accept two arguments: a buffer to display and an alist of the same form as ALIST. See `display-buffer' for details. (display-buffer-no-window BUFFER ALIST) [...] Display BUFFER in no window. If ALIST has a non-nil `allow-no-window' entry, then don't display a window at all.