From: Stephen Berman via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 70938@debbugs.gnu.org
Subject: bug#70938: 30.0.50; Edebug appropriates overriding-terminal-local-map
Date: Tue, 14 May 2024 15:24:10 +0200 [thread overview]
Message-ID: <877cfwh6h1.fsf@gmx.net> (raw)
While I was edebugging in todo-mode.el (bug#70937) Emacs got into a
state where Edebug kicked in even after I removed the instrumentation
from the code. AFAICT from further debugging, the issue has to do with
the way todo-mode.el uses set-transient-map. To provide a reproducer
that does not involve todo-mode.el I have extracted and simplified the
triggering function from that file and included it in the attached file.
0. emacs -Q -l test-edebug-override-map.el
1. M-x srb-test
2. At the prompt type one of the keys listed between the curly braces,
which removes that group and prompts again; keeping typing till there
is no further prompt, then a message displays the typed keys in the
order they were typed in.
3. Now visit test-edebug-override-map.el and with point in the function
srb-test--next type `C-u C-M-x' to instrument it for Edebug.
4. Type M-s srb-test again and when Edebug stops execution, type `f'
twice to step through the entire function so Edebug releases control.
5. Now with point again in srb-test--next type `C-M-x' to remove the
instrumentation. You can confirm this by repeating steps 1-2 without
Edebug kicking.
6. Now type any of the keys that were listed in the prompt on invoking
srb-test (these keys are the strings in the value of
srb-test--key-groups).
=> This makes Edebug kick in with execution stopped at one of the two
occurrences of the sexp `(setq keys-so-far (concat keys-so-far " "
(funcall this-key)))' in srb-test--next. The same thing happens with
sequences containg one of these keys, e.g. `M-x k'.
I did find a way to prevent Edebug from kicking in: uncomment the lines
in the test file containing "exitfn"; this explicitly deactivates the
transient map when the function returns, but it also makes the function
a noop, so it's no fix for the problem.
After step 4., when I type `C-h b' to show all current key bindings, the
*Help* buffer contains a listing like this:
Overriding Bindings:
Key Binding
c .. d #<interpreted-function AA2>
h #<interpreted-function BAB>
i #<interpreted-function 8CC>
k #<interpreted-function 9AC>
n #<interpreted-function A7F>
p #<interpreted-function 917>
r #<interpreted-function B53>
t #<interpreted-function BD6>
y #<interpreted-function 9F1>
The codes AA2, etc. are links, and clicking on these pops up a *Help
Source* buffer containing elisp code like this:
#[nil
((edebug-enter 'edebug-anon5 (list)
#'(lambda nil :closure-dont-trim-context
(edebug-after (edebug-before 0) 7
(setq keys-so-far
(edebug-after
(edebug-before 1) 6
(concat
(edebug-after 0 2
keys-so-far)
" "
(edebug-after
(edebug-before 3) 5
(funcall
(edebug-after 0 4
this-key)))))))
This is evidently from the instrumented function. What I haven't been
able to determine is why this remains even after the instrumentation has
been removed; it seems that Edebug has appropriated
overriding-terminal-local-map. The only way I have found to release it
is `M-x unload-library RET edebug'.
In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.41, cairo version 1.18.0) of 2024-05-08 built on strobelfs
Repository revision: e020f4e9ce5d98438033fea098d943c311b0fa3d
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101013
System Description: Linux From Scratch r12.1-53
Configured using:
'configure -C 'CFLAGS=-Og -g3' PKG_CONFIG_PATH=/opt/qt5/lib/pkgconfig'
Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
LCMS2 LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG
RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER
WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB
next reply other threads:[~2024-05-14 13:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-14 13:24 Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-05-14 19:59 ` bug#70938: 30.0.50; Edebug appropriates overriding-terminal-local-map Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-14 20:15 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-14 21:23 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-14 22:02 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-15 15:24 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-15 18:51 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-21 9:15 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-27 14:37 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-27 15:48 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877cfwh6h1.fsf@gmx.net \
--to=bug-gnu-emacs@gnu.org \
--cc=70938@debbugs.gnu.org \
--cc=stephen.berman@gmx.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.