GNU bug report logs - #25113
25.1.90; Stale menu items after switching to a different major mode (or visiting a buffer)

Previous Next

Package: emacs;

Reported by: Dmitry Gutov <dgutov <at> yandex.ru>

Date: Sun, 4 Dec 2016 22:47:02 UTC

Severity: normal

Found in version 25.1.90

Done: Dmitry Gutov <dgutov <at> yandex.ru>

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 25113 in the body.
You can then email your comments to 25113 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#25113; Package emacs. (Sun, 04 Dec 2016 22:47:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dmitry Gutov <dgutov <at> yandex.ru>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 04 Dec 2016 22:47:02 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.1.90; Stale menu items after switching to a different major mode
 (or visiting a buffer)
Date: Mon, 5 Dec 2016 00:45:52 +0200
1. Start 'emacs -Q', and

- In *scratch*, M-x ruby-mode (or python-mode, or probably many others)

OR

- C-x C-f, visit a Ruby file (or, again, probably any other file)

2. See the "Lisp Interaction" menu disappear, and "Ruby" manu appear.

However, the contents of that menu are exactly the same as what was in
"Lisp Interaction".

If I toggle menu-bar-mode off and on, the menu obtains the correct
contents.

I'm also seeing a problem the menu added by a minor mode which appears
blank at first (which is fixed the same way), but let's tackle the more
obvious problem first.

Looking at older versions, the problem is present as far back as 24.3
(with python-mode; ruby-mode didn't have a menu then).

So this is probably caused by a library change, like the GTK version I
have installed.

***

In GNU Emacs 25.1.90.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9)
 of 2016-12-04 built on zappa
