bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#59862: quit-restore per window buffer


From: martin rudalics
Subject: bug#59862: quit-restore per window buffer
Date: Wed, 17 Jul 2024 11:23:31 +0200
User-agent: Mozilla Thunderbird

> I meant window. Same as you explain further below in your message
> I call quit-window on a dedicate window the frame also dies with it.

Note that if a window is dedicated, 'quit-restore-window' will already
do its best to delete the window together with its frame.

> I think if the window inside of a frame didn't contain any other buffer
> than the initial buffer and a new buffer that uses the same window
> there could be the argument that the window should die and thus the
> frame too.

I attach a patch (including all previous changes) that tries to do that.
In particular, evaluating

(custom-set-variables
 '(display-buffer-alist '(("\\*info\\*" display-buffer-pop-up-window)))
 '(quit-restore-window-no-switch t)
 '(frame-auto-hide-function 'delete-frame))

and doing C-x 5 2 then C-h i then C-x 0 and finally q, will delete the
second frame.

Alternatively, evaluating

(custom-set-variables
 '(display-buffer-alist '(("\\*info\\*" display-buffer-same-window)))
 '(quit-restore-window-no-switch 'skip-initial)
 '(frame-auto-hide-function 'delete-frame))

and doing C-x 5 2 then C-h i and q, will delete the second frame too.

Finally, evaluating

(custom-set-variables
 '(display-buffer-alist '(("\\*info\\*" display-buffer-same-window)))
 '(quit-restore-window-no-switch t)
 '(frame-auto-hide-function 'delete-frame))

and doing C-x 5 2 then C-h i then C-x k *scratch* and finally q will
also delete the second frame.

martin

Attachment: windows-and-buffers.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]