GNU bug report logs - #76248
[Feature Request] user-option for killing buffer in `quit-window'.

Previous Next

Package: emacs;

Reported by: Elijah Gabe Perez <eg642616 <at> gmail.com>

Date: Thu, 13 Feb 2025 04:45:01 UTC

Severity: wishlist

Full log


View this message in rfc822 format

From: Drew Adams <drew.adams <at> oracle.com>
To: martin rudalics <rudalics <at> gmx.at>, Stefan Kangas <stefankangas <at> gmail.com>,  Juri Linkov <juri <at> linkov.net>, Elijah Gabe Perez <eg642616 <at> gmail.com>
Cc: "76248 <at> debbugs.gnu.org" <76248 <at> debbugs.gnu.org>
Subject: bug#76248: [Feature Request] user-option for killing buffer in `quit-window'.
Date: Thu, 13 Feb 2025 16:44:55 +0000
FWIW, I want to bury the buffer of a quit window, not kill it.
I remap bindings of `quit-window' to this, which I got from
Martin 10 years ago:

(defun quit-window-delete (&optional kill window)
  "Quit WINDOW, deleting it, and bury its buffer.
WINDOW must be a live window and defaults to the selected one.
With prefix argument KILL non-nil, kill the buffer instead of
burying it.

This is similar to the version of `quit-window' that Emacs had before
the introduction of `quit-restore-window'.  It ignores the information
stored in WINDOW's `quit-restore' window parameter.

It deletes the WINDOW more often, rather than switching to another
buffer in it.  If WINDOW is alone in its frame then the frame is
deleted or iconified, according to option `frame-auto-hide-function'."
  (interactive "P")
  (set-window-parameter window
                        'quit-restore
                        `(frame frame nil ,(current-buffer)))
  (quit-restore-window window (if kill 'kill 'bury))))

This bug report was last modified 113 days ago.

Previous Next


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