GNU bug report logs - #179
23.0.60; Menu separators are not displayed

Previous Next

Package: emacs;

Reported by: David Kastrup <dak <at> gnu.org>

Date: Thu, 1 May 2008 22:05:07 UTC

Severity: normal

Tags: moreinfo, patch

Done: Chong Yidong <cyd <at> stupidchicken.com>

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 179 in the body.
You can then email your comments to 179 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-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#179; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to David Kastrup <dak <at> gnu.org>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: David Kastrup <dak <at> gnu.org>
To: emacs-pretest-bug <at> gnu.org
Subject: 23.0.60; Menu separators are not displayed
Date: Thu, 01 May 2008 23:56:22 +0200
Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.

Your bug report will be posted to the emacs-pretest-bug <at> gnu.org mailing list.

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

I have a menu looking like

preview-menu's value is shown below.

Documentation:
This is the menu for preview-latex.

Value: 
(keymap "Preview"
	(nil menu-item "Generate previews")
	(\(or\ toggle\)\ at\ point menu-item "(or toggle) at point" preview-at-point
	 ([3 16 16]
	  . "  C-c C-p C-p"))
	(for\ environment menu-item "for environment" preview-environment
			  ([3 16 5]
			   . "  C-c C-p C-e"))
	(for\ section menu-item "for section" preview-section
		      ([3 16 19]
		       . "  C-c C-p C-s"))
	(for\ region menu-item "for region" preview-region
		     ([3 16 18]
		      . "  C-c C-p C-r")
		     :enable
		     (preview-mark-active))
	(for\ buffer menu-item "for buffer" preview-buffer
		     ([3 16 2]
		      . "  C-c C-p C-b"))
	(for\ document menu-item "for document" preview-document
		       ([3 16 4]
			. "  C-c C-p C-d"))
	(nil menu-item "---")
	(nil menu-item "Remove previews")
	(at\ point menu-item "at point" preview-clearout-at-point
		   ([3 16 3 16]
		    . "  C-c C-p C-c C-p"))
	(from\ section menu-item "from section" preview-clearout-section
		       ([3 16 3 19]
			. "  C-c C-p C-c C-s"))
	(from\ region menu-item "from region" preview-clearout
		      ([3 16 3 18]
		       . "  C-c C-p C-c C-r")
		      :enable
		      (preview-mark-active))
	(from\ buffer menu-item "from buffer" preview-clearout-buffer
		      ([3 16 3 2]
		       . "  C-c C-p C-c C-b"))
	(from\ document menu-item "from document" preview-clearout-document
			([3 16 3 4]
			 . "  C-c C-p C-c C-d"))
	(nil menu-item "---")
	(nil menu-item "Turn preamble cache")
	(on menu-item "on" preview-cache-preamble
	    ([3 16 6]
	     . "  C-c C-p C-f"))
	(off menu-item "off" preview-cache-preamble-off
	     ([3 16 3 6]
	      . "  C-c C-p C-c C-f"))
	(nil menu-item "---")
	(Customize menu-item "Customize"
		   (keymap "Customize"
			   (Browse\ options menu-item "Browse options" menu-function-194
					    (nil)
					    :key-sequence nil)
			   (Extend\ this\ menu menu-item "Extend this menu" menu-function-195
					       (nil)
					       :key-sequence nil)))
	(Read\ documentation menu-item "Read documentation" preview-goto-info-page
			     ([3 16 9]
			      . "  C-c C-p TAB"))
	(Report\ Bug menu-item "Report Bug" preview-report-bug
		     (nil)))

[back]


