GNU bug report logs - #1259
quit-window: does it quit the wrong buffer?

Previous Next

Package: emacs;

Reported by: David Reitter <david.reitter <at> gmail.com>

Date: Mon, 27 Oct 2008 01:30:02 UTC

Severity: normal

Done: martin rudalics <rudalics <at> gmx.at>

Bug is archived. No further changes may be made.

Full log


Message #40 received at 1259 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Juanma Barranquero" <lekktu <at> gmail.com>
To: "martin rudalics" <rudalics <at> gmx.at>
Cc: 1259 <at> debbugs.gnu.org
Subject: quit-window does not kill the window
Date: Thu, 13 Nov 2008 17:40:55 +0100
Martin, I'm afraid I missed this comment by you:

"`quit-window' looks fishy in a number of regards: The `delete-frame'
stuff needs other_visible_frames to work correctly but this is not
available in Elisp.  I plan to commit somthing like the version below.
Could people please test whether it breaks their favorite use of this?"

But yes, it breaks one of my favorite uses.

The docstring previously said:

"If WINDOW is non-nil, it specifies a window; we delete that window,
and the buffer that is killed or buried is the one in that window."

Now, it says:

"If WINDOW
is dedicated or a minibuffer window, delete it and, if it's the
only window on its frame, delete its frame as well provided there
are other frames left.  Otherwise, display some other buffer in
the window."

I was using the previously documented behavior. I have a function

(defun quit-buffer-and-window ()
   (interactive)
   (quit-window nil (selected-window)))

(I assign it to "q" in many modes). Now,

  C-x 2 C-x o M-x quit-buffer-and-window <ENTER>

leaves me with two windows.

  Juanma




This bug report was last modified 16 years and 285 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.