* 23.0.93; (error "Trying to use a menu from within a menu-entry")
@ 2009-05-14 15:28 Fabian Ezequiel Gallina
2009-05-17 9:41 ` Jan Djärv
0 siblings, 1 reply; 2+ messages in thread
From: Fabian Ezequiel Gallina @ 2009-05-14 15:28 UTC (permalink / raw)
To: emacs-devel
Hello,
I was playing around with x-popup-menu and popup-menu (I'm learning
Emacs LISP) and I found what I think is a bug.
The code is the following, in the comments are the steps to reproduce the bug.
<code>
;; This is a working example
(x-popup-menu
t '("Title" ("--" ("Item 1" . 1) ("Item 2" . 2) "--" ("Item 3" .
3) ("Item 4" . 4))))
;; This is an easymenu definition
(easy-menu-define my-menu nil "My own menu"
'("My Stuff"
["ERC" erc t]
["Tetris" tetris nil]))
;; This works fine (first you have to evaluate the easy-menu-define
;; above)
(popup-menu my-menu)
;; This triggers an error because the menu is malformed but the
;; problem is that after evaluating this all the other examples stop
;; working.
;; The error thrown when evaluating the other examples is:
;; (error "Trying to use a menu from within a menu-entry")
(x-popup-menu
t '("Title" (("Item 1" . 1) ("Item 2" . 2) "--" ("Item 3" . 3)
("Item 4" . 4))))
</code>
This is what triggers the evaluation of the previous working examples:
Debugger entered--Lisp error: (error "Trying to use a menu from within
a menu-entry")
x-popup-menu(t ("Title" ("--" ("Item 1" . 1) ("Item 2" . 2) "--"
("Item 3" . 3) ("Item 4" . 4))))
eval((x-popup-menu t (quote ("Title" ...))))
eval-last-sexp-1(nil)
eval-last-sexp(nil)
call-interactively(eval-last-sexp nil nil)
recursive-edit()
byte-code([] [unread-command-char debugger-args x debugger-buffer
noninteractive debugger-batch-max-lines -1 debug backtrace-debug 4 t
backtrace-frame lambda 5 pop-to-buffer debugger-mode
debugger-setup-buffer count-lines 2 "...\n" message "%s" buffer-string
kill-emacs "" nil recursive-edit middlestart buffer-read-only
standard-output] 4)
Regards,
Fabián E. Gallina.
(Attached below is additional relevant information)
In GNU Emacs 23.0.93.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.16.1)
of 2009-05-09 on cuca
Windowing system distributor `The X.Org Foundation', version 11.0.10402000
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: es_AR.UTF-8
value of $XMODIFIERS: nil
locale-coding-system: utf-8-unix
default-enable-multibyte-characters: t
Major mode: Debugger
Minor modes in effect:
shell-dirtrack-mode: t
tabkey2-mode: t
nxhtml-global-minor-mode: t
yas/minor-mode: t
tooltip-mode: t
tool-bar-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-encryption-mode: t
auto-compression-mode: t
column-number-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
<help-echo> C-x k <return> C-x k <return> C-x k <return>
C-x k <return> C-x k <return> C-x 1 C-x C-f t e s t
. e l <return> <down> <down> <down> <down> C-e <up>
C-e C-x C-e <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <C-up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <C-up>
<C-up> <up> <up> <up> <up> <up> M-x r e p <tab> o r
<tab> <return> C-g C-g <down> <down> <down> C-e C-x
C-e <down> <down> <down> <down> <down> <down> C-e C-x
C-e <down> <down> <down> <down> C-x C-e <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
C-x C-e C-g C-x o C-x 1 <C-up> <C-up> <C-up> <C-up>
<down> <down> <down> <down> <up> C-e C-x C-e C-x o
C-x o <up> C-SPC <down> <down> <down> <down> <down>
<down> <down> <down> M-w M-x C-g <up> <up> <up> <up>
<up> <up> <up> <up> <C-right> <C-right> <C-right> <C-right>
<right> <right> C-SPC <C-right> <C-right> <C-right>
<C-right> <C-right> <C-right> <C-right> <C-right> <C-right>
<C-right> <C-right> <C-right> <left> <left> <left>
<left> M-w M-x <up> <return>
Recent messages:
Making completion list...
Quit [3 times]
nil
Quit
Entering debugger...
Quit
Entering debugger...
Mark set
Quit
Mark set
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: 23.0.93; (error "Trying to use a menu from within a menu-entry")
2009-05-14 15:28 23.0.93; (error "Trying to use a menu from within a menu-entry") Fabian Ezequiel Gallina
@ 2009-05-17 9:41 ` Jan Djärv
0 siblings, 0 replies; 2+ messages in thread
From: Jan Djärv @ 2009-05-17 9:41 UTC (permalink / raw)
To: Fabian Ezequiel Gallina; +Cc: emacs-devel
Hello.
Did you press q in the "Debugger entered--Lisp error:" buffer before trying to
evaluate x-popup-menu again, or did you just hide it, kill it or leave it there?
It seems that the unwind-protect (which resets the menu within a menu thing)
isn't run until after you quit the Lisp debugger properly.
Jan D.
Fabian Ezequiel Gallina skrev:
> Hello,
>
> I was playing around with x-popup-menu and popup-menu (I'm learning
> Emacs LISP) and I found what I think is a bug.
>
> The code is the following, in the comments are the steps to reproduce the bug.
>
> <code>
>
> ;; This is a working example
> (x-popup-menu
> t '("Title" ("--" ("Item 1" . 1) ("Item 2" . 2) "--" ("Item 3" .
> 3) ("Item 4" . 4))))
>
> ;; This is an easymenu definition
> (easy-menu-define my-menu nil "My own menu"
> '("My Stuff"
> ["ERC" erc t]
> ["Tetris" tetris nil]))
>
> ;; This works fine (first you have to evaluate the easy-menu-define
> ;; above)
>
> (popup-menu my-menu)
>
> ;; This triggers an error because the menu is malformed but the
> ;; problem is that after evaluating this all the other examples stop
> ;; working.
> ;; The error thrown when evaluating the other examples is:
> ;; (error "Trying to use a menu from within a menu-entry")
> (x-popup-menu
> t '("Title" (("Item 1" . 1) ("Item 2" . 2) "--" ("Item 3" . 3)
> ("Item 4" . 4))))
>
> </code>
>
> This is what triggers the evaluation of the previous working examples:
>
> Debugger entered--Lisp error: (error "Trying to use a menu from within
> a menu-entry")
> x-popup-menu(t ("Title" ("--" ("Item 1" . 1) ("Item 2" . 2) "--"
> ("Item 3" . 3) ("Item 4" . 4))))
> eval((x-popup-menu t (quote ("Title" ...))))
> eval-last-sexp-1(nil)
> eval-last-sexp(nil)
> call-interactively(eval-last-sexp nil nil)
> recursive-edit()
> byte-code([] [unread-command-char debugger-args x debugger-buffer
> noninteractive debugger-batch-max-lines -1 debug backtrace-debug 4 t
> backtrace-frame lambda 5 pop-to-buffer debugger-mode
> debugger-setup-buffer count-lines 2 "...\n" message "%s" buffer-string
> kill-emacs "" nil recursive-edit middlestart buffer-read-only
> standard-output] 4)
>
>
> Regards,
> Fabián E. Gallina.
>
>
> (Attached below is additional relevant information)
>
> In GNU Emacs 23.0.93.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.16.1)
> of 2009-05-09 on cuca
> Windowing system distributor `The X.Org Foundation', version 11.0.10402000
> 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: es_AR.UTF-8
> value of $XMODIFIERS: nil
> locale-coding-system: utf-8-unix
> default-enable-multibyte-characters: t
>
> Major mode: Debugger
>
> Minor modes in effect:
> shell-dirtrack-mode: t
> tabkey2-mode: t
> nxhtml-global-minor-mode: t
> yas/minor-mode: t
> tooltip-mode: t
> tool-bar-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-encryption-mode: t
> auto-compression-mode: t
> column-number-mode: t
> line-number-mode: t
> transient-mark-mode: t
>
> Recent input:
> <help-echo> C-x k <return> C-x k <return> C-x k <return>
> C-x k <return> C-x k <return> C-x 1 C-x C-f t e s t
> . e l <return> <down> <down> <down> <down> C-e <up>
> C-e C-x C-e <down> <down> <down> <down> <down> <down>
> <down> <down> <down> <down> <down> <down> <down> <down>
> <down> <down> <down> <down> <down> <down> <down> <down>
> <down> <down> <down> <down> <down> <down> <down> <down>
> <down> <C-up> <up> <up> <up> <up> <up> <up> <up> <up>
> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <C-up>
> <C-up> <up> <up> <up> <up> <up> M-x r e p <tab> o r
> <tab> <return> C-g C-g <down> <down> <down> C-e C-x
> C-e <down> <down> <down> <down> <down> <down> C-e C-x
> C-e <down> <down> <down> <down> C-x C-e <down> <down>
> <down> <down> <down> <down> <down> <down> <down> <down>
> C-x C-e C-g C-x o C-x 1 <C-up> <C-up> <C-up> <C-up>
> <down> <down> <down> <down> <up> C-e C-x C-e C-x o
> C-x o <up> C-SPC <down> <down> <down> <down> <down>
> <down> <down> <down> M-w M-x C-g <up> <up> <up> <up>
> <up> <up> <up> <up> <C-right> <C-right> <C-right> <C-right>
> <right> <right> C-SPC <C-right> <C-right> <C-right>
> <C-right> <C-right> <C-right> <C-right> <C-right> <C-right>
> <C-right> <C-right> <C-right> <left> <left> <left>
> <left> M-w M-x <up> <return>
>
> Recent messages:
> Making completion list...
> Quit [3 times]
> nil
> Quit
> Entering debugger...
> Quit
> Entering debugger...
> Mark set
> Quit
> Mark set
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-05-17 9:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-14 15:28 23.0.93; (error "Trying to use a menu from within a menu-entry") Fabian Ezequiel Gallina
2009-05-17 9:41 ` Jan Djärv
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.