unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#64394: [PATCH] Fix `async-shell-command-display-buffer' display
@ 2023-07-01  1:00 Eliza Velasquez
  2023-07-01  7:24 ` Eli Zaretskii
  0 siblings, 1 reply; 10+ messages in thread
From: Eliza Velasquez @ 2023-07-01  1:00 UTC (permalink / raw)
  To: 64394

[-- Attachment #1: Type: text/plain, Size: 1152 bytes --]

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'


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-async-shell-command-display-buffer-display.patch --]
[-- Type: text/patch, Size: 1159 bytes --]

From 0a6c0268f7f304d051201b024ad27f50f8682e45 Mon Sep 17 00:00:00 2001
From: Eliza Velasquez <eliza@eliza.sh>
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


[-- Attachment #3: Type: text/plain, Size: 11 bytes --]


-- 
Eliza

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-07-04 17:54 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-01  1:00 bug#64394: [PATCH] Fix `async-shell-command-display-buffer' display Eliza Velasquez
2023-07-01  7:24 ` Eli Zaretskii
2023-07-01  7:52   ` Eliza Velasquez
2023-07-01  8:12     ` Eli Zaretskii
2023-07-01  8:42       ` Eliza Velasquez
2023-07-02  7:09     ` martin rudalics
2023-07-02 18:03       ` Juri Linkov
2023-07-03  6:46         ` martin rudalics
2023-07-04  1:18           ` Eliza Velasquez
2023-07-04 17:54             ` Juri Linkov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).