unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 9419@debbugs.gnu.org
Subject: bug#9419: 24.0.50; C-x k deletes the entire frame instead of switching to another buffer
Date: Sat, 03 Sep 2011 15:54:35 +0200	[thread overview]
Message-ID: <4E62319B.3050509@gmx.at> (raw)
In-Reply-To: <834o0t266l.fsf@gnu.org>

 >   emacs -Q
 >   C-x 5 b foo RET
 >   C-x k RET
 >
 > This kills buffer foo and deletes the second frame.  Is this the
 > intended behavior?

Yes.

 > However, this use case looks inconsistent, or maybe I don't understand
 > the intended behavior:
 >
 >   emacs -Q
 >   C-x 5 b foo RET
 >
 > then in the new frame:
 >
 >   C-x b bar RET
 >   C-x b foo RET
 >   C-x k RET      (kills the foo buffer and shows bar)
 >   C-x k RET      (kills the bar buffer and shows *scratch*)
 >
 > My understanding of the intended behavior is that since foo and bar
 > are the only 2 buffers in that frame's buffer list, the frame should
 > be deleted after the last one of them is deleted.  But in fact the
 > frame stays alive and shows *scratch*.
 >
 > If I kill the buffers in the reverse order, i.e. bar first and then
 > foo, the frame does get deleted when foo is killed.

The problem I originally wanted to solve is the following idiom

(save-window-excursion
   (display-buffer "foo"))

which doesn't DTRT when foo is displayed on a different frame.  My
intention was to solve this with the help of the quit-restore window
parameter (similar to the quit mechanism of help windows in Emacs 23).
For that purpose the buffer shown in the corresponding window must be
the same as when the window was created in order to rule out cases where
the user long time after doing the original display quits the window
showing some different buffer in some way and gets surprised by the
deletion of the window.

I can remove this restriction and kill the buffer in the "kill foo first
and bar afterwards" scenario too, but then I will delete a window always
when all buffers I've ever shown in it have gone.  What do you mean?

martin





  reply	other threads:[~2011-09-03 13:54 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-01 17:46 bug#9419: 24.0.50; C-x k deletes the entire frame instead of switching to another buffer Eli Zaretskii
2011-09-03 11:01 ` martin rudalics
2011-09-03 11:53   ` Eli Zaretskii
2011-09-03 13:54     ` martin rudalics [this message]
2011-09-03 14:20       ` Eli Zaretskii
2011-09-03 17:29         ` martin rudalics
2011-09-03 17:44           ` Eli Zaretskii
2011-09-03 19:27             ` Eli Zaretskii
2011-09-04 10:34               ` martin rudalics
2011-09-04 16:28                 ` Eli Zaretskii
2011-09-06 13:17                   ` Stefan Monnier
2011-09-08  7:02                     ` martin rudalics
2011-09-06 13:06           ` Stefan Monnier
2011-09-08  7:02             ` martin rudalics
2011-09-08  7:02     ` martin rudalics
2011-09-09  9:16       ` Eli Zaretskii

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=4E62319B.3050509@gmx.at \
    --to=rudalics@gmx.at \
    --cc=9419@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /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).