Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 292007 - app-editors/emacs-{22.3-r2,23.1-r1} menus aren't properly updated with gtk+-2.18
Summary: app-editors/emacs-{22.3-r2,23.1-r1} menus aren't properly updated with gtk+-2.18
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Emacs project
URL: http://debbugs.gnu.org/cgi/bugreport....
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-05 18:29 UTC by Collin Day
Modified: 2009-12-21 13:47 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emacs-23.1-gtk-menu.patch (emacs-23.1-gtk-menu.patch,6.07 KB, patch)
2009-11-07 19:03 UTC, René 'Necoro' Neumann
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Collin Day 2009-11-05 18:29:54 UTC
Many of the menu items on emacs do not work correctly when gtk is enabled.  For example, if I open up a text file, it never appears in the list of buffers when clicked on the menu.  Also, if items from CEDET are loaded (Senator, for example) the menu shows nothing.  When compiled with USE="-gtk", when I open a file, it appears in the list of buffers.  Also, CEDET menus have options in them.

Reproducible: Always

Steps to Reproduce:
1.emerge emacs with USE="gtk"
2.open a file
3.buffers will only show scratch, messages, and gnu emacs.  Not opened file.  Also, with a C source file, TAGS, C, Senator, etc (from cedet) have no menu items

Actual Results:  
Buffers menu will only show scratch, messages, and gnu emacs.  Not opened file.  Also, with a C source file, TAGS, C, Senator, etc (from cedet) have no menu items

Expected Results:  
Buffers Menu shows all buffers, menu items in appropriate menus.
Comment 1 Collin Day 2009-11-05 19:06:25 UTC
(In reply to comment #0)
> Many of the menu items on emacs do not work correctly when gtk is enabled.  For
> example, if I open up a text file, it never appears in the list of buffers when
> clicked on the menu.  Also, if items from CEDET are loaded (Senator, for
> example) the menu shows nothing.  When compiled with USE="-gtk", when I open a
> file, it appears in the list of buffers.  Also, CEDET menus have options in
> them.
> 
> Reproducible: Always
> 
> Steps to Reproduce:
> 1.emerge emacs with USE="gtk"
> 2.open a file
> 3.buffers will only show scratch, messages, and gnu emacs.  Not opened file. 
> Also, with a C source file, TAGS, C, Senator, etc (from cedet) have no menu
> items
> 
> Actual Results:  
> Buffers menu will only show scratch, messages, and gnu emacs.  Not opened file.
>  Also, with a C source file, TAGS, C, Senator, etc (from cedet) have no menu
> items
> 
> Expected Results:  
> Buffers Menu shows all buffers, menu items in appropriate menus.
> 

I downgraded gtk to 2.16.6 and menus work as expected - this may need to be a gtk bug instead - not sure.  Or it (most likely) needs to be sent upstream to either gtk or emacs.
Comment 2 René 'Necoro' Neumann 2009-11-07 17:35:20 UTC
I have the same issue here.

As a workaround: Pressing F10 (which is the non-mouse way of accessing the menu), makes it work. But the menu still does not pick up future changes (eg. in the Buffers list). So one would need to press F10 as some kind of "refresh menus" function.

emacs: 23.1
gtk+: 2.18.3
Comment 3 René 'Necoro' Neumann 2009-11-07 17:55:49 UTC
(In reply to comment #1)
> 
> I downgraded gtk to 2.16.6 and menus work as expected - this may need to be a
> gtk bug instead - not sure.  Or it (most likely) needs to be sent upstream to
> either gtk or emacs.
> 

Ok ... worked here too.

And I found this debian-bug http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=551302 and this emacs bug report http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=4122

So the workaround seems to be using 'GDK_NATIVE_WINDOWS=1 emacs'.
But there also seems to be a patch available in the Emacs bug.
Comment 4 René 'Necoro' Neumann 2009-11-07 19:03:29 UTC
Created attachment 209567 [details, diff]
emacs-23.1-gtk-menu.patch

This is a patch for this is issue. It is lifted from the corresponding debian patch [1], which in turn is based on this commit [2].

It applies cleanly with emacs 23.1 and 23.1-r1 ... and even more: Fixes the issue :D

[1] http://patch-tracker.debian.org/patch/series/view/emacs23/23.1+1-5/fix-dynamic-menus.diff
[2] http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=3715ffe3e3b2c64d113bf26d94aab559f8559e83
Comment 5 Ulrich Müller gentoo-dev 2009-11-08 23:05:06 UTC
(In reply to comment #4)
> Created an attachment (id=209567) [details]
> emacs-23.1-gtk-menu.patch
> 
> It applies cleanly with emacs 23.1 and 23.1-r1 ... and even more: Fixes the
> issue :D

[Sorry for the delay, looks like bug wranglers have quite some backlog.]

New patchsets for emacs-23.1 and backported to emacs-22.3 are on their way to Gentoo mirrors (the files/ dir started to get crowded). I'll commit fixed ebuilds tomorrow.
Comment 6 Ulrich Müller gentoo-dev 2009-11-09 05:19:11 UTC
Fixed in emacs-22.3-r3 and emacs-23.1-r2.

Thank you for reporting, and for locating the patch.