GNU bug report logs - #15651
24.3.50; `menu-bar-select-buffer' - Remove it? Move it to msb.el?

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Sat, 19 Oct 2013 15:34:01 UTC

Severity: wishlist

Found in version 24.3.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 15651 in the body.
You can then email your comments to 15651 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#15651; Package emacs. (Sat, 19 Oct 2013 15:34:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Drew Adams <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 19 Oct 2013 15:34:02 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.50; `menu-bar-select-buffer' - Remove it? Move it to msb.el?
Date: Sat, 19 Oct 2013 08:33:20 -0700 (PDT)
`menu-bar-select-buffer' is defined in `menu-bar.el'.  It used to be
used there as well, in function `menu-bar-update-buffers'.

Now, the latter function uses `menu-bar-select-buffer-function' instead
(which makes no use of `menu-bar-select-buffer').  The only place
`menu-bar-select-buffer' is used now is in `msb.el'.

Why not remove `menu-bar-select-buffer' or move it to `msb.el'?



In GNU Emacs 24.3.50.1 (i686-pc-mingw32)
 of 2013-10-09 on LEG570
Bzr revision: 114596 jan.h.d <at> swipnet.se-20131009185014-vynfyw4o8p5fge54
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --enable-checking 'CFLAGS=-O0 -g3' CPPFLAGS=-DGLYPH_DEBUG=1'




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15651; Package emacs. (Fri, 29 Apr 2016 14:01:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 15651 <at> debbugs.gnu.org
Subject: Re: bug#15651: 24.3.50;
 `menu-bar-select-buffer' - Remove it? Move it to msb.el?
Date: Fri, 29 Apr 2016 16:00:11 +0200
Drew Adams <drew.adams <at> oracle.com> writes:

> `menu-bar-select-buffer' is defined in `menu-bar.el'.  It used to be
> used there as well, in function `menu-bar-update-buffers'.
>
> Now, the latter function uses `menu-bar-select-buffer-function' instead
> (which makes no use of `menu-bar-select-buffer').  The only place
> `menu-bar-select-buffer' is used now is in `msb.el'.
>
> Why not remove `menu-bar-select-buffer' or move it to `msb.el'?

Well, there may be third party usages of this very important function, I
guess?

(defun menu-bar-select-buffer ()
  (interactive)
  (switch-to-buffer last-command-event))

And it's unclear whether it's used in msb.el.  The only mention is:

(defun msb--make-keymap-menu (raw-menu)
  (let ((end 'menu-bar-select-buffer)
	(mcount 0))

But it could be funcalled afterwards...  the logic is unclear...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15651; Package emacs. (Sun, 30 May 2021 05:51:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 15651 <at> debbugs.gnu.org
Subject: Re: bug#15651: 24.3.50; `menu-bar-select-buffer' - Remove it? Move
 it to msb.el?
Date: Sun, 30 May 2021 07:49:56 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

>> Why not remove `menu-bar-select-buffer' or move it to `msb.el'?
>
> Well, there may be third party usages of this very important function, I
> guess?
>
> (defun menu-bar-select-buffer ()
>   (interactive)
>   (switch-to-buffer last-command-event))

So moving it might break something for some users, but I think it's
highly unlikely.  So I've now moved it in Emacs 28.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug marked as fixed in version 28.1, send any further explanations to 15651 <at> debbugs.gnu.org and Drew Adams <drew.adams <at> oracle.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 30 May 2021 05:51:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15651; Package emacs. (Sun, 30 May 2021 08:48:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 15651 <at> debbugs.gnu.org, drew.adams <at> oracle.com
Subject: Re: bug#15651: 24.3.50;
 `menu-bar-select-buffer' - Remove it? Move it to msb.el?
Date: Sun, 30 May 2021 11:47:45 +0300
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Date: Sun, 30 May 2021 07:49:56 +0200
> Cc: 15651 <at> debbugs.gnu.org
> 
> Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> 
> >> Why not remove `menu-bar-select-buffer' or move it to `msb.el'?
> >
> > Well, there may be third party usages of this very important function, I
> > guess?
> >
> > (defun menu-bar-select-buffer ()
> >   (interactive)
> >   (switch-to-buffer last-command-event))
> 
> So moving it might break something for some users, but I think it's
> highly unlikely.  So I've now moved it in Emacs 28.

Should it be autoloaded now?  menu-bar.el is preloaded, whereas msb.el
isn't, so 3rd-party packages which expect the function to be available
could be in trouble now.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15651; Package emacs. (Sun, 30 May 2021 09:38:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 15651 <at> debbugs.gnu.org, drew.adams <at> oracle.com
Subject: Re: bug#15651: 24.3.50; `menu-bar-select-buffer' - Remove it? Move
 it to msb.el?
Date: Sun, 30 May 2021 11:37:20 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

>> So moving it might break something for some users, but I think it's
>> highly unlikely.  So I've now moved it in Emacs 28.
>
> Should it be autoloaded now?  menu-bar.el is preloaded, whereas msb.el
> isn't, so 3rd-party packages which expect the function to be available
> could be in trouble now.

We could do that, but since the command is so trivial (and undocumented
and uncommented) that I find it unlikely that anybody is using it.

But if that turns out to be the case, we should autoload it.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15651; Package emacs. (Sun, 30 May 2021 10:02:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 15651 <at> debbugs.gnu.org, drew.adams <at> oracle.com
Subject: Re: bug#15651: 24.3.50; `menu-bar-select-buffer' - Remove it? Move
 it to msb.el?
Date: Sun, 30 May 2021 13:02:01 +0300
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Cc: drew.adams <at> oracle.com,  15651 <at> debbugs.gnu.org
> Date: Sun, 30 May 2021 11:37:20 +0200
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> >> So moving it might break something for some users, but I think it's
> >> highly unlikely.  So I've now moved it in Emacs 28.
> >
> > Should it be autoloaded now?  menu-bar.el is preloaded, whereas msb.el
> > isn't, so 3rd-party packages which expect the function to be available
> > could be in trouble now.
> 
> We could do that, but since the command is so trivial (and undocumented
> and uncommented) that I find it unlikely that anybody is using it.
> 
> But if that turns out to be the case, we should autoload it.

I think we should autoload it without waiting for complaints.
Autoloading one function has a negligible cost.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15651; Package emacs. (Mon, 31 May 2021 05:32:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 15651 <at> debbugs.gnu.org, drew.adams <at> oracle.com
Subject: Re: bug#15651: 24.3.50; `menu-bar-select-buffer' - Remove it? Move
 it to msb.el?
Date: Mon, 31 May 2021 07:31:27 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

> I think we should autoload it without waiting for complaints.
> Autoloading one function has a negligible cost.

What we wanted to achieve in this bug report was to remove a useless
command from the preloaded namespace, so adding an autoload here doesn't
really help with that.

So instead I reverted the patch, and I made the original command
obsolete and added a private command to msb.el.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 28 Jun 2021 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 296 days ago.

Previous Next


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