From unknown Mon Aug 18 02:36:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#64394: [PATCH] Fix `async-shell-command-display-buffer' display Resent-From: Eliza Velasquez Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 01 Jul 2023 01:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 64394 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 64394@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.168817324829102 (code B ref -1); Sat, 01 Jul 2023 01:01:02 +0000 Received: (at submit) by debbugs.gnu.org; 1 Jul 2023 01:00:48 +0000 Received: from localhost ([127.0.0.1]:56030 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFOym-0007ZJ-Ca for submit@debbugs.gnu.org; Fri, 30 Jun 2023 21:00:48 -0400 Received: from lists.gnu.org ([209.51.188.17]:34812) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFOyj-0007ZA-3Q for submit@debbugs.gnu.org; Fri, 30 Jun 2023 21:00:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qFOyi-0001UW-LF for bug-gnu-emacs@gnu.org; Fri, 30 Jun 2023 21:00:44 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qFOyf-0003V2-R4 for bug-gnu-emacs@gnu.org; Fri, 30 Jun 2023 21:00:44 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id DFF745C018F for ; Fri, 30 Jun 2023 21:00:39 -0400 (EDT) Received: from imap48 ([10.202.2.98]) by compute5.internal (MEProxy); Fri, 30 Jun 2023 21:00:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eliza.sh; h=cc :content-type:content-type:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:sender:subject:subject:to:to; s=fm3; t=1688173239; x=1688259639; bh=TTljN+xRo0gwBvwEG+Z1IA+F1 VNhN5xJaA+DPUOtyPg=; b=dW8eDZfJrR9uYzOo20bqffEcgmUh35OCbLrqKrNJ7 aYVTU2fdM1h7kX6brdNNz5d3g5Uy/CM8hUlvYlvo0efjqDjdyosHRTHPjqQE8Lak /R8G9EtMnZ99Zbj86V0ZFJfDlOXPPGcqSxLIBIpVP9EodJDqwOCrDBhCbz+nBJCd ZRGbzdxkLBqjKiNl4P4M++e1ByQ3CSoHKtkea4CZS0uygeIzcSzKFnWAp5SxCUMy XuMwReusODXtYmzcXg8GXJDl8LTBGulft78H24Q4UBVD7i8R8i3RYEuGa1BX175O BLHZRCKvrqizkcBGDGSytyFsXUxO0/OlaOYDwUpCQbOlA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1688173239; x=1688259639; bh=TTljN+xRo0gwBvwEG+Z1IA+F1VNhN5xJaA+ DPUOtyPg=; b=Jjm4jXhJd0EP0I+Ms+yBIR9rtLL3y5fivGIQIOSsBhrHdATk7bU LGaVyNXXtCgQYCTRNqOZ2Fyk7N62wvxbn3Zrrg2E8ry4phg+AfK8Jqmt7PP2tqBe RRtKVj2D3QJ63rlxgCGUW/ThVjUzj1KVmMtJWvhwVKIpcvdSzNDgwmOFjKEVwAHB 7HlRTgWLzXqOJ9CJqNIooqBYgXBhZzXHHt4wg2JkibRjljr/v9zKO7xe+WYhjWn7 BjozJhsgIcONZ9nbk7x4gYdmFMN6BAPXW2gS81crV8v9HCKk3cuofP46qiDMUaq1 R+/hE7bK1NrDMy7u18SYEU1NhkQo6w8txxg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrtdejgdegtdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepoffhvffufffkgggtsehmtderreertd dtnecuhfhrohhmpefglhhiiigrucggvghlrghsqhhuvgiiuceovghlihiirgesvghlihii rgdrshhhqeenucggtffrrghtthgvrhhnpedtkefgjeejkedtiefhgeegueegtdejgefgfe dvfeeiuefguefhudeggeevheelheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgr mhepmhgrihhlfhhrohhmpegvlhhiiigrsegvlhhiiigrrdhshh X-ME-Proxy: Feedback-ID: i87c446d8:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 9DE6F31A0063; Fri, 30 Jun 2023 21:00:39 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface From: Eliza Velasquez Date: Fri, 30 Jun 2023 18:00:33 -0700 Message-ID: <873528cuoe.fsf@eliza.sh> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=66.111.4.29; envelope-from=eliza@eliza.sh; helo=out5-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.6 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) --=-=-= Content-Type: text/plain Tags: patch If `async-shell-command-display-buffer' was nil, it did not respect `display-buffer-alist' entries with `display-buffer-no-window'. This behavior has been fixed. For example, I never want to see any shell command buffers with no output, and I also never want to see any shell command buffers named `*shell:mpv*'. It seems possible to me, but very unlikely, that someone was depending on the existing behavior in some way. I can imagine an alternate version of this patch that instead adds a new possible value to `async-shell-command-display-buffer', but this seems like a clear bug to me. I will defer to the judgement of someone more senior on this. In GNU Emacs 29.0.92 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.16.0) Windowing system distributor 'The X.Org Foundation', version 11.0.12101008 System Description: NixOS 23.05 (Stoat) Configured using: 'configure --prefix=/nix/store/vc9yalw7cbbk21406nx5vb94k5rb5h4k-emacs-gtk3-29.0.92 --disable-build-details --with-modules --with-x-toolkit=gtk3 --with-xft --with-cairo --with-native-compilation --with-tree-sitter --with-xinput2 --with-xwidgets' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Fix-async-shell-command-display-buffer-display.patch >From 0a6c0268f7f304d051201b024ad27f50f8682e45 Mon Sep 17 00:00:00 2001 From: Eliza Velasquez Date: Fri, 30 Jun 2023 17:35:44 -0700 Subject: [PATCH] Fix `async-shell-command-display-buffer' display If `async-shell-command-display-buffer' was nil, it did not respect `display-buffer-alist' entries with `display-buffer-no-window'. This behavior has been fixed. --- lisp/simple.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/simple.el b/lisp/simple.el index 646da8aafaa..7b382c512b6 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -4734,7 +4734,7 @@ shell-command (when (buffer-live-p buf) (remove-function (process-filter proc) nonce) - (display-buffer buf)))) + (display-buffer buf '(nil (allow-no-window . t)))))) `((name . ,nonce))))))) ;; Otherwise, command is executed synchronously. (shell-command-on-region (point) (point) command -- 2.40.1 --=-=-= Content-Type: text/plain -- Eliza --=-=-=-- From unknown Mon Aug 18 02:36:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#64394: [PATCH] Fix `async-shell-command-display-buffer' display Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 01 Jul 2023 07:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64394 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eliza Velasquez , martin rudalics Cc: 64394@debbugs.gnu.org Received: via spool by 64394-submit@debbugs.gnu.org id=B64394.16881962214232 (code B ref 64394); Sat, 01 Jul 2023 07:24:01 +0000 Received: (at 64394) by debbugs.gnu.org; 1 Jul 2023 07:23:41 +0000 Received: from localhost ([127.0.0.1]:56355 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFUxJ-00016B-Cx for submit@debbugs.gnu.org; Sat, 01 Jul 2023 03:23:41 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57794) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFUxI-000160-5o for 64394@debbugs.gnu.org; Sat, 01 Jul 2023 03:23:40 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qFUxC-0000xi-Ep; Sat, 01 Jul 2023 03:23:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=joD4OYCoo3pXNZRAbn3hKdpKTkzeC1W1JX0zc2LzP7o=; b=b5Uk5IutyU3J 8olWPvktm2wLT6IprT3+Y7oCzJ9pIQLoeAVd+d3n3Y4c4Z5GqC1+y13IeEvDTqnyXXL12Z7k6st+H aIGJxwYlq9AD85xkPi8qWXXw88W4/srXdDOYl/V+tcP8tKObqd5y6CeU2Zb7wSugcq5YKy77yD2dr 87QZGtDyVu4VK9P5EaPtzRE3v7GB92LqWmVLvYr1dsX2cSIhPV9whycD8PfT1mb6kzlzJ2HfeHlHc 2JWUpVVGulnlEevznDGa65Jt8Rh4zB8kbkZs8Un008Hdv2XlONYZtrAFKuIL3FAQfIpPvrZ/85LYZ vppOc40BUJ0pvqy013wwbA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qFUxB-0000e1-VR; Sat, 01 Jul 2023 03:23:34 -0400 Date: Sat, 01 Jul 2023 10:24:05 +0300 Message-Id: <833528rt62.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <873528cuoe.fsf@eliza.sh> (message from Eliza Velasquez on Fri, 30 Jun 2023 18:00:33 -0700) References: <873528cuoe.fsf@eliza.sh> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Eliza Velasquez > Date: Fri, 30 Jun 2023 18:00:33 -0700 > > If `async-shell-command-display-buffer' was nil, it did not respect > `display-buffer-alist' entries with `display-buffer-no-window'. This > behavior has been fixed. I'm probably missing something, but how can display-buffer fail to support any action function, such as display-buffer-no-window? Martin, what am I missing here? > For example, I never want to see any shell command buffers with no > output, and I also never want to see any shell command buffers named > `*shell:mpv*'. That's fine, but those are your preferences. I'd feel uncomfortable with forcing them on everyone, if we already have a way of tailoring this behavior by user customizations. From unknown Mon Aug 18 02:36:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#64394: [PATCH] Fix `async-shell-command-display-buffer' display Resent-From: Eliza Velasquez Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 01 Jul 2023 07:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64394 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii , martin rudalics Cc: 64394@debbugs.gnu.org Received: via spool by 64394-submit@debbugs.gnu.org id=B64394.16881979677184 (code B ref 64394); Sat, 01 Jul 2023 07:53:01 +0000 Received: (at 64394) by debbugs.gnu.org; 1 Jul 2023 07:52:47 +0000 Received: from localhost ([127.0.0.1]:56380 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFVPS-0001ro-KP for submit@debbugs.gnu.org; Sat, 01 Jul 2023 03:52:46 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:48449) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFVPR-0001rb-36 for 64394@debbugs.gnu.org; Sat, 01 Jul 2023 03:52:45 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id E3FE85C0176; Sat, 1 Jul 2023 03:52:39 -0400 (EDT) Received: from imap48 ([10.202.2.98]) by compute5.internal (MEProxy); Sat, 01 Jul 2023 03:52:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eliza.sh; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; t=1688197959; x=1688284359; bh=BJ ShTjxsIu+uwqLpEVSmyTpkbGN2Qt3hejlXDrAaaIg=; b=OyCwFSraYqUpiWRdsA jeWgPicsnbqN7z9BSwHIPaQVur/znPzcUgFXc3ZrYsKLhhzo0eG5oSwTGhaqeinR sofs5nOTYki8VkBFNs0Q5NV+jmGE6gGNf+f+Dqjlb5mOA07PR19SR+RXUGPtqtGL ZCmqT7L47Jqbv2WNt+zgCKiob9N+g9mHHq8AYeG6Q49CtheAc/yCbsIm6UwlPH4E Ir4SPph2RLKI9C3Kf/5FhVW8d3h8E1myoEs/qGIykpChSvmDgQM/cofEKaDcHisk q6WOStsDkAIMhERwNwoUiumtA5CiKJf9XOqrprzF5V744kYcam4DOWln4tOsLG7J TOCg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1688197959; x=1688284359; bh=BJShTjxsIu+uw qLpEVSmyTpkbGN2Qt3hejlXDrAaaIg=; b=WBcCal6VRND1Cack7C5IJIOulfnXj cwuvYOrv7Q556w3IE9SVTJBS/Mg0T6/LMHAMPG+UwVwN6T09975nnMYw9jhNaNTY 7KyqS8xJAdnPZLFveyno0NBU85IqAPYsnpZtlXvy3Lq+iDwa5aH5rZ7TLa1HcYmg gcG6pEE2q6vIoMKwghNVwKlcFR7jfHIuIWC7b5mMYCLscEWMH7X0BHGgZj1IYmkY gdYY0gNoUoXpq5GuJBasBFZMA8bXL80wy6VWuDxfDHw57UDpQ2hIqGuMsrmHKrAZ arEA2AMcvWScxT4ikW4JNEMlXi9A78vevU5zwa/2wzA8ylSheevyUiXNA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrtdejgdduvdefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepoffhvfevufgjfhffkfggtgesthdtredtredttdenucfhrhhomhepgfhlihii rgcugggvlhgrshhquhgviicuoegvlhhiiigrsegvlhhiiigrrdhshheqnecuggftrfgrth htvghrnhepfedukeekgeevueetiefhgefhieefteeljeeivdehheekjeffkeeltdduheei vdeunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepvg hlihiirgesvghlihiirgdrshhh X-ME-Proxy: Feedback-ID: i87c446d8:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 74B7431A0064; Sat, 1 Jul 2023 03:52:39 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface From: Eliza Velasquez In-Reply-To: <833528rt62.fsf@gnu.org> References: <873528cuoe.fsf@eliza.sh> <833528rt62.fsf@gnu.org> Date: Sat, 01 Jul 2023 00:52:32 -0700 Message-ID: <87h6qo6pbz.fsf@eliza.sh> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On Sat, Jul 01 2023 at 10:24 +03, Eli Zaretskii wrote: > I'm probably missing something, but how can display-buffer fail to > support any action function, such as display-buffer-no-window? > > Martin, what am I missing here? I was also confused. Based on the documentation for `display-buffer-no-window', it seems that callers are supposed to explicitly pass an `(allow-no-window . t)' cons pair when calling `display-buffer' as a signal that they can correctly handle a return value of nil. If it's absent, `display-buffer-no-window' seems to err on the side of caution, assume the caller can't handle nil, displays the window anyway, and returns it like all the other display functions. Technically it seems that you can add `(allow-no-window . t)' to `display-buffer-alist' to always force the buffer never to appear, but that doesn't seem at all like its intended use. > That's fine, but those are your preferences. I'd feel uncomfortable > with forcing them on everyone, if we already have a way of tailoring > this behavior by user customizations. I might not have been clear with what I meant here, sorry; I mean that in my own personal config, when I run `mpv', its output appears in a buffer named `*shell:mpv*' instead of `*Async Shell Command*', and I have an explicit entry for it in `display-buffer-alist' so that it doesn't appear via `display-buffer-no-window'. This was functioning well, except the moment I set `async-shell-command-display-buffer' to nil, the buffer displayed itself the moment mpv began to write to stdout. A minimally reproable example in `emacs -Q': --8<---------------cut here---------------start------------->8--- (setq display-buffer-alist '(("\\*Async Shell Command\\*" (display-buffer-no-window)))) (setq async-shell-command-display-buffer nil) --8<---------------cut here---------------end--------------->8--- `M-& echo foo RET' will unexpectedly show the `*Async Shell Command*' buffer. -- Eliza From unknown Mon Aug 18 02:36:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#64394: [PATCH] Fix `async-shell-command-display-buffer' display Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 01 Jul 2023 08:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64394 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eliza Velasquez Cc: rudalics@gmx.at, 64394@debbugs.gnu.org Received: via spool by 64394-submit@debbugs.gnu.org id=B64394.168819911118593 (code B ref 64394); Sat, 01 Jul 2023 08:12:02 +0000 Received: (at 64394) by debbugs.gnu.org; 1 Jul 2023 08:11:51 +0000 Received: from localhost ([127.0.0.1]:56402 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFVhu-0004pp-KO for submit@debbugs.gnu.org; Sat, 01 Jul 2023 04:11:50 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46604) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFVhs-0004pZ-HH for 64394@debbugs.gnu.org; Sat, 01 Jul 2023 04:11:49 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qFVhm-0000Nr-U5; Sat, 01 Jul 2023 04:11:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=J8annVI7tF8KUar07XoPeWD1RwVRadJIH2TjsT2b7YM=; b=HfqXi3buOrM0 OxutcOfi9VjGSK8iXniUBd5gB23JG14IBb5hIQSFiHqOVuaY4ceR/RtTizQmGokei3EYBygLyY9HI AcF3oEz/+xVwnqG1iQF6Z6CcL4Gfi6in5q7MaYWeTEJPxk4Cy63VZj/dLsVZr/CDnevDlK9e7qpz0 I+Q2lSoUMm1WC6zaLrbcIR+kJ9ocn19cCkVDKoP2mRcBCQG0ASM3my1Upu7LiFug+ec/cmXx8qemX nsfIXcgtMb9n3K2GfdnGoOwWNPkVGQK4iLjGpkeHeSLHO+cpTqiUoSIX2hvsb/TZc0OMjlomB/mVk 4Yf/lBeHdojpxaumXUJvKA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qFVhm-0000Gh-EY; Sat, 01 Jul 2023 04:11:42 -0400 Date: Sat, 01 Jul 2023 11:12:14 +0300 Message-Id: <83v8f4qcdd.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87h6qo6pbz.fsf@eliza.sh> (message from Eliza Velasquez on Sat, 01 Jul 2023 00:52:32 -0700) References: <873528cuoe.fsf@eliza.sh> <833528rt62.fsf@gnu.org> <87h6qo6pbz.fsf@eliza.sh> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Eliza Velasquez > Cc: 64394@debbugs.gnu.org > Date: Sat, 01 Jul 2023 00:52:32 -0700 > > I might not have been clear with what I meant here, sorry; I mean that > in my own personal config, when I run `mpv', its output appears in a > buffer named `*shell:mpv*' instead of `*Async Shell Command*', and I > have an explicit entry for it in `display-buffer-alist' so that it > doesn't appear via `display-buffer-no-window'. This was functioning > well, except the moment I set `async-shell-command-display-buffer' to > nil, the buffer displayed itself the moment mpv began to write to > stdout. But that's exactly what this variable is about, AFAIU: Whether to display the command buffer immediately. If t, display the buffer immediately; if nil, wait until there is output. Note the last part. So why do you think this behavior is a problem? From unknown Mon Aug 18 02:36:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#64394: [PATCH] Fix `async-shell-command-display-buffer' display Resent-From: Eliza Velasquez Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 01 Jul 2023 08:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64394 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: rudalics@gmx.at, 64394@debbugs.gnu.org Received: via spool by 64394-submit@debbugs.gnu.org id=B64394.168820098822122 (code B ref 64394); Sat, 01 Jul 2023 08:44:02 +0000 Received: (at 64394) by debbugs.gnu.org; 1 Jul 2023 08:43:08 +0000 Received: from localhost ([127.0.0.1]:56543 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFWCC-0005kk-EE for submit@debbugs.gnu.org; Sat, 01 Jul 2023 04:43:08 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:52563) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFWCB-0005kK-0y for 64394@debbugs.gnu.org; Sat, 01 Jul 2023 04:43:07 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id DD2FA5C019E; Sat, 1 Jul 2023 04:43:01 -0400 (EDT) Received: from imap48 ([10.202.2.98]) by compute5.internal (MEProxy); Sat, 01 Jul 2023 04:43:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eliza.sh; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; t=1688200981; x=1688287381; bh=S4 vk7+aPl12LxTCiCKZsAu3/gxbDd99YydcX0Y3wbhM=; b=rlJDI47W9OKn+GQ3IK 2zNLUN6xtkeWNgstVCja53iBYXS4b6Eco3iGQsgIp2NtLRrcWfzr6cICMdlUoDpV wOmgbhiT8EOElw5v51Y9M0D9FnbJC6BPnOc2gKY2n/UhaPIBcxj/QzIAIN3T1iFm ao0wIyletJxW9Z5oCkK53mLu9O3CJz1Q88qhzhLqxw3CAb6Kq1b4g4nL/pkqYtRk 6yY4thpfu2nwO+KoTklNhBT51uZP/eJ8R27YvOb5v1LJJydkvufKhDTE+E3alVuI qkhPaFgE+7L5kNkXyE8eTKSnkjPhsTyiGSVzmlMxXMC4yLHjEsxCouhGqmcjq5j6 4Oyw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1688200981; x=1688287381; bh=S4vk7+aPl12Lx TCiCKZsAu3/gxbDd99YydcX0Y3wbhM=; b=U88Aax22k1vRPzraVeAR9EQDRPVdm sXk8XnEdLv24DPe0T9+X5TagIW4QUpMXs8XAgc4GtmKBeonH/gISrtbwKcvfx+zc Dhx+v+ZEcQ3VySKBUJ7yfIb6UgNqqOCK/8MxXta+/H8xCI0+m07ftX5vKsQtFIFS W15YA+BAyS9iT3B69ty9DopxrxAj6bpiRDaFJumBV5w6WqKm39UmDPiPh0qUb9b2 dTDYQnYKLzjrIjORmS25W4HnVUhVFJIzJsj5klT9TxLOoM1Rqn/PVNVXOFadK576 oodPlFXFILAzkzqBIuZrabT3zkeXqpNuHqC3yA9g7E2DiYBXQ6y4k8fwQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrtdekgddthecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefohffvvefujghffffkgggtsehttdertdertddtnecuhfhrohhmpefglhhiiigr ucggvghlrghsqhhuvgiiuceovghlihiirgesvghlihiirgdrshhhqeenucggtffrrghtth gvrhhnpeduleeffffghedvteekkeelgffhtdeitedvuefgtddttdfhueehtdeihfefvdet tdenucffohhmrghinhepghhithhhuhgsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepvghlihiirgesvghlihiirgdrshhh X-ME-Proxy: Feedback-ID: i87c446d8:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 74DE031A0063; Sat, 1 Jul 2023 04:43:01 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface From: Eliza Velasquez In-Reply-To: <83v8f4qcdd.fsf@gnu.org> References: <873528cuoe.fsf@eliza.sh> <833528rt62.fsf@gnu.org> <87h6qo6pbz.fsf@eliza.sh> <83v8f4qcdd.fsf@gnu.org> Date: Sat, 01 Jul 2023 01:42:53 -0700 Message-ID: <87edls6n02.fsf@eliza.sh> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On Sat, Jul 01 2023 at 11:12 +03, Eli Zaretskii wrote: > But that's exactly what this variable is about, AFAIU: > > Whether to display the command buffer immediately. > If t, display the buffer immediately; if nil, wait until there > is output. > > Note the last part. > > So why do you think this behavior is a problem? On a philosophical level: It's surprising to me in that previous example that if `async-shell-command-display-buffer' is t, the buffer is /not/ displayed (according to `display-buffer-alist'), but if it's nil, it /is/ displayed, eventually (ignoring `display-buffer-alist'). On a practical level: The user may want to differentiate buffer display behavior based on the name of the shell command buffer or by some other predicate, including disabling showing that buffer, regardless of whether `async-shell-command-display-buffer' is set to t or nil. I have recently authored a package to make this easier [1] and ran into this problem. The example configuration in the README might shed some more light on the expected behavior. [1] https://github.com/elizagamedev/shell-command-x.el -- Eliza From unknown Mon Aug 18 02:36:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#64394: [PATCH] Fix `async-shell-command-display-buffer' display Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 02 Jul 2023 07:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64394 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eliza Velasquez , Eli Zaretskii Cc: 64394@debbugs.gnu.org, juri@linkov.net Received: via spool by 64394-submit@debbugs.gnu.org id=B64394.168828179129424 (code B ref 64394); Sun, 02 Jul 2023 07:10:02 +0000 Received: (at 64394) by debbugs.gnu.org; 2 Jul 2023 07:09:51 +0000 Received: from localhost ([127.0.0.1]:59077 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFrDT-0007eV-AU for submit@debbugs.gnu.org; Sun, 02 Jul 2023 03:09:51 -0400 Received: from mout.gmx.net ([212.227.15.15]:39259) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFrDQ-0007eG-CS for 64394@debbugs.gnu.org; Sun, 02 Jul 2023 03:09:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.at; s=s31663417; t=1688281779; x=1688886579; i=rudalics@gmx.at; bh=tCBQHNoPGznrFbaMbvxJ1X5TdoElxyQgLGPNMzCpN9E=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From:In-Reply-To; b=ITcMwMVG8d/bBcKiZIjTSHVBSA8OrPmJOVUZaMfoYQiaFxpJFBqZJBKBJAt1kE95WxZsDNT Dvt5VepFWmULwFg8ST4X2F+jn2sKmg5ajzNOSXKop9qnYjT/JLPP9aUUtWb3j+jkYzoEZWY/v CmgY2NC24q0fk+QCS2O8zINHLafyGMWFE3sZjks6/VbnXshVsIn2E/0Xd47Tf1fFKp6E10EWV /OYVa/7S0EODK0SILcJUkJCJN9O6PtmrtPzwDRdGWXQasNqpw6zRXK1mstSYro4mpH9tNb4u6 a5I/zpcnF0XQLbWHmUoUFGp17o77ANepDzmczhX+K0UtxJ1/t2kg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [192.168.1.100] ([213.142.96.247]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MV63g-1qQLLR01ck-00S6yW; Sun, 02 Jul 2023 09:09:39 +0200 Message-ID: <02b09ae9-52ba-4dab-02a2-adf0ef5a4d28@gmx.at> Date: Sun, 2 Jul 2023 09:09:37 +0200 MIME-Version: 1.0 Content-Language: en-US References: <873528cuoe.fsf@eliza.sh> <833528rt62.fsf@gnu.org> <87h6qo6pbz.fsf@eliza.sh> From: martin rudalics In-Reply-To: <87h6qo6pbz.fsf@eliza.sh> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:aVCOOY6cnpQc0nC9bUIY0luET7+jyB2Dvh4Y+CdUHw0NOM6IFgA 4kohyWk0GwavL0bLsf5faRJ66A0qe0MnzM4T3OG2cbf5OCD6lsC18eTK9jjiXA+UxtGjK4x 32os6+iUH+rWurtaLgKI3UfcbaQyhbsjI8QBbwfKAXR/Sfg1J2j+22BH4yatTEoFXFm2pny IySb/SbOqqz/giuUgXjLA== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:LkjInUxov1Q=;kdbsmDqRq7R/PsApd5pqYbN6w62 WFhYhEUXVcGY6MVu4jnGDfkWCJtQkOOEb5u9JF/Xep1+TKV6E9g3C3EdVvLkbmatvAwmIOUff p8CCDzE+fdt9l8012WMp2US9tfb/kYx7OqPvTPLNuA3wKs1WWZcmOMaLRpi6+wGvqIT6Q0s0c EFyOfqxj4gs2KUmSHMmw64Jpggw0dAzOw6HZoRobvAEb9qSSUxZ1mJuPvQyVRy2Pys8TxLHzP 1TLZGVnwRpHYWiLg6y0ahSwvh5Qk2Z7ti1PGsjdxXSBrQ6YMpnB4MfZdqlCHRldc5CixfjDCP MzSO8E2R/4h5rHIJD3SYhoiRwFUC2nSh3JJsYZE5NVj+l/0NPYRGlXLCqMJ4u/vEpnTQVyy/k 455GH3lVsqG0HYsVUrCkO1Go5pQQKP/8HHZWWspa+I1gLrpPNdsNt6tjkBScrAiuuGPjH0Oj+ yjH+hkOQyFIscZdde+4FSa0af6RyRPY5arQKUAUlsqBmI6NKxhK9y3JkyygT5qGhOZNBIaIeJ kPnrfaCYbHh1Ulxs8SLKDLKrh/q73dtUvySV7ROsRFNum1fxj2Zt8v9m38ayKMgi/ufrRFIvd vu3y8yLBZIaLsrOPIZpnSPrOPgmD4BGM0IGo+n6RISbRwxYbfgLdTtiBIhDadRYKRsq/ePokD qBq0pniwYRvLgJBL6hQjjGCcD1v8yCh5R5/I26dw7TIa3sLzkLXXHpc4OAZshlmQIPAyoEeQl 3E59gK1glnOqq9ZHrsl4UCBkX2ELSpI6s/BFa7G6QF7KtmnYQY6yhmJQUGKNToTXoCBEsvTDK af1omMVb/Vbb7GAhqI0TqL1gUYJDMKNaTp/hGzhvs0Lr76w2NBMlM4Z/7RDIRz+RUjBNPpR1H VDNvwPyEYzr/5LqajNUHvP9tiKd++xI8fMaOoQ69Uu2741C40IHxKdcUSr7LXZ47D3wXwxvzd Fzm5iw3hZblAsjvlYFBLWFlqbHU= X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> I'm probably missing something, but how can display-buffer fail to >> support any action function, such as display-buffer-no-window? >> >> Martin, what am I missing here? We may have to ask Juri, he conceived the "allow-no-window" concept. > I was also confused. Based on the documentation for > `display-buffer-no-window', it seems that callers are supposed to > explicitly pass an `(allow-no-window . t)' cons pair when calling > `display-buffer' as a signal that they can correctly handle a return > value of nil. If it's absent, `display-buffer-no-window' seems to err > on the side of caution, assume the caller can't handle nil, displays the > window anyway, and returns it like all the other display functions. I think that's the idea, yes. > Technically it seems that you can add `(allow-no-window . t)' to > `display-buffer-alist' to always force the buffer never to appear, but > that doesn't seem at all like its intended use. Maybe "force" is too strong here. You can "force" it by adding an 'allow-no-window' entry to the alist _and_ a 'display-buffer-no-window' action in a position that precedes any other display buffer action. >> That's fine, but those are your preferences. I'd feel uncomfortable >> with forcing them on everyone, if we already have a way of tailoring >> this behavior by user customizations. > > I might not have been clear with what I meant here, sorry; I mean that > in my own personal config, when I run `mpv', its output appears in a > buffer named `*shell:mpv*' instead of `*Async Shell Command*', and I > have an explicit entry for it in `display-buffer-alist' so that it > doesn't appear via `display-buffer-no-window'. This was functioning > well, except the moment I set `async-shell-command-display-buffer' to > nil, the buffer displayed itself the moment mpv began to write to > stdout. > > A minimally reproable example in `emacs -Q': > > --8<---------------cut here---------------start------------->8--- > (setq display-buffer-alist > '(("\\*Async Shell Command\\*" > (display-buffer-no-window)))) > (setq async-shell-command-display-buffer nil) > --8<---------------cut here---------------end--------------->8--- > > `M-& echo foo RET' will unexpectedly show the `*Async Shell Command*' > buffer. I suppose (Juri will correct me) that this snippet in 'shell-command' (if async-shell-command-display-buffer ;; Display buffer immediately. (display-buffer buffer '(nil (allow-no-window . t))) <<<<< ;; Defer displaying buffer until first process output. ;; Use disposable named advice so that the buffer is ;; displayed at most once per process lifetime. (let ((nonce (make-symbol "nonce"))) (add-function :before (process-filter proc) (lambda (proc _string) (let ((buf (process-buffer proc))) (when (buffer-live-p buf) (remove-function (process-filter proc) nonce) (display-buffer buf)))) <<<<< `((name . ,nonce))))))) adding an 'allow-no-window' entry if and only if 'async-shell-command-display-buffer' is non-nil is responsible for the behavior Eliza sees. I have no idea whether adding such an entry in the second case could cause problems. We could give 'async-shell-command-display-buffer' a third value, say 'allow-no-window and, if a user has set it to that value, have 'shell-command' add an 'allow-no-window' entry in the second case too. martin From unknown Mon Aug 18 02:36:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#64394: [PATCH] Fix `async-shell-command-display-buffer' display Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 02 Jul 2023 18:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64394 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: martin rudalics Cc: Eliza Velasquez , Eli Zaretskii , 64394@debbugs.gnu.org Received: via spool by 64394-submit@debbugs.gnu.org id=B64394.168832183310826 (code B ref 64394); Sun, 02 Jul 2023 18:18:02 +0000 Received: (at 64394) by debbugs.gnu.org; 2 Jul 2023 18:17:13 +0000 Received: from localhost ([127.0.0.1]:32772 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qG1dJ-0002oY-0m for submit@debbugs.gnu.org; Sun, 02 Jul 2023 14:17:13 -0400 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:48199) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qG1dG-0002o8-Bw for 64394@debbugs.gnu.org; Sun, 02 Jul 2023 14:17:11 -0400 X-GND-Sasl: juri@linkov.net X-GND-Sasl: juri@linkov.net X-GND-Sasl: juri@linkov.net X-GND-Sasl: juri@linkov.net Received: by mail.gandi.net (Postfix) with ESMTPSA id 4230620009; Sun, 2 Jul 2023 18:17:02 +0000 (UTC) From: Juri Linkov In-Reply-To: <02b09ae9-52ba-4dab-02a2-adf0ef5a4d28@gmx.at> (martin rudalics's message of "Sun, 2 Jul 2023 09:09:37 +0200") Organization: LINKOV.NET References: <873528cuoe.fsf@eliza.sh> <833528rt62.fsf@gnu.org> <87h6qo6pbz.fsf@eliza.sh> <02b09ae9-52ba-4dab-02a2-adf0ef5a4d28@gmx.at> Date: Sun, 02 Jul 2023 21:03:58 +0300 Message-ID: <86cz1axjtl.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >>> I'm probably missing something, but how can display-buffer fail to >>> support any action function, such as display-buffer-no-window? >>> >>> Martin, what am I missing here? > > We may have to ask Juri, he conceived the "allow-no-window" concept. I don't remember the details why we decided to design it that way. But now I don't see why not enable allow-no-window by default, i.e. why not to make it opt-out instead of opt-in. >> Technically it seems that you can add `(allow-no-window . t)' to >> `display-buffer-alist' to always force the buffer never to appear, but >> that doesn't seem at all like its intended use. > > Maybe "force" is too strong here. You can "force" it by adding an > 'allow-no-window' entry to the alist _and_ a 'display-buffer-no-window' > action in a position that precedes any other display buffer action. Indeed, it's possible to add 'allow-no-window' in customization: (setq display-buffer-alist '(("\\*Async Shell Command\\*" display-buffer-no-window (allow-no-window . t)))) (setq async-shell-command-display-buffer nil) > I suppose (Juri will correct me) that this snippet in 'shell-command' > > (if async-shell-command-display-buffer > ;; Display buffer immediately. > (display-buffer buffer '(nil (allow-no-window . t))) <<<<< > ;; Defer displaying buffer until first process output. > ;; Use disposable named advice so that the buffer is > ;; displayed at most once per process lifetime. > (let ((nonce (make-symbol "nonce"))) > (add-function :before (process-filter proc) > (lambda (proc _string) > (let ((buf (process-buffer proc))) > (when (buffer-live-p buf) > (remove-function (process-filter proc) > nonce) > (display-buffer buf)))) <<<<< > `((name . ,nonce))))))) > > adding an 'allow-no-window' entry if and only if > 'async-shell-command-display-buffer' is non-nil is responsible for the > behavior Eliza sees. I have no idea whether adding such an entry in the > second case could cause problems. We could give > 'async-shell-command-display-buffer' a third value, say 'allow-no-window > and, if a user has set it to that value, have 'shell-command' add an > 'allow-no-window' entry in the second case too. I think it's a plain bug that the first call of 'display-buffer' sets 'allow-no-window' to t, but the second call doesn't. These two 'display-buffer' calls were intended to do the same thing. Only the second call is delayed until input arrives. From unknown Mon Aug 18 02:36:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#64394: [PATCH] Fix `async-shell-command-display-buffer' display Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 03 Jul 2023 06:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64394 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Juri Linkov Cc: Eliza Velasquez , Eli Zaretskii , 64394@debbugs.gnu.org Received: via spool by 64394-submit@debbugs.gnu.org id=B64394.168836682631044 (code B ref 64394); Mon, 03 Jul 2023 06:48:01 +0000 Received: (at 64394) by debbugs.gnu.org; 3 Jul 2023 06:47:06 +0000 Received: from localhost ([127.0.0.1]:33033 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qGDL0-00084e-1i for submit@debbugs.gnu.org; Mon, 03 Jul 2023 02:47:06 -0400 Received: from mout.gmx.net ([212.227.15.15]:37357) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qGDKu-000843-8X for 64394@debbugs.gnu.org; Mon, 03 Jul 2023 02:47:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.at; s=s31663417; t=1688366810; x=1688971610; i=rudalics@gmx.at; bh=bCn9FTDrKyIuQk1XlTBB0q+WWkd24cjQU2/yxqjRips=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From:In-Reply-To; b=QncJ/dswLrEmVaX1oR5wbV279evYT/NzDiYOERx1sJCUi+Sh5QqeKpIS8mQcDTKQePAeULX HlmL1SfgkvGyIqPrJlrfcJCyXFfWsYR+O4PgwYRvVsBgacErwomlhfPaSn+Q9TBB/d6NKJ7DA w4mt0jYv2Ksf6rYoni44z0g2TmEHiSo7LgSpIJsOk5fEY2obJVFyO4BaKNsu969n4TKn5NMgm Q4elXRkmG/JbDJXiNADmJAhx2JtXDaDCtOkR3XI9Mg/m17B3COo8sfvSlfz/KCx8yJdZ/iBJN RjjqLj8SI8fXSZSqnK9KbnKMZxdXLUuGuE+dPY+4Imth0F64yF3Q== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [192.168.1.100] ([46.125.249.42]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N7zFZ-1ptzSL3HW7-014ygI; Mon, 03 Jul 2023 08:46:50 +0200 Message-ID: Date: Mon, 3 Jul 2023 08:46:49 +0200 MIME-Version: 1.0 Content-Language: en-US References: <873528cuoe.fsf@eliza.sh> <833528rt62.fsf@gnu.org> <87h6qo6pbz.fsf@eliza.sh> <02b09ae9-52ba-4dab-02a2-adf0ef5a4d28@gmx.at> <86cz1axjtl.fsf@mail.linkov.net> From: martin rudalics In-Reply-To: <86cz1axjtl.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64 X-Provags-ID: V03:K1:3C5DAEOA20xhG6Vz2jgH9Lz/1U6RuXtKiSpIRbxMZ7IDs5rILCV okYtvXdvp97No6bPy1CVQpfqR0fr6Kt+nlh/fat4h/PvOOuKeyrl9OP2J947H3SxM558bUZ FVsYhn1+btmyz5WBeJtkv6iizIEj0YvpD/AbGOGhuE7xYGx1xwohkgbGBkiBqNA2X4ikw+E MbBTT/prLSE+4e5ET+RmQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:ntMc/x92vHI=;j5xQfJRPqxZmEiViHJOVa2RNqQF E4RWRQfkiY2YFXEHiqX0hu9LQjXkyPyG6kin4119hTRo5x0BQr6aOG8+R1o25uRImZxTDAz74 +ygZlvGlYiKgfSBW867Tg5mpz1scCccfhYxz5+CVWkMR43XKIG7kni6wroi+KyI7QWe/XHrIk +0bP4mb3k8JYBqyma+OkXxF2HbgkgJP/25A2n3EwvNRKuoX8J95QbqjBbOCQoKpLh96r/7aEj bwwf3AMLazXFT411J9O89nzqDmYRaGs9aBNB4qmQ1JGzNfZt+YxV/hJdota9ksR4o1gou/Nuu MyhisysPWx0DrNQiDWOz0JZGMHjQ8ZanHH5yw4shjHxwZSUY9uyPT3vzpqEWhWREaCy7Ov6zO B9pi+lyM0SW4xC2NsNvwYisJ2oXl6CZpObLyq8JGiEn/jlKKXBCqjDJQi4cE1Tqx6/uHwWs34 HqycftrwHlr3mxB4cBiKrtFKdvkxSozTi5S0vQPwQXFfEAPGQL17g6TeEMkxzBjeKIwI+Ipa3 Su1bYCuZr5gRRvldpLRPcMJsiyIPILNcCpEibIj4/RkNoKLNXewOwkQeTVSQ/9YeB8iK/sJr3 w/NS5BAA7Qohm277xyQBmVBJxW3+0UiiLhmD9eGJLX0ZY+yzbesFqr0uDgZwSIrf3ALWZukzf R78cZIdxFf+vQmheDiuYF0BjVAIrjf9nCShAzYIzlaBakBcs44fU7xsL+KYWiY7WzPLE4p1Fn RcWoKCMm91FBiOVyvI9s9iCAV8jptNtx97VDizc6VTDKp/WdNMntvGayrBl8JWrWr6ZRRlbco Vl2v1x6R4vsqCTmTBsyYfFNIzHgbVdGNXiZq86ArRkMP4iIEwKjSSCRCM4ViXO9oa4mZEieMm BZg1jXcAOnhQsqOhw+XFOQkMgqvRcJSeIypXbJY/nYbBkN4C0I63hXbP2BX6ezFZ6zysHsmmZ NSbUlxiX2uWhpv0Ypj5apL2UXm4= X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) ID4gSW5kZWVkLCBpdCdzIHBvc3NpYmxlIHRvIGFkZCAnYWxsb3ctbm8td2luZG93JyBpbiBj dXN0b21pemF0aW9uOg0KID4NCiA+ICAgIChzZXRxIGRpc3BsYXktYnVmZmVyLWFsaXN0DQog PiAgICAgICAgICAnKCgiXFwqQXN5bmMgU2hlbGwgQ29tbWFuZFxcKiINCiA+ICAgICAgICAg ICAgIGRpc3BsYXktYnVmZmVyLW5vLXdpbmRvdw0KID4gICAgICAgICAgICAgKGFsbG93LW5v LXdpbmRvdyAuIHQpKSkpDQogPiAgICAoc2V0cSBhc3luYy1zaGVsbC1jb21tYW5kLWRpc3Bs YXktYnVmZmVyIG5pbCkNCg0KQnV0IGl0J3Mgbm90IHJlY29tbWVuZGVkLiAgV2Ugc2F5IHRo YXQNCg0KICAgICAgSXQgaXMgYXNzdW1lZCB0aGF0IHdoZW4gYSBjYWxsZXIgb2Yg4oCYZGlz cGxheS1idWZmZXLigJkgc3BlY2lmaWVzIGENCiAgICAgIG5vbi3igJhuaWzigJkg4oCYYWxs b3ctbm8td2luZG934oCZIGVudHJ5LCBpdCBpcyBhbHNvIGFibGUgdG8gaGFuZGxlIGENCiAg ICAgIOKAmG5pbOKAmSByZXR1cm4gdmFsdWUuDQoNCmFuZCAnZGlzcGxheS1idWZmZXItYWxp c3QnIGlzIG5vdCBpbiB0aGUgZG9tYWluIG9mIHRoZSBjYWxsZXIuICBXZSBqdXN0DQpkb24n dCBkaXNhbGxvdyBpdCBlaXRoZXIgc28gdXNlcnMgYXJlIGZyZWUgdG8gZXhwZXJpbWVudCB3 aXRoIGl0IChhbmQNCnNob290IHRoZW1zZWx2ZXMgaW4gdGhlIGZvb3QgaW4gdGhlIGNvdXJz ZSBvZiB0aGluZ3MpLg0KDQogPiBJIHRoaW5rIGl0J3MgYSBwbGFpbiBidWcgdGhhdCB0aGUg Zmlyc3QgY2FsbCBvZiAnZGlzcGxheS1idWZmZXInDQogPiBzZXRzICdhbGxvdy1uby13aW5k b3cnIHRvIHQsIGJ1dCB0aGUgc2Vjb25kIGNhbGwgZG9lc24ndC4NCiA+DQogPiBUaGVzZSB0 d28gJ2Rpc3BsYXktYnVmZmVyJyBjYWxscyB3ZXJlIGludGVuZGVkIHRvIGRvIHRoZSBzYW1l IHRoaW5nLg0KID4gT25seSB0aGUgc2Vjb25kIGNhbGwgaXMgZGVsYXllZCB1bnRpbCBpbnB1 dCBhcnJpdmVzLg0KDQpNYXliZSB0aGUgYnVmZmVyIGRpc3BsYXkgaXMgaW50ZW5kZWQgdG8g c2ltcGx5IHdha2UgdXAgdGhlIHVzZXIuICBJDQp3b3VsZCBmaW5kIGl0IGRpc3J1cHRpdmUs IHRob3VnaC4NCg0KSSdkIHN1Z2dlc3QgdG8gZml4IGl0IHlvdXIgd2F5IG9uIG1hc3Rlci4g IEFzIGZvciB0aGUgcmVsZWFzZSBicmFuY2gsDQpwZW9wbGUgY2FuIGN1c3RvbWl6ZSAnZGlz cGxheS1idWZmZXItYWxpc3QnIHRoZSB3YXkgeW91IHN1Z2dlc3RlZCBhYm92ZS4NCkVsaXph IFdEWVQ/DQoNCm1hcnRpbg0K From unknown Mon Aug 18 02:36:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#64394: [PATCH] Fix `async-shell-command-display-buffer' display Resent-From: Eliza Velasquez Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 04 Jul 2023 01:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64394 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: martin rudalics , Juri Linkov Cc: Eli Zaretskii , 64394@debbugs.gnu.org Received: via spool by 64394-submit@debbugs.gnu.org id=B64394.168843350215284 (code B ref 64394); Tue, 04 Jul 2023 01:19:02 +0000 Received: (at 64394) by debbugs.gnu.org; 4 Jul 2023 01:18:22 +0000 Received: from localhost ([127.0.0.1]:34727 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qGUgP-0003yS-Ng for submit@debbugs.gnu.org; Mon, 03 Jul 2023 21:18:22 -0400 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:49233) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qGUgN-0003yC-FA for 64394@debbugs.gnu.org; Mon, 03 Jul 2023 21:18:20 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 595233200958; Mon, 3 Jul 2023 21:18:13 -0400 (EDT) Received: from imap48 ([10.202.2.98]) by compute5.internal (MEProxy); Mon, 03 Jul 2023 21:18:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eliza.sh; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; t=1688433492; x=1688519892; bh=nm YU2wMXo82C7Odp7o15T1v6GCTDccOXPhZ1zI3Pa8Q=; b=uuCV3uNtsRpgStDNsW XtSzJwyQ22QKSKwzUT5tLss/s2sM0AHV4yBkvketZsM2JMgs6iKw2b5+1yp3FJ2J C8SefqgqTw06GMwwu+uPiN035G1qgRvBvTja2wfvynKJ/XSwiJzvJ8H9TgaysMzr Qf8XiGdoT/k5M5uZTUSwU4iS0ZhwU01+DNfmwcQalXG6rU3kBuWcHgtW+hascy/N 6Vngro+HFKBth2pGyE5UPpunvi8Pu/T2J/1SgUP0dNHXAoUR/gWxVem6mOsmS3oM tp57VlXYUx7j6y9IGxlImld3HAaqn+qHlBbBIpkSOK9ZcgJhWvUQtJSpfVFzjaYM r94g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1688433492; x=1688519892; bh=nmYU2wMXo82C7 Odp7o15T1v6GCTDccOXPhZ1zI3Pa8Q=; b=jnYJBQw+pfhnS6EcidAWpFaj0zmib /EqNmE0n6Jg/zQ3SSMZ2XkGnNI+wrO4BDhyKLok+LB/yJ3yf0H4DXa30jT/qhXOA sQrwFk3nU5dT7XdCU2fiHYDCOO4KJDayaJrQp+UHGO/TMbhEcLw8+7ZonqFq+HVr HgKc7baOzH6UkHteNSJSzr708B+nPAAlD8UqafsbVdHIjewIqksKGNX/f0192MxC q+G/Sfsp4Vxo/nE9l+EgWmqmk6jygrYhluhfFFncRiuEoKLGirNq0/jDL28G+gep h8t7CF15syKkGnesye37ZiYCxSBo0zsYJm+K709cx9ZfwKbM0/D00qzXg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudefgdeggecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefohffvvefujghffffkgggtsehttdertdertddtnecuhfhrohhmpefglhhiiigr ucggvghlrghsqhhuvgiiuceovghlihiirgesvghlihiirgdrshhhqeenucggtffrrghtth gvrhhnpeefudekkeegveeuteeihfeghfeifeetleejiedvheehkeejffekledtudehiedv ueenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegvlh hiiigrsegvlhhiiigrrdhshh X-ME-Proxy: Feedback-ID: i87c446d8:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 700C131A0063; Mon, 3 Jul 2023 21:18:12 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface From: Eliza Velasquez In-Reply-To: References: <873528cuoe.fsf@eliza.sh> <833528rt62.fsf@gnu.org> <87h6qo6pbz.fsf@eliza.sh> <02b09ae9-52ba-4dab-02a2-adf0ef5a4d28@gmx.at> <86cz1axjtl.fsf@mail.linkov.net> Date: Mon, 03 Jul 2023 18:18:09 -0700 Message-ID: <87pm58o4oe.fsf@eliza.sh> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On Mon, Jul 03 2023 at 08:46 +02, martin rudalics wrote: > I'd suggest to fix it your way on master. As for the release branch, > people can customize 'display-buffer-alist' the way you suggested > above. Eliza WDYT? Sounds good to me! -- Eliza From unknown Mon Aug 18 02:36:58 2025 X-Loop: help-debbugs@gnu.org Subject: bug#64394: [PATCH] Fix `async-shell-command-display-buffer' display Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 04 Jul 2023 17:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64394 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eliza Velasquez Cc: martin rudalics , Eli Zaretskii , 64394@debbugs.gnu.org Received: via spool by 64394-submit@debbugs.gnu.org id=B64394.168849341710482 (code B ref 64394); Tue, 04 Jul 2023 17:57:01 +0000 Received: (at 64394) by debbugs.gnu.org; 4 Jul 2023 17:56:57 +0000 Received: from localhost ([127.0.0.1]:36593 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qGkGn-0002ix-Gs for submit@debbugs.gnu.org; Tue, 04 Jul 2023 13:56:57 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:36747) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qGkGk-0002ic-1e; Tue, 04 Jul 2023 13:56:56 -0400 X-GND-Sasl: juri@linkov.net X-GND-Sasl: juri@linkov.net X-GND-Sasl: juri@linkov.net X-GND-Sasl: juri@linkov.net X-GND-Sasl: juri@linkov.net Received: by mail.gandi.net (Postfix) with ESMTPSA id 7A113C0006; Tue, 4 Jul 2023 17:56:46 +0000 (UTC) From: Juri Linkov In-Reply-To: <87pm58o4oe.fsf@eliza.sh> (Eliza Velasquez's message of "Mon, 03 Jul 2023 18:18:09 -0700") Organization: LINKOV.NET References: <873528cuoe.fsf@eliza.sh> <833528rt62.fsf@gnu.org> <87h6qo6pbz.fsf@eliza.sh> <02b09ae9-52ba-4dab-02a2-adf0ef5a4d28@gmx.at> <86cz1axjtl.fsf@mail.linkov.net> <87pm58o4oe.fsf@eliza.sh> Date: Tue, 04 Jul 2023 20:54:58 +0300 Message-ID: <86jzvfblzh.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) close 64394 30.0.50 thanks >> I'd suggest to fix it your way on master. As for the release branch, >> people can customize 'display-buffer-alist' the way you suggested >> above. Eliza WDYT? > > Sounds good to me! Thanks for the patch! Your patch is pushed now to master.