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


Message #38 received at 76248 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Juri Linkov <juri <at> linkov.net>
Cc: 76248 <at> debbugs.gnu.org, Elijah Gabe Perez <eg642616 <at> gmail.com>
Subject: Re: bug#76248: [Feature Request] user-option for killing buffer in
 `quit-window'.
Date: Fri, 14 Feb 2025 11:24:49 +0100
[Message part 1 (text/plain, inline)]
> It would be nice to support the value t as a shortcut that means all modes.

OK.

> Then the name could be just 'quit-window-kill-buffer' for symmetry with
> 'kill-buffer-quit-windows'.

Hmm...  What about people who eventually expect buffer names or regexps
to match the name of the window's buffer?

> Wouldn't it be better to check for derived modes with 'derived-mode-p'?
> Then it's possible to detect all modes inheriting from special-mode,
> e.g. (derived-mode-p '(special-mode)).

OK.

>> Maybe its handling should go to 'quit-restore-window' itself.
>> Or we should have 'quit-windows-on' handle it too.
>> Then what about 'delete-windows-on'?
>
> Not sure about other functions.

Me neither.  Maybe your original statement that it really is the "q" we
want to handle could be done via an additional condition like

(eq (key-binding "q") 'quit-window)

New patch attached.

martin
[quit-window-kill-buffer.diff (text/x-patch, attachment)]

This bug report was last modified 208 days ago.

Previous Next


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