From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eliza Velasquez Newsgroups: gmane.emacs.bugs Subject: bug#64394: [PATCH] Fix `async-shell-command-display-buffer' display Date: Fri, 30 Jun 2023 18:00:33 -0700 Message-ID: <873528cuoe.fsf@eliza.sh> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2994"; mail-complaints-to="usenet@ciao.gmane.io" To: 64394@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jul 01 03:01:28 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qFOzO-0000Xq-AL for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 01 Jul 2023 03:01:27 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qFOz9-0001Xo-0q; Fri, 30 Jun 2023 21:01:11 -0400 Original-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 1qFOz0-0001Vy-MP for bug-gnu-emacs@gnu.org; Fri, 30 Jun 2023 21:01:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qFOz0-0003Wq-DY for bug-gnu-emacs@gnu.org; Fri, 30 Jun 2023 21:01:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qFOz0-0007Zu-5u for bug-gnu-emacs@gnu.org; Fri, 30 Jun 2023 21:01:02 -0400 X-Loop: help-debbugs@gnu.org 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 X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.168817324829102 (code B ref -1); Sat, 01 Jul 2023 01:01:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 1 Jul 2023 01:00:48 +0000 Original-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 Original-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 Original-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 Original-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 Original-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) Original-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 Original-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 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:264345 Archived-At: --=-=-= 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 --=-=-=--