unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 59862@debbugs.gnu.org
Cc: rudalics@gmx.at, juri@linkov.net
Subject: bug#59862: quit-restore per window buffer
Date: Wed, 17 Jul 2024 01:14:09 +0300	[thread overview]
Message-ID: <44289.2625973158$1721168146@news.gmane.org> (raw)
In-Reply-To: <ee4e7e95-53d3-4b01-bd1a-ae2cd77352b2@gmx.at> (martin rudalics via's message of "Tue, 16 Jul 2024 10:22:34 +0200")

martin rudalics via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <bug-gnu-emacs@gnu.org> writes:

>> What about use cases where the frame was only spawned for that
>> particular window?
>>
>> For a frame focused setup frames mostly contain only one window and
>> don't close when the only window in it is killed
>
> Do you mean "window" or "buffer" here?  C-x 0 in a frame containing only
> one window gets you an "Attempt to delete minibuffer or sole ordinary
> window" error.  I suppose you meant "buffer" here.

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.

>> leaving a window with
>> the scratch buffer around.
>
> Let's distinguish two different cases: If, after evaluating
>
> (custom-set-variables
>  '(display-buffer-alist '(("\\*info\\*" display-buffer-same-window)))
>  '(frame-auto-hide-function 'delete-frame))
>
> you do C-x 5 2 then C-h i and finally q, the second frame will stay
> around and show *scratch*.  Alternatively, you can evaluate
>
> (custom-set-variables
>  '(display-buffer-alist '(("\\*info\\*" display-buffer-same-window))))
>
> do C-x 5 2 then C-h i and finally C-u q which also kills the *info*
> buffer.  These are the behaviors needed for handling the Bug#12764
> scenario.
>
> If instead you evaluate
>
> (custom-set-variables
>  '(display-buffer-alist '(("\\*info\\*" display-buffer-pop-up-frame)))
>  '(frame-auto-hide-function 'delete-frame))
>
> and then do C-h i followed by q, the second frame gets deleted.
> Alternatively you can get the same visual behavior via
>
> (custom-set-variables
>  '(display-buffer-alist '(("\\*info\\*" display-buffer-pop-up-frame))))
>
> followed by C-h i and C-u q where the latter also kills the *info*
> buffer.
>
> In the thread of Bug#12764 I argued that deleting the frame would make
> sense in the first scenario too.  But then we would have to look into
> the history of the last window on that frame to decide whether the
> buffer it previously showed should be restored or not.  Even if there is
> no previous buffer for that window we should at least optionally allow
> the frame to stay alive.
>

I very much agree with you on that point.

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.






  reply	other threads:[~2024-07-16 22:14 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-06 17:32 bug#59862: quit-restore per window buffer Juri Linkov
2024-06-02  6:45 ` Juri Linkov
2024-06-03  9:34   ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-03  9:53     ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-03 16:09       ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-04  6:53         ` Juri Linkov
2024-06-05 16:56           ` Juri Linkov
2024-06-11  6:52           ` Juri Linkov
2024-06-12  8:57             ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-13  6:47               ` Juri Linkov
2024-06-13  8:21                 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-14 17:35                   ` Juri Linkov
2024-06-15  8:41                     ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-16 16:50                       ` Juri Linkov
2024-06-17 14:48                         ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-08 16:49                         ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-09  6:58                           ` Juri Linkov
2024-07-09  8:52                             ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-10  6:50                               ` Juri Linkov
2024-07-10  9:16                                 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-11  6:47                                   ` Juri Linkov
2024-07-11  8:36                                     ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-12  6:54                                       ` Juri Linkov
2024-07-12  8:20                                         ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-14  7:49                                           ` Juri Linkov
2024-07-15  7:32                                             ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-16  6:09                                               ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-16  6:09                                               ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
     [not found]                                               ` <87frs9kgve.fsf@>
2024-07-16  8:22                                                 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-16 22:14                                                   ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-07-16 22:14                                                   ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
     [not found]                                                   ` <871q3tc7da.fsf@>
2024-07-17  9:23                                                     ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-30  8:20                                             ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-31 17:30                                               ` Juri Linkov
2024-08-01  6:37                                                 ` Juri Linkov
2024-08-01  7:50                                                   ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-01  7:49                                                 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-01 16:01                                                   ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='44289.2625973158$1721168146@news.gmane.org' \
    --to=bug-gnu-emacs@gnu.org \
    --cc=59862@debbugs.gnu.org \
    --cc=bjorn.bidar@thaodan.de \
    --cc=juri@linkov.net \
    --cc=rudalics@gmx.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).