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: Sun, 15 Mar 2015 21:31:40 +0000 Message-ID: <20150315213140.GA2970@acm.fritz.box> References: <20150315160649.53351.qmail@mail.muc.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1426455203 5876 80.91.229.3 (15 Mar 2015 21:33:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 15 Mar 2015 21:33:23 +0000 (UTC) Cc: 20074@debbugs.gnu.org, Mario Valencia To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Mar 15 22:33:11 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 1YXG9l-00041a-8j for geb-bug-gnu-emacs@m.gmane.org; Sun, 15 Mar 2015 22:33:09 +0100 Original-Received: from localhost ([::1]:44790 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YXG9k-0005OR-5F for geb-bug-gnu-emacs@m.gmane.org; Sun, 15 Mar 2015 17:33:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44565) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YXG9h-0005OJ-RS for bug-gnu-emacs@gnu.org; Sun, 15 Mar 2015 17:33:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YXG9e-00072k-MD for bug-gnu-emacs@gnu.org; Sun, 15 Mar 2015 17:33:05 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48877) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YXG9e-00072g-Ix for bug-gnu-emacs@gnu.org; Sun, 15 Mar 2015 17:33:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YXG9e-0003Ny-4Z for bug-gnu-emacs@gnu.org; Sun, 15 Mar 2015 17:33: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 21:33:02 +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.142645512812939 (code B ref 20074); Sun, 15 Mar 2015 21:33:02 +0000 Original-Received: (at 20074) by debbugs.gnu.org; 15 Mar 2015 21:32:08 +0000 Original-Received: from localhost ([127.0.0.1]:47445 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YXG8l-0003Mc-LQ for submit@debbugs.gnu.org; Sun, 15 Mar 2015 17:32:07 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:19227 helo=mail.muc.de) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YXG8j-0003MR-CD for 20074@debbugs.gnu.org; Sun, 15 Mar 2015 17:32:06 -0400 Original-Received: (qmail 39890 invoked by uid 3782); 15 Mar 2015 21:32:04 -0000 Original-Received: from acm.muc.de (pD9518D16.dip0.t-ipconnect.de [217.81.141.22]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 15 Mar 2015 22:32:02 +0100 Original-Received: (qmail 3356 invoked by uid 1000); 15 Mar 2015 21:31:40 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de 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:100509 Archived-At: Hello, Stefan. On Sun, Mar 15, 2015 at 04:36:18PM -0400, Stefan Monnier wrote: > > 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. > Hmmm sounds like we indeed have a problem here. > > 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. > I don't quite understand your fix. Unfortunately, neither did I. It was garbage. Sorry for the time wasted. I've superseded it with a fix which actually is a fix, I hope. > AFAICT, the sit-for is inside the let-binding, so when we enter the > sit-for, unread-command-events is nil (more or less for sure) because we > just bound it to nil, and when we exit sit-for maybe > unread-command-events is non-nil, but when we then exit the let-binding > we throw away whether was added to unread-command-events. Exactly. That was the bug. > So I don't understand how changing the entrance to the let-binding fixes > this problem, since it seems that the info gets lost when we exit the > let-binding, rather than it being hidden by the let-binding when we > enter it. > What am I missing? My next post to this bug. ;-) > Also, I wonder why the edebug.el code doesn't use the return value of > `sit-for'. It does now. > Stefan -- Alan Mackenzie (Nuremberg, Germany).