all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: martin rudalics via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Juri Linkov <juri@linkov.net>
Cc: 59862@debbugs.gnu.org
Subject: bug#59862: quit-restore per window buffer
Date: Thu, 13 Jun 2024 10:21:32 +0200	[thread overview]
Message-ID: <743dc4dd-cf09-4c5e-9209-b63a47480e0b@gmx.at> (raw)
In-Reply-To: <86frthjq4y.fsf@mail.linkov.net>

 > Could you show how the frame function corresponding to 'tab-bar-close-tab'
 > (I suppose it's 'delete-frame'?)

Hardly.  'delete-frame' unconditionally deletes a frame regardless of
how many windows it displays unless it is the last frame, a surrogate
minibuffer frame or some other special condition holds.

 > detects that where are more than 1 window
 > on the frame, then it refuses to delete the frame.  Then same code could be
 > used in 'tab-bar-close-tab'.

The check is in 'window-deletable-p' which may return 'frame' iff WINDOW
is its frame's root window.  Maybe you also want to check whether the
second element of 'quit-restore' is 'frame' but that I cannot tell.

Note in this context that 'window-deletable-p' does not cover all
special cases handled by 'delete-frame' - things like the
'delete-before' parameter or the 'delete-frame-functions' hook.  So far,
this apparently has not caused any problems though.

martin





  reply	other threads:[~2024-06-13  8:21 UTC|newest]

Thread overview: 15+ 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 [this message]
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

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

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

  git send-email \
    --in-reply-to=743dc4dd-cf09-4c5e-9209-b63a47480e0b@gmx.at \
    --to=bug-gnu-emacs@gnu.org \
    --cc=59862@debbugs.gnu.org \
    --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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.