bug-gnu-emacs
[Top][All Lists]
Advanced

[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 16:06:49 -0000
User-agent: tin/2.2.0-20131224 ("Lochindaal") (UNIX) (FreeBSD/10.1-RELEASE (amd64))

Hello, Mario.

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.



diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index 1091877..f1df101 100644
--- a/lisp/emacs-lisp/edebug.el
+++ b/lisp/emacs-lisp/edebug.el
@@ -2397,7 +2416,15 @@ MSG is printed after `::::} '."
          (default-value 'cursor-in-non-selected-windows)))
     (unwind-protect
        (let ((cursor-in-echo-area nil)
-             (unread-command-events nil)
+             ;; (unread-command-events nil)
+             (unread-command-events
+              (if (and unread-command-events
+                       (eq edebug-execution-mode 'trace))
+                  (let ((event (car unread-command-events)))
+                    (setq unread-command-events (cdr
+                                                 unread-command-events))
+                    (list event))
+                nil))
              ;; any others??
              )
           (setq-default cursor-in-non-selected-windows t)


-- 
Alan Mackenzie (Nuremberg, Germany).






reply via email to

[Prev in Thread] Current Thread [Next in Thread]