Possible bug (and possible fix) in aquamacs-make-mouse-buffer-menu

7 views
Skip to first unread message

Robert Goldman

unread,
Mar 24, 2013, 1:03:50 PM3/24/13
to Development of Aquamacs Emacs
I was running with debug-on-error and got an error inside this function.

It looks to me like the loop over the buffers and modes gets a bad
behavior when it hits an org-mode agenda buffer.

I get an error in this stack frame:

string-match("Info\\|Help\\|Apropos\\|Man" ("Org-Agenda" "" " " (:eval
(org-agenda-span-name org-agenda-current-span)) "" "" "" " Ddl" " Grid"
"" "" "" "" "" ""))

Here's what describe variable gives me:

mode-name is a variable defined in `C source code'.
Its value is ("Org-Agenda" "" " "
(:eval
(org-agenda-span-name org-agenda-current-span))
"" "" "" " Ddl" " Grid" "" "" "" "" "" "")

Local in buffer *Org Agenda*; global value is 0

Automatically becomes buffer-local when set.
This variable may be risky if used as a file-local variable.

Documentation:
Pretty name of current buffer's major mode.
Usually a string, but can use any of the constructs for `mode-line-format',
which see.
Format with `format-mode-line' to produce a string value.

This suggests it may be an error in a-m-m-b-m to assume that mode-name
is a string. Should this function call (format-mode-line mode-name) and
match the return value, instead of matching mode-name directly?



version info: GNU Emacs 24.3.50.3 (x86_64-apple-darwin10.8.0, NS
apple-appkit-1038.36)
of 2013-03-19 on asura.local - Aquamacs Distribution 3.xdev

Cheers,
r

David Reitter

unread,
Mar 25, 2013, 2:39:01 PM3/25/13
to Robert Goldman, aquamac...@googlegroups.com
R,
You are obviously right, it should call `format-mode-line'.
Same in `aquamacs-get-mouse-major-mode-menu'.

If you send me a patch, I'd be happy to apply it right away.

I can't reproduce this, by the way- my org-agenda doesn't have this behavior. Do you have a newer version of org installed?

Thanks,
David


--
http://aquamacs.org -- Aquamacs: Emacs on Mac OS X
http://aquamacs.org/donate -- Could we help you? Return the favor and support the Aquamacs Project!
> --
> You received this message because you are subscribed to the Google Groups "aquamacs-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to aquamacs-deve...@googlegroups.com.
>
>

Robert Goldman

unread,
Apr 1, 2013, 8:26:41 PM4/1/13
to David Reitter, aquamac...@googlegroups.com
On 3/25/13 Mar 25 -1:39 PM, David Reitter wrote:
> R,
> You are obviously right, it should call `format-mode-line'.
> Same in `aquamacs-get-mouse-major-mode-menu'.
>
> If you send me a patch, I'd be happy to apply it right away.


>
> I can't reproduce this, by the way- my org-agenda doesn't have this behavior. Do you have a newer version of org installed?

I run from pretty close to bleeding edge, as I occasionally submit a
patch....

I can reproduce it by doing

M-: (aquamacs-get-mouse-major-mode-menu) in an org-mode agenda buffer
(for day or week) with debug-on-error set to t.

Do you see the same if you do that? Looks like there's some error
trapping somewhere, so that one doesn't notice this without d-o-e t.

I'm attaching the patch file, to be applied at the top level of the source.

Sorry to have taken so long.

osxkeys-tabbar.patch

David Reitter

unread,
Apr 2, 2013, 12:49:09 PM4/2/13
to rpgo...@sift.info, aquamac...@googlegroups.com
Thank you. I have applied this along with an appropriate commit message.
> <osxkeys-tabbar.patch>

Reply all
Reply to author
Forward
0 new messages