GNU bug report logs - #76526
30.1; kill-this-buffer not works normally

Previous Next

Package: emacs;

Reported by: Magi Feeney <matrixfeeney <at> gmail.com>

Date: Mon, 24 Feb 2025 17:44:03 UTC

Severity: wishlist

Tags: notabug

Merged with 76575

Found in version 30.1

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: matrixfeeney <at> gmail.com, 76526 <at> debbugs.gnu.org
Subject: bug#76526: 30.1; kill-this-buffer not works normally
Date: Mon, 24 Feb 2025 21:45:53 +0200
> From: Stefan Kangas <stefankangas <at> gmail.com>
> Date: Mon, 24 Feb 2025 19:35:53 +0000
> Cc: matrixfeeney <at> gmail.com, 76526 <at> debbugs.gnu.org
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> >> From: Stefan Kangas <stefankangas <at> gmail.com>
> >> Date: Mon, 24 Feb 2025 19:21:00 +0000
> >> Cc: 76526 <at> debbugs.gnu.org
> >>
> >> Eli Zaretskii <eliz <at> gnu.org> writes:
> >>
> >> > tags 76526 notabug
> >> > thanks
> >> >
> >> >> From: Magi Feeney <matrixfeeney <at> gmail.com>
> >> >> Date: Mon, 24 Feb 2025 21:25:32 +0800
> >> >>
> >> >> I tested the function kill-this-buffer with "emacs -Q", it consistently
> >> >> gives the output:
> >> >>
> >> >> "command-execute: kill-this-buffer must be bound to an event with
> >> >> parameters"
> >> >>
> >> >> and doesn't kill the current buffer.
> >> >
> >> > Yes.  This is the intended behavior.  The function's doc string says:
> >> >
> >> >   This command must be bound to a mouse event, and can be reliably
> >> >   invoked only from the menu bar, otherwise it could decide to silently
> >> >   do nothing or signal an error.  Use ‘kill-current-buffer’ if you
> >> >   need to invoke a similar command from keyboard.
> >> >
> >> > This is not a bug.
> >>
> >> FWIW, I think we should improve this.  It's bad that we show this
> >> command in M-x completions when we already know that it won't work.
> >>
> >> Perhaps this particular command/function should also be renamed to
> >> menu-bar--kill-this-buffer, or something like that, so that users aren't
> >> mislead to think that they can invoke it outside the menu bar.
> >
> > I don't see how a different name will help.  What can be more explicit
> > than what the doc string, which is the first place users should look
> > when a command doesn't do what they expect?
> 
> A different name is more explicit because you don't have to look at the
> docstring.

When did it stop someone from complaining?




This bug report was last modified 111 days ago.

Previous Next


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