Repository revision: a3487a8121e408ee07fe019270b3bdeaac0ee960
Windowing system distributor 'The X.Org Foundation', version 11.0.11804000
System Description:	Ubuntu 16.04.1 LTS

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS
NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25113; Package emacs. (Mon, 05 Dec 2016 15:42:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 25113 <at> debbugs.gnu.org
Subject: Re: bug#25113: 25.1.90;
 Stale menu items after switching to a different major mode (or
 visiting a buffer)
Date: Mon, 05 Dec 2016 17:41:24 +0200
> From: Dmitry Gutov <dgutov <at> yandex.ru>
> Date: Mon, 5 Dec 2016 00:45:52 +0200
> 
> 1. Start 'emacs -Q', and
> 
> - In *scratch*, M-x ruby-mode (or python-mode, or probably many others)
> 
> OR
> 
> - C-x C-f, visit a Ruby file (or, again, probably any other file)
> 
> 2. See the "Lisp Interaction" menu disappear, and "Ruby" manu appear.
> 
> However, the contents of that menu are exactly the same as what was in
> "Lisp Interaction".

Not reproducible on my system.

> Looking at older versions, the problem is present as far back as 24.3
> (with python-mode; ruby-mode didn't have a menu then).
> 
> So this is probably caused by a library change, like the GTK version I
> have installed.

Most probably.  Can you tell which updates did you do lately?

When you turn on python-mode or ruby-mode, and click on the
problematic menu item ("Ruby" etc.) on the menu bar, do you see
x-menu-bar-open-internal called?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25113; Package emacs. (Mon, 05 Dec 2016 16:14:01 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 25113 <at> debbugs.gnu.org
Subject: Re: bug#25113: 25.1.90; Stale menu items after switching to a
 different major mode (or visiting a buffer)
Date: Mon, 5 Dec 2016 18:13:36 +0200
On 05.12.2016 17:41, Eli Zaretskii wrote:

> Not reproducible on my system.

That's too bad. As described menus are pretty broken on my machine. And 
I'm still on an LTS distribution (Ubuntu 16.04), which must have a lot 
of users.

>> So this is probably caused by a library change, like the GTK version I
>> have installed.
>
> Most probably.  Can you tell which updates did you do lately?

None, really. But then again, I have menu-bar-mode turned off most of 
the time.

I've just tried this when working on a feature request to add a menu to 
inf-ruby-mode (third party package).

> When you turn on python-mode or ruby-mode, and click on the
> problematic menu item ("Ruby" etc.) on the menu bar, do you see
> x-menu-bar-open-internal called?

According to 'M-x debug-on-entry', I don't. Should I check that with GDB 
as well?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25113; Package emacs. (Mon, 05 Dec 2016 16:28:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 25113 <at> debbugs.gnu.org
Subject: Re: bug#25113: 25.1.90; Stale menu items after switching to a
 different major mode (or visiting a buffer)
Date: Mon, 05 Dec 2016 18:27:30 +0200
> Cc: 25113 <at> debbugs.gnu.org
> From: Dmitry Gutov <dgutov <at> yandex.ru>
> Date: Mon, 5 Dec 2016 18:13:36 +0200
> 
> > When you turn on python-mode or ruby-mode, and click on the
> > problematic menu item ("Ruby" etc.) on the menu bar, do you see
> > x-menu-bar-open-internal called?
> 
> According to 'M-x debug-on-entry', I don't. Should I check that with GDB 
> as well?

Yes, I think so: that function is implemented in C.  Set a breakpoint
in Fx_menu_bar_open_internal.

> > Not reproducible on my system.
> 
> That's too bad. As described menus are pretty broken on my machine. And 
> I'm still on an LTS distribution (Ubuntu 16.04), which must have a lot 
> of users.

Does anyone else using GTK+ build see this?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25113; Package emacs. (Mon, 05 Dec 2016 20:27:02 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 25113 <at> debbugs.gnu.org
Subject: Re: bug#25113: 25.1.90; Stale menu items after switching to a
 different major mode (or visiting a buffer)
Date: Mon, 5 Dec 2016 22:26:40 +0200
On 05.12.2016 18:27, Eli Zaretskii wrote:

> Yes, I think so: that function is implemented in C.  Set a breakpoint
> in Fx_menu_bar_open_internal.

I've done that now, and this breakpoint hasn't been hit once during my 
interactions with the menu, before and after switching to ruby-mode, or 
toggling menu-bar-mode off and on afterwards. Here's the full output:

Reading symbols from emacs...done.
SIGINT is used by the debugger.
Are you sure you want to change it? (y or n) [answered Y; input not from 
terminal]
DISPLAY = :0
TERM = xterm-256color
Breakpoint 1 at 0x4ef3a0: file emacs.c, line 353.
Temporary breakpoint 2 at 0x508810: init_sys_modes. (3 locations)
(gdb) b Fx_menu_bar_open_internal
Breakpoint 3 at 0x46cb50: file xmenu.c, line 354.
(gdb) run -Q
Starting program: /home/dgutov/vc/emacs/src/emacs -Q
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffe59e7700 (LWP 16065)]
[New Thread 0x7fffe4975700 (LWP 16066)]
[New Thread 0x7fffdfbc0700 (LWP 16067)]
[Thread 0x7fffdfbc0700 (LWP 16067) exited]
[Thread 0x7fffe59e7700 (LWP 16065) exited]
[Thread 0x7ffff7f1bb00 (LWP 16061) exited]
[Inferior 1 (process 16061) exited normally]




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25113; Package emacs. (Mon, 05 Dec 2016 20:59:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 25113 <at> debbugs.gnu.org
Subject: Re: bug#25113: 25.1.90; Stale menu items after switching to a
 different major mode (or visiting a buffer)
Date: Mon, 05 Dec 2016 22:58:41 +0200
> Cc: 25113 <at> debbugs.gnu.org
> From: Dmitry Gutov <dgutov <at> yandex.ru>
> Date: Mon, 5 Dec 2016 22:26:40 +0200
> 
> On 05.12.2016 18:27, Eli Zaretskii wrote:
> 
> > Yes, I think so: that function is implemented in C.  Set a breakpoint
> > in Fx_menu_bar_open_internal.
> 
> I've done that now, and this breakpoint hasn't been hit once during my 
> interactions with the menu, before and after switching to ruby-mode, or 
> toggling menu-bar-mode off and on afterwards.

Sorry, I guess I've misunderstood how this stuff works with GTK menus.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25113; Package emacs. (Mon, 05 Dec 2016 21:39:02 GMT) Full text and rfc822 format available.

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

From: Stephen Berman <stephen.berman <at> gmx.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 25113 <at> debbugs.gnu.org, Dmitry Gutov <dgutov <at> yandex.ru>
Subject: Re: bug#25113: 25.1.90;
 Stale menu items after switching to a different major mode (or
 visiting a buffer)
Date: Mon, 05 Dec 2016 22:38:05 +0100
On Mon, 05 Dec 2016 18:27:30 +0200 Eli Zaretskii <eliz <at> gnu.org> wrote:

>> Cc: 25113 <at> debbugs.gnu.org
>> From: Dmitry Gutov <dgutov <at> yandex.ru>
>> Date: Mon, 5 Dec 2016 18:13:36 +0200
>> 
[...]
>> > Not reproducible on my system.
>> 
>> That's too bad. As described menus are pretty broken on my machine. And 
>> I'm still on an LTS distribution (Ubuntu 16.04), which must have a lot 
>> of users.
>
> Does anyone else using GTK+ build see this?

I'm using GTK+ Version 3.14.15 and don't see the problem either on my
distribution's build of 25.1 or on fairly recent builds from the
emacs-25 and master branches.

Steve Berman




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25113; Package emacs. (Tue, 06 Dec 2016 14:46:02 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Stephen Berman <stephen.berman <at> gmx.net>, Eli Zaretskii <eliz <at> gnu.org>
Cc: 25113 <at> debbugs.gnu.org
Subject: Re: bug#25113: 25.1.90; Stale menu items after switching to a
 different major mode (or visiting a buffer)
Date: Tue, 6 Dec 2016 16:45:30 +0200
On 05.12.2016 23:38, Stephen Berman wrote:

>> Does anyone else using GTK+ build see this?
>
> I'm using GTK+ Version 3.14.15 and don't see the problem either on my
> distribution's build of 25.1 or on fairly recent builds from the
> emacs-25 and master branches.

Thank you. Anyone with a more recent version of GTK?

I'm seeing the problem with 3.18.9.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25113; Package emacs. (Tue, 06 Dec 2016 15:24:02 GMT) Full text and rfc822 format available.

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

From: Ken Brown <kbrown <at> cornell.edu>
To: Dmitry Gutov <dgutov <at> yandex.ru>, Stephen Berman <stephen.berman <at> gmx.net>, 
 Eli Zaretskii <eliz <at> gnu.org>
Cc: 25113 <at> debbugs.gnu.org
Subject: Re: bug#25113: 25.1.90; Stale menu items after switching to a
 different major mode (or visiting a buffer)
Date: Tue, 6 Dec 2016 10:23:05 -0500
On 12/6/2016 9:45 AM, Dmitry Gutov wrote:
> On 05.12.2016 23:38, Stephen Berman wrote:
>
>>> Does anyone else using GTK+ build see this?
>>
>> I'm using GTK+ Version 3.14.15 and don't see the problem either on my
>> distribution's build of 25.1 or on fairly recent builds from the
>> emacs-25 and master branches.
>
> Thank you. Anyone with a more recent version of GTK?
>
> I'm seeing the problem with 3.18.9.

I can't reproduce the problem with 3.18.9.  Here's my system info:

In GNU Emacs 25.1.90.1 (x86_64-unknown-cygwin, GTK+ Version 3.18.9)
 of 2016-11-29 built on APPVYR-WIN
Windowing system distributor 'The Cygwin/X Project', version 11.0.11804000

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND DBUS GSETTINGS NOTIFY ACL
GNUTLS LIBXML2 FREETYPE XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11

Ken




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25113; Package emacs. (Wed, 12 Aug 2020 00:26:02 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: Ken Brown <kbrown <at> cornell.edu>
Cc: Eli Zaretskii <eliz <at> gnu.org>, Stephen Berman <stephen.berman <at> gmx.net>,
 25113 <at> debbugs.gnu.org, Dmitry Gutov <dgutov <at> yandex.ru>
Subject: Re: bug#25113: 25.1.90; Stale menu items after switching to a
 different major mode (or visiting a buffer)
Date: Tue, 11 Aug 2020 17:25:03 -0700
Dmitry Gutov <dgutov <at> yandex.ru> writes:

> 1. Start 'emacs -Q', and
>
> - In *scratch*, M-x ruby-mode (or python-mode, or probably many others)
>
> OR
>
> - C-x C-f, visit a Ruby file (or, again, probably any other file)
>
> 2. See the "Lisp Interaction" menu disappear, and "Ruby" manu appear.
>
> However, the contents of that menu are exactly the same as what was in
> "Lisp Interaction".

Ken Brown <kbrown <at> cornell.edu> writes:

> On 12/6/2016 9:45 AM, Dmitry Gutov wrote:
>> On 05.12.2016 23:38, Stephen Berman wrote:
>>
>>>> Does anyone else using GTK+ build see this?
>>>
>>> I'm using GTK+ Version 3.14.15 and don't see the problem either on my
>>> distribution's build of 25.1 or on fairly recent builds from the
>>> emacs-25 and master branches.
>>
>> Thank you. Anyone with a more recent version of GTK?
>>
>> I'm seeing the problem with 3.18.9.
>
> I can't reproduce the problem with 3.18.9.  Here's my system info:

I can't reproduce this bug here, using:

GNU Emacs 28.0.50 (build 6, x86_64-pc-linux-gnu, GTK+ Version 3.24.20,
cairo version 1.16.0) of 2020-08-11

Are you still seeing this?

Best regards,
Stefan Kangas




Reply sent to Dmitry Gutov <dgutov <at> yandex.ru>:
You have taken responsibility. (Wed, 12 Aug 2020 09:56:02 GMT) Full text and rfc822 format available.

Notification sent to Dmitry Gutov <dgutov <at> yandex.ru>:
bug acknowledged by developer. (Wed, 12 Aug 2020 09:56:02 GMT) Full text and rfc822 format available.

Message #37 received at 25113-done <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Stefan Kangas <stefan <at> marxist.se>, Ken Brown <kbrown <at> cornell.edu>
Cc: 25113-done <at> debbugs.gnu.org, Stephen Berman <stephen.berman <at> gmx.net>
Subject: Re: bug#25113: 25.1.90; Stale menu items after switching to a
 different major mode (or visiting a buffer)
Date: Wed, 12 Aug 2020 12:54:51 +0300
On 12.08.2020 03:25, Stefan Kangas wrote:
> I can't reproduce this bug here, using:
> 
> GNU Emacs 28.0.50 (build 6, x86_64-pc-linux-gnu, GTK+ Version 3.24.20,
> cairo version 1.16.0) of 2020-08-11
> 
> Are you still seeing this?

Nope. Same GTK+ version as yours, don't see it either anymore.

It might still be present with the version I was using 4 years ago, but 
if fixing it wasn't a priority back then, it certainly isn't now.

Let's close this.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 09 Sep 2020 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 345 days ago.

Previous Next


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