GNU bug report logs -
#69983
Use category for display-buffer-alist
Previous Next
Reported by: Juri Linkov <juri <at> linkov.net>
Date: Sun, 24 Mar 2024 17:22:01 UTC
Severity: normal
Fixed in version 30.0.50
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
Message #53 received at 69983 <at> debbugs.gnu.org (full text, mbox):
>>> 'display-comint-buffer-action' and 'display-tex-shell-buffer-action'
>>> are out of place in window.el, and they are redundant per se.
>>>
>>> What these variables are trying to achieve is already possible
>>> to do by using a 'category' in 'display-buffer-alist'.
>>>
>>> Or we need to keep backward-compatibility? Then the first step
>>> to deprecate there variables would be something like this:
>>
>> Please proceed as carefully as possible, here might be dragons.
>
> Ok, here is a complete patch:
So now pushed.
Here is a new patch that adds the category 'warning' to 'display-warning',
as well as adds the default display action that is like the action in
'debug' that displays the "*Backtrace*" buffer.
One problem is that I can't find an alist item to limit
the window height, i.e. can't find window-max-height
that would be like window-min-height, but to set a max height.
Could you suggest such an alist item?
diff --git a/lisp/emacs-lisp/warnings.el b/lisp/emacs-lisp/warnings.el
index 6c62a56e99c..2a9f5e5d9f9 100644
--- a/lisp/emacs-lisp/warnings.el
+++ b/lisp/emacs-lisp/warnings.el
@@ -358,7 +358,12 @@ display-warning
(or (< (warning-numeric-level level)
(warning-numeric-level warning-minimum-level))
(warning-suppress-p type warning-suppress-types)
- (let ((window (display-buffer buffer)))
+ (let ((window (display-buffer
+ buffer
+ '(display-buffer--maybe-at-bottom
+ (window-min-height . 10)
+ (window-height . fit-window-to-buffer)
+ (category . warning)))))
(when (and (markerp warning-series)
(eq (marker-buffer warning-series) buffer))
(set-window-start window warning-series))
This bug report was last modified 1 year and 82 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.