From: Alan Mackenzie <acm@muc.de>
To: 20074@debbugs.gnu.org
Cc: Mario Valencia <mariovalspi@gmail.com>
Subject: bug#20074: edebug tracing can't be stopped with 'S'
Date: 15 Mar 2015 19:55:10 -0000 [thread overview]
Message-ID: <20150315195510.9240.qmail@mail.muc.de> (raw)
In-Reply-To: <mailman.2056.1426435627.31049.bug-gnu-emacs@gnu.org>
Hello, Mario.
In article <mailman.2056.1426435627.31049.bug-gnu-emacs@gnu.org> I wrote:
> In article <mailman.2024.1426359010.31049.bug-gnu-emacs@gnu.org> you wrote:
>> [-- text/plain, encoding quoted-printable, charset: UTF-8, 72 lines --]
>> The manual should have a note indicating this is unimplemented
>> functionality, and the feature should be put in the emacs to-do list. I
>> consider this to be high priority. Also please don't forget to include my
>> email as a recipient for messages in this bug.
>> 2015-03-13 3:36 GMT-06:00 Mario Valencia <mariovalspi@gmail.com>:
>>> So is this going to be fixed or what?
> What is happening is that while tracing, edebug is waiting for an input
> event with "(sit-for 1)". When you type the "S", sit-for pushes it onto
> `unread-command-events' and returns. Unfortunately, before calling the
> recursive edit into the edebug command loop, `unread-command-events' gets
> bound to nil, thus edebug doesn't see the "S". The motivation here is
> probably to separate the "outside" event queue from edebug's event queue.
> Here is a fix (which Eli will probably call a workaround ;-). In trace
> mode, the top event (if any) is pulled off the "outside"
> `unread-command-events' and pushed onto edebug's binding of it.
Please disregard the above paragraphs and the patch in my last email. They
were wrong.
What is actually happening is that while tracing, a "(sit-for 1)" in
edebug--display-1, when you press "S", pushes that event onto
`unread-command-events'. However, there is nothing to trigger the entry
into the recursive edit. Because `unread-command-events' is locally
bound in this defun, the "S" simply disappears when the enclosing `let'
form terminates.
The fix is to test the result of `sit-for', and to set `edebug-stop' when
a key was pressed.
Please try this out:
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index 1091877..c3c4035 100644
--- a/lisp/emacs-lisp/edebug.el
+++ b/lisp/emacs-lisp/edebug.el
@@ -2506,7 +2528,8 @@ MSG is printed after `::::} '."
(t (setq edebug-stop t))))
;; not edebug-break
((eq edebug-execution-mode 'trace)
- (sit-for edebug-sit-for-seconds)) ; Force update and pause.
+ (if (not (sit-for edebug-sit-for-seconds))
+ (setq edebug-stop t))) ; Force update and pause.
((eq edebug-execution-mode 'Trace-fast)
(sit-for 0))) ; Force update and continue.
--
Alan Mackenzie (Nuremberg, Germany).
next prev parent reply other threads:[~2015-03-15 19:55 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-10 20:42 bug#20074: edebug tracing can't be stopped with 'S' Mario Valencia
2015-03-11 16:24 ` Eli Zaretskii
[not found] ` <CA+3HrJXsgWHQG_6zk2vNXzEaqT8w-5-cw26fkLYH0xQXmk=nSQ@mail.gmail.com>
2015-03-11 16:28 ` bug#20074: Fwd: " Mario Valencia
2015-03-11 16:30 ` Mario Valencia
2015-03-13 9:36 ` Mario Valencia
2015-03-13 10:19 ` Alexis
2015-03-13 11:07 ` Eli Zaretskii
2015-03-13 11:37 ` Alexis
2015-03-13 13:20 ` Stefan Monnier
2015-03-13 14:02 ` Alexis
2015-03-14 18:49 ` Mario Valencia
[not found] ` <mailman.2024.1426359010.31049.bug-gnu-emacs@gnu.org>
2015-03-15 16:06 ` Alan Mackenzie
2015-03-15 20:36 ` Stefan Monnier
2015-03-15 21:31 ` Alan Mackenzie
[not found] ` <mailman.2056.1426435627.31049.bug-gnu-emacs@gnu.org>
2015-03-15 19:55 ` Alan Mackenzie [this message]
2015-03-16 3:12 ` Stefan Monnier
2015-03-16 11:38 ` Alan Mackenzie
2015-03-16 13:11 ` Stefan Monnier
[not found] ` <mailman.1823.1426020966.31049.bug-gnu-emacs@gnu.org>
2015-03-16 22:21 ` Alan Mackenzie
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=20150315195510.9240.qmail@mail.muc.de \
--to=acm@muc.de \
--cc=20074@debbugs.gnu.org \
--cc=mariovalspi@gmail.com \
/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.