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: Thu, 09 Feb 2012 13:21:39 -0500 Message-ID: References: <4DE8DF63.5050405@gmx.at> <87haz0po82.fsf@web.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1328811721 27959 80.91.229.3 (9 Feb 2012 18:22:01 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 9 Feb 2012 18:22:01 +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 Thu Feb 09 19:22:00 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 1RvYd6-00053o-E2 for geb-bug-gnu-emacs@m.gmane.org; Thu, 09 Feb 2012 19:22:00 +0100 Original-Received: from localhost ([::1]:45663 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvYd5-0000Jx-PH for geb-bug-gnu-emacs@m.gmane.org; Thu, 09 Feb 2012 13:21:59 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:50629) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvYd2-0000Jf-Fp for bug-gnu-emacs@gnu.org; Thu, 09 Feb 2012 13:21:57 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RvYd1-00010h-5A for bug-gnu-emacs@gnu.org; Thu, 09 Feb 2012 13:21:56 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58604) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvYd1-00010c-3a for bug-gnu-emacs@gnu.org; Thu, 09 Feb 2012 13:21:55 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1RvYe6-0005gW-S8 for bug-gnu-emacs@gnu.org; Thu, 09 Feb 2012 13:23:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 09 Feb 2012 18:23: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.132881177121835 (code B ref 8789); Thu, 09 Feb 2012 18:23:02 +0000 Original-Received: (at 8789) by debbugs.gnu.org; 9 Feb 2012 18:22:51 +0000 Original-Received: from localhost ([127.0.0.1]:33994 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RvYdv-0005g8-5n for submit@debbugs.gnu.org; Thu, 09 Feb 2012 13:22:51 -0500 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:54833) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RvYds-0005fy-U8 for 8789@debbugs.gnu.org; Thu, 09 Feb 2012 13:22:50 -0500 Original-Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id q19ILdSE006250; Thu, 9 Feb 2012 13:21:39 -0500 Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 5575C130009; Thu, 9 Feb 2012 13:21:39 -0500 (EST) In-Reply-To: <87haz0po82.fsf@web.de> (Michael Heerdegen's message of "Thu, 09 Feb 2012 06:31:09 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4127=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4127> : streams <727147> : uri <1062691> 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:56722 Archived-At: > I don't know why this problem doesn't get fixed. It is an annoying > problem, and a fix need not to be complicated - on the contrary. > It should IMHO be sufficient to add to the > (pop-to-buffer debugger-buffer) > call in `debug' an action argument that ensures that always the same > window is chosen, by an deterministic algorithm. For example: > (pop-to-buffer debugger-buffer > '((lambda (buffer _) > (let ((first-win (frame-first-window))) > (select-window first-win) > (switch-to-buffer buffer) > first-win)))) > would always choose the first window for *Backtrace*. The general approach sounds good, but we should probably try to refine it so as to minimize changes in behavior, and so it works right in the multi-frame and even multi-terminal case. We could try to store the last-used-window in a variable `debugger-last-used-window' and use that window after checking that it's still live and is visible in the selected terminal. Stefan