GNU bug report logs -
#48493
28.0.50; quit-window doesn't work
Previous Next
Reported by: Sujith Manoharan <sujith.wall <at> gmail.com>
Date: Tue, 18 May 2021 03:36:01 UTC
Severity: normal
Tags: fixed
Found in version 28.0.50
Fixed in version 28.1
Done: martin rudalics <rudalics <at> gmx.at>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
martin rudalics <rudalics <at> gmx.at> writes:
> The dedicated flag in a side window serves to prevent "normal" buffer
> display to "avoid" that window. A side window may be reused for showing
> another buffer only by `display-buffer-in-side-window'. This sense of
> dedication is somewhat different from the normal sense where killing the
> buffer always attempts to delete its dedicated windows (and maybe their
> frames too) first.
>
> Hence it is perfectly valid to switch to the previous buffer here - any
> such buffer was meant to be displayed in that side window. It would be,
> however, invalid to switch to some buffer that was never shown in that
> window here. Note in this context that we can always delete a side
> window, a side window can never be alone on its frame.
Yes.
> Tell me whether this works with DOOM's `kill-buffer-hook'.
I can test the changes against a version of DOOM, yes. For the draft below
it seems to be ok, but keep in mind that their library bypass these parts
window.el
> If you feel that it's more natural to delete the window in the case at
> hand, we can consider that too.
Not at all. For me it is ok with switch-to-prev-buffer, if users want to delete
the window and/or buffer explicitly, they have commands for that. In the case of
DOOM it is implemented as a workaround against some bugs, it is
explicated in :
(+popup/quit-window)
Documentation
The regular quit-window sometimes kills the popup buffer and switches to a
buffer that shouldn't be in a popup. We prevent that by remapping quit-window
to this commmand.
So here is the *draft* that pass the previous cases of this thread.
`replace-buffer-in-windows' take care of killing buffers.
I restore the dedication of side-window because :
1. it seems to me it is the right think to do, and it prevents 2.
2. I lost the trace when we kill a buffer and no previous-buffer is found
but still an undesirable buffer replace the current,
is it in the C part ? I can't inspect C...
[0001-Better-handling-of-side-windows.patch (text/x-diff, attachment)]
[Message part 3 (text/plain, inline)]
I will pass the rest of they day to look at ERT to see if I can learn
how to write reusable tests and see if this discussion needs to be reflected
in the documentation.
--
This bug report was last modified 3 years and 337 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.