VM

Mac OS X menu bar given duplicate "Emacs" entries that do nothing

Bug #788352 reported by Alley Stoughton
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
VM
Fix Released
Medium
Uday Reddy

Bug Description

When running 8.2.0a on Mac OS X, the Mac menu bar starts out with a single instance of the submenu "Emacs", and this submenu has no entries. Then, each time I move to the next or previous message, another instance of "Emacs" is added to the menu bar.

The attachment shows how things look after a few iterations of this.

Tags: 8.2 ui

Related branches

Revision history for this message
Alley Stoughton (alley-stoughton) wrote :
Revision history for this message
mere user (emacs-user) wrote : Re: [Bug 788352] [NEW] Mac OS X menu bar given duplicate "Emacs" entries that do nothing

I installed 8.2.0a to check this, and I don't seem to have this
problem. I am using gnu emacs from trunk. let me know if there is
anything else I can do, E

On Thu, May 26, 2011 at 7:02 AM, Launchpad Bug Tracker
<email address hidden> wrote:
> You have been subscribed to a public bug by Uday Reddy (reddyuday):
>
> When running 8.2.0a on Mac OS X, the Mac menu bar starts out with a
> single instance of the submenu "Emacs", and this submenu has no entries.
> Then, each time I move to the next or previous message, another instance
> of "Emacs" is added to the menu bar.
>
> The attachment shows how things look after a few iterations of this.
>
> ** Affects: vm
>     Importance: Undecided
>         Status: New
>
> --
> Mac OS X menu bar given duplicate "Emacs" entries that do nothing
> https://bugs.launchpad.net/bugs/788352
> You received this bug notification because you are a direct subscriber of the bug.
>

Revision history for this message
Uday Reddy (reddyuday) wrote :

Hi Alley, given that "mere user" doesn't have this problem, I suspect that you are probably facing bug. Please check your *Messages* buffer and/or turn on debug-on-error to track down what might be going wrong.

Cheers,
Uday

Revision history for this message
mere user (emacs-user) wrote : Re: [Bug 788352] Re: Mac OS X menu bar given duplicate "Emacs" entries that do nothing

which emacs version is alley using?

On Thu, May 26, 2011 at 8:42 AM, Uday Reddy <email address hidden> wrote:
> Hi Alley, given that "mere user" doesn't have this problem, I suspect
> that you are probably facing bug.  Please check your *Messages* buffer
> and/or turn on debug-on-error to track down what might be going wrong.
>
> Cheers,
> Uday
>
> --
> You received this bug notification because you are a direct subscriber
> of the bug.
> https://bugs.launchpad.net/bugs/788352
>
> Title:
>  Mac OS X menu bar given duplicate "Emacs" entries that do nothing
>
> Status in VM (View Mail) for Emacs:
>  New
>
> Bug description:
>  When running 8.2.0a on Mac OS X, the Mac menu bar starts out with a
>  single instance of the submenu "Emacs", and this submenu has no
>  entries. Then, each time I move to the next or previous message,
>  another instance of "Emacs" is added to the menu bar.
>
>  The attachment shows how things look after a few iterations of this.
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/vm/+bug/788352/+subscribe
>

Revision history for this message
Alley Stoughton (alley-stoughton) wrote :

mere user writes:
 > which emacs version is alley using?
 >
 > On Thu, May 26, 2011 at 8:42 AM, Uday Reddy <email address hidden> wrote:
 > > Hi Alley, given that "mere user" doesn't have this problem, I suspect
 > > that you are probably facing bug.  Please check your *Messages* buffer
 > > and/or turn on debug-on-error to track down what might be going wrong.

I'm running

  GNU Emacs 23.3.1 (x86_64-apple-darwin, NS apple-appkit-1038.35) of 2011-03-09 on black.porkrind.org

on Mac OS X 10.5.8.

My *Messages* buffer is below.

Alley

----