and neither the separator lines nor the separator titles are shown.
This menu was generated using

  (easy-menu-define preview-menu LaTeX-mode-map
    "This is the menu for preview-latex."
    '("Preview"
      "Generate previews"
      ["(or toggle) at point" preview-at-point]
      ["for environment" preview-environment]
      ["for section" preview-section]
      ["for region" preview-region (preview-mark-active)]
      ["for buffer" preview-buffer]
      ["for document" preview-document]
      "---"
      "Remove previews"
      ["at point" preview-clearout-at-point]
      ["from section" preview-clearout-section]
      ["from region" preview-clearout (preview-mark-active)]
      ["from buffer" preview-clearout-buffer]
      ["from document" preview-clearout-document]
      "---"
      "Turn preamble cache"
      ["on" preview-cache-preamble]
      ["off" preview-cache-preamble-off]
      "---"
      ("Customize"
       ["Browse options"
	(customize-group 'preview)]
       ["Extend this menu"
	(easy-menu-add-item
	 nil '("Preview")
	 (customize-menu-create 'preview))])
      ["Read documentation" preview-goto-info-page]
      ["Report Bug" preview-report-bug]))



In GNU Emacs 23.0.60.8 (i686-pc-linux-gnu, GTK+ Version 2.12.9)
 of 2008-05-01 on lola
Windowing system distributor `The X.Org Foundation', version 11.0.10400090
configured using `configure  '--prefix=/usr/local/emacs-21' '--without-toolkit-scroll-bars' 'CFLAGS=-g -O2 -fno-crossjumping''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default-enable-multibyte-characters: t

Major mode: LaTeX

Minor modes in effect:
  reftex-mode: t
  desktop-save-mode: t
  minibuffer-electric-default-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<up> <up> <up> <up> <up> <up> <right> <right> <down> 
<down> <down> <down> <down> <down> <up> <up> <up> <up> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <up> <up> <up> <up> <up> <up> <up> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> C-x k 
<return> C-x b b o g <backspace> <backspace> i f <backspace> 
g o <backspace> f o <tab> <return> < C-/ <escape> < 
C-s h y p p <backspace> e r r e f C-s C-s C-s <down> 
<down> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> C-x b p r e v <tab> 
<backspace> <backspace> C-g C-x o C-x C-f / h o m e 
p <backspace> / t m p / a u c t e x / p r e v i e w 
/ p r v - e m <tab> <return> C-x 1 C-g C-s o n <up> 
C-s m e n u C-s C-s C-s <down> <up> C-x b C-g C-x C-f 
m e n <backspace> <backspace> <backspace> p r e v i 
e w . e l <tab> <return> C-s m e n u C-s C-s C-s C-s 
C-s C-s <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> C-h v p r e v i e w - m e n <tab> <return> 
C-x o <next> <next> <next> C-x b b i g f o o t . t 
e <backspace> <backspace> <backspace> <backspace> <backspace> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
d i s s . t e x <return> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <menu-bar> <help-menu> <se
nd-emacs-bug-report>

Recent messages:
Quit
Note: file is write protected
Undo!
Mark set
Mark saved where search started
Quit [2 times]
Mark saved where search started [2 times]
Quit
Mark saved where search started
Type C-x 1 to delete the help window, C-M-v to scroll help.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum






Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#179; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #10 received at 179 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: 179 <at> debbugs.gnu.org
Subject: Menu separators are not displayed
Date: Mon, 05 May 2008 03:00:00 -0400
Does the patch below fix it?


        Stefan


--- subr.el.~1.594.~	2008-05-02 12:47:05.000000000 -0400
+++ subr.el	2008-05-05 02:58:00.000000000 -0400
@@ -571,10 +571,14 @@
       (let* ((key (car binding))
              (item (cdr binding))
              (oldbind (assq key bindings)))
+        (if (null key)
+            ;; nil keys are/were used by easy-menu for "separator lines and
+            ;; separator titles".  Merging them makes no sense.
+            (push binding bindings)
         ;; Newer bindings override older.
         (if oldbind (setq bindings (delq oldbind bindings)))
         (when item                      ;nil bindings just hide older ones.
-          (push binding bindings))))
+            (push binding bindings)))))
     (nconc map bindings)))
 
 (put 'keyboard-translate-table 'char-table-extra-slots 0)




Tags added: patch, moreinfo Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Mon, 30 Jun 2008 21:25:04 GMT) Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#179; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Chong Yidong <cyd <at> stupidchicken.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #17 received at 179 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: David Kastrup <dak <at> gnu.org>
Cc: 179 <at> debbugs.gnu.org
Subject: Re: 23.0.60; Menu separators are not displayed
Date: Tue, 05 Aug 2008 17:54:49 -0400
Hello David,

Did you ever get the chance to try Stefan's patch from May?


Stefan Monnier <monnier <at> iro.umontreal.ca> wrote:

> Does the patch below fix it?
>
>         Stefan

