[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#20074: edebug tracing can't be stopped with 'S'
From: |
Alan Mackenzie |
Subject: |
bug#20074: edebug tracing can't be stopped with 'S' |
Date: |
15 Mar 2015 19:55:10 -0000 |
User-agent: |
tin/2.2.0-20131224 ("Lochindaal") (UNIX) (FreeBSD/10.1-RELEASE (amd64)) |
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).
- bug#20074: edebug tracing can't be stopped with 'S', (continued)
- bug#20074: edebug tracing can't be stopped with 'S', Mario Valencia, 2015/03/13
- bug#20074: edebug tracing can't be stopped with 'S', Alexis, 2015/03/13
- bug#20074: edebug tracing can't be stopped with 'S', Eli Zaretskii, 2015/03/13
- bug#20074: edebug tracing can't be stopped with 'S', Alexis, 2015/03/13
- bug#20074: edebug tracing can't be stopped with 'S', Stefan Monnier, 2015/03/13
- bug#20074: edebug tracing can't be stopped with 'S', Alexis, 2015/03/13
- bug#20074: edebug tracing can't be stopped with 'S', Mario Valencia, 2015/03/14
Message not available
Message not available
Message not available