Loading /Applications/Emacs.app/Contents/Resources/site-lisp/sml-mode/sml-mode-startup.el (source)...done
Loading /usr/local/share/twelf/emacs/twelf-init.el (source)...done
For information about GNU Emacs and the GNU system, type C-h C-a.
Adding vm-rfaddons-option `check-recipients'.
Adding vm-rfaddons-option `check-for-empty-subject'.
Adding vm-rfaddons-option `encode-headers'.
VM-RFADDONS: Options loaded.
Reading folder /Users/stough/personal/mail/mbox... done
Reordering messages... done
Building threads... 10
Sorting messages... done
Sorting messages... done
12 messages, 0 new, 0 unread, 0 deleted
Generating summary... 0
Decoding MIME message... done
Parsing BBDB... (frobnicating...done)
12 messages, 0 new, 0 unread, 0 deleted
Checking for new mail for /Users/stough/personal/mail/mbox...
Added to /Users/stough/personal/mail/mbox
Got mail from /var/mail/stough.
Generating summary... 0
Sorting messages... done
Sorting messages... done
13 messages, 1 new, 0 unread, 0 deleted
Decoding MIME message... done
13 messages, 1 new, 0 unread, 0 deleted
Auto-saving...done
Decoding MIME message... done
Mark set
Auto-saving...
Mark set [2 times]
(New file)
Mark set
Saving file /Users/stough/foo.txt...
Wrote /Users/stough/foo.txt
GNU Emacs 23.3.1 (x86_64-apple-darwin, NS apple-appkit-1038.35) of 2011-03-09 on black.porkrind.org
Mark set
13 messages, 0 new, 0 unread, 1 deleted
Decoding MIME message... done
13 messages, 0 new, 0 unread, 1 deleted
Checking for new mail for /Users/stough/personal/mail/mbox...
13 messages, 0 new, 0 unread, 1 deleted
Decoding MIME message... done
Decoding MIME message... done
Decoding MIME message... done
Decoding MIME message... done
Decoding MIME message... done
Decoding MIME message... done
vm-next-message: End of folder [4 times]
Mark set [3 times]
Auto-saving...done
Mark set
Quit

Revision history for this message
Alley Stoughton (alley-stoughton) wrote :

I tried stripping my .emacs file down, and the problem still occurs with
just these VM-related settings:

   (require 'vm-autoloads)

   (setq read-mail-command 'vm)
   (setq mail-user-agent 'vm-user-agent)

   (setq send-mail-function 'sendmail-send-it)
   (setq sendmail-program "/Users/stough/bin/mysendmail")

   (setq mail-signature nil)
   (setq user-mail-address "<email address hidden>")
   (setq vm-primary-inbox (concat (getenv "HOME") "/personal/mail/mbox"))
   (setq vm-folder-directory (concat (getenv "HOME") "/personal/mail/"))
   (setq vm-netscape-program "/Users/stough/bin/firefox-helper")
   (setq vm-firefox-program "/Users/stough/bin/firefox-helper")
   (setq vm-firefox-client-program "/Users/stough/bin/firefox-helper")

Also, all of the "Emacs" empty sub-menus persist after I've quit from
VM. They get added, but never deleted.

Alley

Revision history for this message
Uday Reddy (reddyuday) wrote : Re: [Bug 788352] Re: Mac OS X menu bar given duplicate "Emacs" entries that do nothing

Alley Stoughton writes:

> Also, all of the "Emacs" empty sub-menus persist after I've quit from
> VM. They get added, but never deleted.

It could also be a bug in the Emacs version you are using. We did
change the code for menus to fix some of the bugs that were previously
there. But it seems to be working ok on most Emacs installations. I
will install some form of work-around for the cases where the new code
doesn't work.

Cheers,
Uday

Revision history for this message
mere user (emacs-user) wrote : Re: [Bug 788352] Re: Mac OS X menu bar given duplicate "Emacs" entries that do nothing

sorry for taking time to respond. using these settings I could
reproduce this with trunk as well. E

On Thu, May 26, 2011 at 3:52 PM, Alley Stoughton
<email address hidden> wrote:
> I tried stripping my .emacs file down, and the problem still occurs with
> just these VM-related settings:
>
>   (require 'vm-autoloads)
>
>   (setq read-mail-command 'vm)
>   (setq mail-user-agent 'vm-user-agent)
>
>   (setq send-mail-function 'sendmail-send-it)
>   (setq sendmail-program "/Users/stough/bin/mysendmail")
>
>   (setq mail-signature nil)
>   (setq user-mail-address "<email address hidden>")
>   (setq vm-primary-inbox (concat (getenv "HOME") "/personal/mail/mbox"))
>   (setq vm-folder-directory (concat (getenv "HOME") "/personal/mail/"))
>   (setq vm-netscape-program "/Users/stough/bin/firefox-helper")
>   (setq vm-firefox-program "/Users/stough/bin/firefox-helper")
>   (setq vm-firefox-client-program "/Users/stough/bin/firefox-helper")
>
> Also, all of the "Emacs" empty sub-menus persist after I've quit from
> VM.  They get added, but never deleted.
>
> Alley
>
> --
> You received this bug notification because you are a direct subscriber
> of the bug.
> https://bugs.launchpad.net/bugs/788352
>
> Title:
>  Mac OS X menu bar given duplicate "Emacs" entries that do nothing
>
> Status in VM (View Mail) for Emacs:
>  New
>
> Bug description:
>  When running 8.2.0a on Mac OS X, the Mac menu bar starts out with a
>  single instance of the submenu "Emacs", and this submenu has no
>  entries. Then, each time I move to the next or previous message,
>  another instance of "Emacs" is added to the menu bar.
>
>  The attachment shows how things look after a few iterations of this.
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/vm/+bug/788352/+subscribe
>

Uday Reddy (reddyuday)
Changed in vm:
importance: Undecided → Low
assignee: nobody → Uday Reddy (reddyuday)
milestone: none → 8.2.0
status: New → Triaged
importance: Low → Medium
Revision history for this message
Uday Reddy (reddyuday) wrote : Re: [Bug 788352] Re: Mac OS X menu bar given duplicate "Emacs" entries that do nothing

mere user writes:

> sorry for taking time to respond. using these settings I could
> reproduce this with trunk as well. E

That is strange! Are you saying that it works fine for your standard .vm
file, but breaks for a minimal configuration file? So, what in your
standard .vm file could be fixing the problem?

Revision history for this message
Uday Reddy (reddyuday) wrote :

Things like "[Emacs]" are buttons. Not all windowing systems allow them. I
was under the impression that mac's allowed them. But perhaps not.

You can disable them by setting vm-use-menubar-buttons to nil in your .vm
file.

Cheers,
Uday

Revision history for this message
Alley Stoughton (alley-stoughton) wrote :

Uday,

 > Things like "[Emacs]" are buttons. Not all windowing systems allow them. I
 > was under the impression that mac's allowed them. But perhaps not.
 >
 > You can disable them by setting vm-use-menubar-buttons to nil in your .vm
 > file.

Putting

   (setq vm-use-menubar-buttons nil)

in either my .vm or my .emacs files doesn't seem to have any effect.

The Mac menu bar works fine with Emacs, in general. In VM mode, I've got
"File", "Edit", "Options", "Tools", "Headers", "Mail", "Buffers" and "Help"
menus, which work as expected.

But every time I type "n" or "p" another "Emacs" menu is added to the
menu bar. Eventually, there are so many of them that they're all
abbreviated to "...", meaning that I can no longer see any real
content in the menu bar. And unlike "File", etc., all the "Emacs"
menus have no menu items.

Alley

Revision history for this message
Uday Reddy (reddyuday) wrote :

Hi Alley, some questions:

- What happens when you click on the Emacs menu? Is there anything in the menu?

- Is there an Undo menu? Can you exercise it?

- Pick "Switch to Emacs menu" under "Help". Does the resulting Emacs menu have a "[VM]" button or "VM" menu? Does it work?

Cheers,
Uday

Revision history for this message
Uday Reddy (reddyuday) wrote :

Hi guys, please try the attached patch.

Changed in vm:
status: Triaged → In Progress
Revision history for this message
Alley Stoughton (alley-stoughton) wrote : [Bug 788352] Re: Mac OS X menu bar given duplicate "Emacs" entries that do nothing

Hi Uday,

 > Hi Alley, some questions:
 >
 > - What happens when you click on the Emacs menu? Is there anything in
 > the menu?

The extra Emacs menus are always empty. Of course, the very first
menu of an application is named after the application, in this case
"Emacs". It works normally.

 > - Is there an Undo menu? Can you exercise it?

Under the VM menu bar, there is an Undo menu, but it's empty.

 > - Pick "Switch to Emacs menu" under "Help". Does the resulting Emacs
 > menu have a "[VM]" button or "VM" menu? Does it work?

It has a VM menu, containing "Switch to VM Menubar", and this works.

When I first enter VM, there are two *extra* Emacs menus, one between
Emacs and Folder, and one between Dispose and Help.

When I use Help => Switch to Emacs Menubar, the Emacs menu on the right
is moved to the left, conserving the number of the extra Emacs menus.

Switching back to the VM Menubar introduces a new Emacs menu on the far
right.

And so on...

Alley

Revision history for this message
Uday Reddy (reddyuday) wrote : [Bug 788352] Re: Mac OS X menu bar given duplicate "Emacs" entries that do nothing

Alley Stoughton writes:

> The extra Emacs menus are always empty. Of course, the very first
> menu of an application is named after the application, in this case
> "Emacs". It works normally.

Aha, that would mean that there is a name conflict between the "Emacs" menu
that MacOS putting there and the "Emacs" menu defined by VM.

You might try replacing all occurrences of "Emacs" in vm-menu.el by some
other string, e.g., "Emacs*" and see if that solves the problem.

> When I first enter VM, there are two *extra* Emacs menus, one between
> Emacs and Folder, and one between Dispose and Help.

The one between Dispose and Help is put there by VM. I don't know where the
other one comes from.

Cheers,
Uday

Revision history for this message
mere user (emacs-user) wrote : Re: [Bug 788352] Re: Mac OS X menu bar given duplicate "Emacs" entries that do nothing

this does not fix the problem for me. assuming I applied the patch
and recompiled correctly...

On Sat, Jun 25, 2011 at 5:34 PM, Uday Reddy <email address hidden> wrote:
> Hi guys, please try the attached patch.
>
>
> ** Patch added: "Proposed fix for Emacs and Undo menus"
>   https://bugs.launchpad.net/vm/+bug/788352/+attachment/2181177/+files/872.diff
>
> ** Changed in: vm
>       Status: Triaged => In Progress
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/788352
>
> Title:
>  Mac OS X menu bar given duplicate "Emacs" entries that do nothing
>
> Status in VM (View Mail) for Emacs:
>  In Progress
>
> Bug description:
>  When running 8.2.0a on Mac OS X, the Mac menu bar starts out with a
>  single instance of the submenu "Emacs", and this submenu has no
>  entries. Then, each time I move to the next or previous message,
>  another instance of "Emacs" is added to the menu bar.
>
>  The attachment shows how things look after a few iterations of this.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/vm/+bug/788352/+subscriptions
>

Revision history for this message
mere user (emacs-user) wrote :

On Sat, Jun 25, 2011 at 6:20 PM, Uday Reddy > Aha, that would mean
that there is a name conflict between the "Emacs" menu
> that MacOS putting there and the "Emacs" menu defined by VM.
>
> You might try replacing all occurrences of "Emacs" in vm-menu.el by some
> other string, e.g., "Emacs*" and see if that solves the problem.

replacing Emacs with Emacss did not eliminate the problem for me

Revision history for this message
Alley Stoughton (alley-stoughton) wrote : [Bug 788352] Re: Mac OS X menu bar given duplicate "Emacs" entries that do nothing

Hi Uday,

 > Aha, that would mean that there is a name conflict between the "Emacs" menu
 > that MacOS putting there and the "Emacs" menu defined by VM.

I changed it to "[Emacs]". Combined with your patch, things work
properly now. Without the patch, the "[Emacs]" menu was empty.

:-)

Alley

Revision history for this message
Uday Reddy (reddyuday) wrote :

Ok, I have uploaded all the fixes to both the 8.2.x branch and the trunk. If there are still problems, please get back to me.

Changed in vm:
status: In Progress → Fix Committed
Revision history for this message
mere user (emacs-user) wrote : Re: [Bug 788352] Re: Mac OS X menu bar given duplicate "Emacs" entries that do nothing

it does look like this problem is gone now.

On Thu, Jun 30, 2011 at 11:56 AM, Launchpad Bug Tracker >  Mac OS X
menu bar given duplicate "Emacs" entries that do nothing
>
> Status in VM (View Mail) for Emacs:
>  Fix Committed

Uday Reddy (reddyuday)
tags: added: 8.2 ui
Uday Reddy (reddyuday)
Changed in vm:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.