From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#8789: 23.3; debug backtrace buffer changes window on step-through Date: Fri, 17 Feb 2012 10:58:34 +0100 Message-ID: <4F3E24CA.9080305@gmx.at> References: <4DE8DF63.5050405@gmx.at> <87haz0po82.fsf@web.de> <4F3BE4CB.3030909@gmx.at> <4F3CB843.6030401@gmx.at> <4F3D41DD.6080603@gmx.at> <877gzmqwcf.fsf@web.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1329472766 16013 80.91.229.3 (17 Feb 2012 09:59:26 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 17 Feb 2012 09:59:26 +0000 (UTC) Cc: 8789@debbugs.gnu.org To: michael_heerdegen@web.de Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Feb 17 10:59:25 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RyKb6-0003Z7-Sj for geb-bug-gnu-emacs@m.gmane.org; Fri, 17 Feb 2012 10:59:25 +0100 Original-Received: from localhost ([::1]:55884 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RyKb6-0007wo-IC for geb-bug-gnu-emacs@m.gmane.org; Fri, 17 Feb 2012 04:59:24 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:42965) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RyKaz-0007rs-4Z for bug-gnu-emacs@gnu.org; Fri, 17 Feb 2012 04:59:22 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RyKat-00066D-4t for bug-gnu-emacs@gnu.org; Fri, 17 Feb 2012 04:59:17 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39726) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RyKat-000669-3K for bug-gnu-emacs@gnu.org; Fri, 17 Feb 2012 04:59:11 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1RyKch-00062H-1G for bug-gnu-emacs@gnu.org; Fri, 17 Feb 2012 05:01:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 17 Feb 2012 10:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8789 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 8789-submit@debbugs.gnu.org id=B8789.132947284423159 (code B ref 8789); Fri, 17 Feb 2012 10:01:02 +0000 Original-Received: (at 8789) by debbugs.gnu.org; 17 Feb 2012 10:00:44 +0000 Original-Received: from localhost ([127.0.0.1]:43345 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RyKcN-00061T-Kc for submit@debbugs.gnu.org; Fri, 17 Feb 2012 05:00:43 -0500 Original-Received: from mailout-de.gmx.net ([213.165.64.22]:55294) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1RyKcJ-00061F-Up for 8789@debbugs.gnu.org; Fri, 17 Feb 2012 05:00:41 -0500 Original-Received: (qmail invoked by alias); 17 Feb 2012 09:58:41 -0000 Original-Received: from 62-47-62-21.adsl.highway.telekom.at (EHLO [62.47.62.21]) [62.47.62.21] by mail.gmx.net (mp040) with SMTP; 17 Feb 2012 10:58:41 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX18KAzN1pKsKy5Fec15ylvyZhBMlLvYeDR3k0xz2ph pLVFlMYSPfchbQ In-Reply-To: <877gzmqwcf.fsf@web.de> X-Y-GMX-Trusted: 0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:56960 Archived-At: > I tested about 2 hours Thank you! > and encountered many problems. > > At first, some general things: > > (1) If the user starts the debugger, do we really want that the > Backtrace buffer pops up in some other frame only because it was > displayed there in some window before? Maybe not. But we should also handle the case of the user preferring *Backtrace* to appear on a standalone frame. Detecting this (from within `debug') is tricky. > (2) A problem with this approach: if the Backtrace buffer was already > visible in several windows, it still hops around, because the > window `display-buffer-in-window-previously-showing-it' returns is > not unique. I see. The first argument in the call of `window-list-1' could be made the `frame-first-window' of the selected frame. Can you try that, i.e., using a call like (dolist (window (window-list-1 (frame-first-window) 'nomini 'visible)) and, if you want to avoid the frame problem above as well, (dolist (window (window-list-1 (frame-first-window) 'nomini)) Or is it because the window where the *Backtrace* buffer earlier appeared is the selected one? Would it be OK to return the selected window here if there's another choice? BTW so far I don't handle the case yet where the *Backtrace* buffer is already shown in some window. > Now to my tests in detail: > > - When I start debugging with a 3-windowed frame, and this is the first > time at all that I use the debugger at all, even then, the debugger > hops around. This has to do with (1), but I don't know why it hops > the first time. IIUC so far by "hop around" we meant the *Backtrace* buffer appearing in one window and then in another. How can the debugger "hop around" if *Backtrace* hasn't been shown yet? > But it gets much worse. Do the following: > > - emacs -Q > - require 'debug, and load your patch > - M-x debug-on-entry dired RET > - C-x d RET > - hit d three times -> Emacs crashs! > > This is reproducible here. I use GNU Emacs 24.0.93.1 > (i486-pc-linux-gnu, GTK+ Version 3.2.3)\n of 2012-02-16 on zelenka, > modified by Debian, btw. I can't reproduce that here (on Windows XP). After C-x d I get the *Backtrace* buffer in the bottom window, hitting "d" now steps through the code. Please try to get a backtrace of this. > This is all a horror to debug. Debugging a debugger is painful. Thanks, martin