GNU bug report logs - #76911
dedicated side windows lose their dedication upon reuse

Previous Next

Package: emacs;

Reported by: Daniel Colascione <dancol <at> dancol.org>

Date: Mon, 10 Mar 2025 08:00:02 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Daniel Colascione <dancol <at> dancol.org>
To: martin rudalics <rudalics <at> gmx.at>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 76911 <at> debbugs.gnu.org
Subject: bug#76911: dedicated side windows lose their dedication upon reuse
Date: Sun, 16 Mar 2025 22:25:42 -0400
martin rudalics <rudalics <at> gmx.at> writes:

>>> Consider the code below:
>>>
>>>      (let ((b1 (get-buffer-create "*b1*"))
>>>            (b2 (get-buffer-create "*b2*"))
>>>            (action '(display-buffer-in-side-window
>>>                      (dedicated . t)
>>>                      (side . left))))
>>>        (display-buffer b1 action)
>>>        (sit-for 1)
>>>        (display-buffer b2 action))
>>>
>>> It puts b1 in a side window, then reuses that side window for b2.
>>> When we display b2, the window loses the strong dedication it had to b1
>>> despite the display action for b2 including a request for a
>>> dedicated window.
>>>
>>> I'd expect the window to be dedicated to b2 at the end of the
>>> above snippet.
>>
>> Martin, any comments?
>
> The following emacs -Q example shows what may happen then:
>
> (let* ((b1 (get-buffer-create "*b1*"))
>        (b2 (get-buffer-create "*b2*"))
>        (b3 (get-buffer-create "*b3*"))
>        (action '(display-buffer-in-side-window
>                  (dedicated . t)
>                  (side . left)))
>        (window (display-buffer b1 action)))
>   (message "%s" (window-dedicated-p window))
>   (sit-for 3)
>   (display-buffer b2 action)
>   (message "%s" (window-dedicated-p window))
>   (sit-for 3)
>   (display-buffer b3 t))
>
> *b3* is shown in the side window although this is reserved for buffers
> displayed via 'display-buffer-in-side-window'.
>
> I checked in a fix.  Please try again.
>
> Thanks for the report, martin

Thanks for the fix. The original bug is gone. I've noticed a few times
buffers being in side windows I didn't intend to have, but I haven't
been able to find a repro.  Probably an unrelated bug.  We should
probably visually style side windows differently by default.




This bug report was last modified 94 days ago.

Previous Next


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