From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#20074: edebug tracing can't be stopped with 'S' Date: 15 Mar 2015 16:06:49 -0000 Organization: muc.de e.V. Message-ID: <20150315160649.53351.qmail@mail.muc.de> References: NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1426435638 1657 80.91.229.3 (15 Mar 2015 16:07:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 15 Mar 2015 16:07:18 +0000 (UTC) Cc: Mario Valencia To: 20074@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Mar 15 17:07:10 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YXB4H-00008O-EY for geb-bug-gnu-emacs@m.gmane.org; Sun, 15 Mar 2015 17:07:09 +0100 Original-Received: from localhost ([::1]:43923 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YXB4G-0007Nx-Rr for geb-bug-gnu-emacs@m.gmane.org; Sun, 15 Mar 2015 12:07:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54316) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YXB4D-0007Ns-Gb for bug-gnu-emacs@gnu.org; Sun, 15 Mar 2015 12:07:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YXB4A-0006a4-A2 for bug-gnu-emacs@gnu.org; Sun, 15 Mar 2015 12:07:05 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48758) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YXB4A-0006Zz-6V for bug-gnu-emacs@gnu.org; Sun, 15 Mar 2015 12:07:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YXB49-0002sQ-VQ for bug-gnu-emacs@gnu.org; Sun, 15 Mar 2015 12:07:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 15 Mar 2015 16:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20074 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20074-submit@debbugs.gnu.org id=B20074.142643561411043 (code B ref 20074); Sun, 15 Mar 2015 16:07:01 +0000 Original-Received: (at 20074) by debbugs.gnu.org; 15 Mar 2015 16:06:54 +0000 Original-Received: from localhost ([127.0.0.1]:47326 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YXB41-0002s2-Bo for submit@debbugs.gnu.org; Sun, 15 Mar 2015 12:06:53 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:45446 helo=mail.muc.de) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YXB3y-0002rp-9N for 20074@debbugs.gnu.org; Sun, 15 Mar 2015 12:06:51 -0400 Original-Received: (qmail 53352 invoked by uid 3782); 15 Mar 2015 16:06:49 -0000 In-Reply-To: X-Newsgroups: gnu.emacs.bug User-Agent: tin/2.2.0-20131224 ("Lochindaal") (UNIX) (FreeBSD/10.1-RELEASE (amd64)) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:100496 Archived-At: Hello, Mario. In article 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 : >> 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).