--- subr.el.~1.594.~	2008-05-02 12:47:05.000000000 -0400
+++ subr.el	2008-05-05 02:58:00.000000000 -0400
@@ -571,10 +571,14 @@
       (let* ((key (car binding))
              (item (cdr binding))
              (oldbind (assq key bindings)))
+        (if (null key)
+            ;; nil keys are/were used by easy-menu for "separator lines and
+            ;; separator titles".  Merging them makes no sense.
+            (push binding bindings)
         ;; Newer bindings override older.
         (if oldbind (setq bindings (delq oldbind bindings)))
         (when item                      ;nil bindings just hide older ones.
-          (push binding bindings))))
+            (push binding bindings)))))
     (nconc map bindings)))
 
 (put 'keyboard-translate-table 'char-table-extra-slots 0)




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#179; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to David Kastrup <dak <at> gnu.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #22 received at 179 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: David Kastrup <dak <at> gnu.org>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: 179 <at> debbugs.gnu.org
Subject: Re: 23.0.60; Menu separators are not displayed
Date: Wed, 06 Aug 2008 00:10:07 +0200
Chong Yidong <cyd <at> stupidchicken.com> writes:

> Did you ever get the chance to try Stefan's patch from May?
>
>
> Stefan Monnier <monnier <at> iro.umontreal.ca> wrote:
>
>> Does the patch below fix it?
>>
>>         Stefan
>
> --- subr.el.~1.594.~	2008-05-02 12:47:05.000000000 -0400
> +++ subr.el	2008-05-05 02:58:00.000000000 -0400
> @@ -571,10 +571,14 @@
>        (let* ((key (car binding))
>               (item (cdr binding))
>               (oldbind (assq key bindings)))
> +        (if (null key)
> +            ;; nil keys are/were used by easy-menu for "separator lines and
> +            ;; separator titles".  Merging them makes no sense.
> +            (push binding bindings)
>          ;; Newer bindings override older.
>          (if oldbind (setq bindings (delq oldbind bindings)))
>          (when item                      ;nil bindings just hide older ones.
> -          (push binding bindings))))
> +            (push binding bindings)))))
>      (nconc map bindings)))
>  
>  (put 'keyboard-translate-table 'char-table-extra-slots 0)
>

My current Emacs does not have this patch applied (or include the
equivalent) and does show menu separators.  So at least the problem I
reported would appear to be fixed (I am judging from the subject line of
the bug report, don't have the report itself here).

However, that does not mean that Stefan might not have unrelatedly
detected some special case not covered by the current code.  So while
the particular problem I have reported might no longer be present in the
code base, you should perhaps ask Stefan what case he had been thinking
about when creating the patch.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#179; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #27 received at 179 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: David Kastrup <dak <at> gnu.org>
Cc: 179 <at> debbugs.gnu.org, Chong Yidong <cyd <at> stupidchicken.com>
Subject: Re: bug#179: 23.0.60; Menu separators are not displayed
Date: Fri, 08 Aug 2008 14:31:36 -0400
>> Did you ever get the chance to try Stefan's patch from May?
>> 
>> 
>> Stefan Monnier <monnier <at> iro.umontreal.ca> wrote:
>> 
>>> Does the patch below fix it?
>>> 
>>> Stefan
>> 
>> --- subr.el.~1.594.~	2008-05-02 12:47:05.000000000 -0400
>> +++ subr.el	2008-05-05 02:58:00.000000000 -0400
>> @@ -571,10 +571,14 @@
>> (let* ((key (car binding))
>> (item (cdr binding))
>> (oldbind (assq key bindings)))
>> +        (if (null key)
>> +            ;; nil keys are/were used by easy-menu for "separator lines and
>> +            ;; separator titles".  Merging them makes no sense.
>> +            (push binding bindings)
>> ;; Newer bindings override older.
>> (if oldbind (setq bindings (delq oldbind bindings)))
>> (when item                      ;nil bindings just hide older ones.
>> -          (push binding bindings))))
>> +            (push binding bindings)))))
>> (nconc map bindings)))
>> 
>> (put 'keyboard-translate-table 'char-table-extra-slots 0)
>> 

> My current Emacs does not have this patch applied (or include the
> equivalent) and does show menu separators.  So at least the problem I
> reported would appear to be fixed (I am judging from the subject line of
> the bug report, don't have the report itself here).

Indeed, IIRC I installed a different patch for this problem.  It turns
out that the nil binding is actually not special in any way and that
most separators use other names than nil, so I changed easy-menu to not
use nil either, which makes the above patch unneeded (and probably
undesirable either).


        Stefan




bug closed, send any further explanations to David Kastrup <dak <at> gnu.org> Request was from Chong Yidong <cyd <at> stupidchicken.com> to control <at> emacsbugs.donarmstrong.com. (Mon, 11 Aug 2008 23:40:04 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <don <at> donarmstrong.com> to internal_control <at> emacsbugs.donarmstrong.com. (Tue, 09 Sep 2008 14:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 16 years and 337 days ago.

Previous Next


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