GNU bug report logs -
#68081
30.0.50; derived-mode and display-buffer-alist
Previous Next
Reported by: German Pacenza <germanp82 <at> hotmail.com>
Date: Thu, 28 Dec 2023 13:32:02 UTC
Severity: normal
Found in version 30.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #11 received at 68081 <at> debbugs.gnu.org (full text, mbox):
>> display-buffer-alist rules that use derived-mode or major-mode are
>> ignored on first use.
>>
>> emacs -Q:
>>
>> (setq display-buffer-alist '(((derived-mode . Info-mode)
>> (display-buffer-in-side-window))))
>> "C-h i"
>> The info buffer takes the whole window
>> "q"
>> "C-h i"
>> The info buffer opens in side window as expected
>>
>> Info and Compilation modes are affected, but Help and Man work as expected
>
> Martin, any comments or suggestions?
C-h i does
(info-setup file-or-node
(pop-to-buffer-same-window (or buffer "*info*"))))
In the first call BUFFER is nil and the
(provided-mode-derived-p
(buffer-local-value 'major-mode buffer)
mode))
rigmarole in 'buffer-match-p' won't report a match because the major
mode of *info* is still fundamental mode. In later calls the *info*
buffer exists already, is in Info-mode, and 'buffer-match-p' will
produce the desired result.
We could try to call 'Info-mode' _before_ calling 'display-buffer' but
I'm not sure of the consequences this would have.
martin
This bug report was last modified 1 year and 211 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.