From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#8789: 23.3; debug backtrace buffer changes window on step-through Date: Wed, 08 Jun 2011 12:29:30 -0300 Message-ID: References: <4DE8DF63.5050405@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1307552829 17217 80.91.229.12 (8 Jun 2011 17:07:09 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 8 Jun 2011 17:07:09 +0000 (UTC) Cc: 8789@debbugs.gnu.org, Pete Beardmore To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jun 08 19:07:04 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QUMDd-0000LI-0f for geb-bug-gnu-emacs@m.gmane.org; Wed, 08 Jun 2011 19:07:01 +0200 Original-Received: from localhost ([::1]:40390 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUMDc-0001hL-3g for geb-bug-gnu-emacs@m.gmane.org; Wed, 08 Jun 2011 13:07:00 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:39938) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUKhq-0000GX-SX for bug-gnu-emacs@gnu.org; Wed, 08 Jun 2011 11:30:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QUKhp-0002O7-3s for bug-gnu-emacs@gnu.org; Wed, 08 Jun 2011 11:30:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39309) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUKho-0002Mm-IW for bug-gnu-emacs@gnu.org; Wed, 08 Jun 2011 11:30:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QUKhn-0001ve-Va; Wed, 08 Jun 2011 11:30:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 08 Jun 2011 15:30:03 +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.13075469817361 (code B ref 8789); Wed, 08 Jun 2011 15:30:03 +0000 Original-Received: (at 8789) by debbugs.gnu.org; 8 Jun 2011 15:29:41 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QUKhR-0001ug-69 for submit@debbugs.gnu.org; Wed, 08 Jun 2011 11:29:41 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QUKhP-0001uT-1e for 8789@debbugs.gnu.org; Wed, 08 Jun 2011 11:29:39 -0400 Original-Received: from 213-159-126-200.fibertel.com.ar ([200.126.159.213]:34782 helo=ceviche.home) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1QUKhJ-0002mf-AF; Wed, 08 Jun 2011 11:29:33 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id B2223668AA; Wed, 8 Jun 2011 12:29:30 -0300 (ART) In-Reply-To: <4DE8DF63.5050405@gmx.at> (martin rudalics's message of "Fri, 03 Jun 2011 15:19:31 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Wed, 08 Jun 2011 11:30:03 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:47038 Archived-At: > I don't have the slightest idea how to fix this though because I don't > understand why apparently the *backtrace* buffer is removed from display > in (1), and what the subsequent fragment > ;; Kill or at least neuter the backtrace buffer, so that users > ;; don't try to execute debugger commands in an invalid context. > (if (get-buffer-window debugger-buffer 0) > ;; Still visible despite the save-window-excursion? Maybe it > ;; it's in a pop-up frame. It would be annoying to delete and > ;; recreate it every time the debugger stops, so instead we'll > ;; erase it (and maybe hide it) but keep it alive. > (with-current-buffer debugger-buffer > (erase-buffer) > (fundamental-mode) > (with-selected-window (get-buffer-window debugger-buffer 0) > (when (and (window-dedicated-p (selected-window)) > (not debugger-will-be-back)) > ;; If the window is not dedicated, burying the buffer > ;; will mean that the frame created for it is left > ;; around showing some random buffer, and next time we > ;; pop to the debugger buffer we'll create yet > ;; another frame. > ;; If debugger-will-be-back is non-nil, the frame > ;; would need to be de-iconified anyway immediately > ;; after when we re-enter the debugger, so iconifying it > ;; here would cause flashing. > ;; Drew Adams is not happy with this: he wants to frame > ;; to be left at the top-level, still working on how > ;; best to do that. > (bury-buffer)))) > (kill-buffer debugger-buffer)) > is needed for (despite its detailed comment). So we need help from > someone familiar with the debug code :-( I don't use `d' but I can explain the reason for the above code: when we exit the debugger, I don't want to leave around an empty fundamental-mode *Debugger* window (which in my case is a dedicated window in a separate frame), so I bury it. BTW, I recently changed the above code in `trunk' so that the kill-buffer is not called if the buffer was pre-existing. Stefan