GNU bug report logs - #70773
30.0.50; display-delayed-warnings does not respect display-buffer-alist

Previous Next

Package: emacs;

Reported by: Protesilaos Stavrou <info <at> protesilaos.com>

Date: Sat, 4 May 2024 18:32:02 UTC

Severity: normal

Merged with 70795

Fixed in version 30.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Juri Linkov <juri <at> linkov.net>
To: Protesilaos Stavrou <info <at> protesilaos.com>
Cc: 70773 <at> debbugs.gnu.org
Subject: bug#70773: 30.0.50; display-delayed-warnings does not respect display-buffer-alist
Date: Sun, 05 May 2024 09:58:13 +0300
> The display-delayed-warnings does not conform with display-buffer-no-window.

Thanks for the bug report.

> To test this, I create a new directory and write an init.el with the
> following contents:
>
>     (setq display-buffer-alist
>           '(("\\`\\*\\(Warnings\\|Compile-Log\\|Org Links\\)\\*\\'"
>              (display-buffer-no-window)
>              (allow-no-window . t))))

`allow-no-window' is intended to be provided only by the caller,
when the caller can handle the nil value for window.

So here is the patch that implements this in the caller:

diff --git a/lisp/emacs-lisp/warnings.el b/lisp/emacs-lisp/warnings.el
index 8c1e43934ff..d0e130abaf8 100644
--- a/lisp/emacs-lisp/warnings.el
+++ b/lisp/emacs-lisp/warnings.el
@@ -372,15 +372,17 @@ display-warning
 		     (warning-suppress-p type warning-suppress-types)
 		     (let ((window (display-buffer
 				    buffer
-				    (when warning-display-at-bottom
-				      '(display-buffer--maybe-at-bottom
-					(window-height . (lambda (window)
-					  (fit-window-to-buffer window 10)))
-					(category . warning))))))
-		       (when (and (markerp warning-series)
+				    (if warning-display-at-bottom
+				        '(display-buffer--maybe-at-bottom
+					  (window-height . (lambda (window)
+                                            (fit-window-to-buffer window 10)))
+					  (category . warning)
+                                          (allow-no-window . t))
+                                      '(nil (allow-no-window . t))))))
+		       (when (and window (markerp warning-series)
 				  (eq (marker-buffer warning-series) buffer))
 			 (set-window-start window warning-series))
-		       (when warning-display-at-bottom
+		       (when (and warning-display-at-bottom window)
 			 (with-selected-window window
 			   (goto-char (point-max))
 			   (forward-line -1)




This bug report was last modified 1 year and 72 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.