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#10805: 24.0.93; edebug-trace t may cause stuff being inserted into current buffer Date: Wed, 15 Feb 2012 10:56:29 +0100 Message-ID: <4F3B814D.3060607@gmx.at> References: <87y5s6l63w.fsf@web.de> <4F3A3D3C.8020002@gmx.at> <87vcn97z07.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 1329299858 3476 80.91.229.3 (15 Feb 2012 09:57:38 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 15 Feb 2012 09:57:38 +0000 (UTC) Cc: 10805@debbugs.gnu.org To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Feb 15 10:57:37 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 1RxbcF-0001zx-Um for geb-bug-gnu-emacs@m.gmane.org; Wed, 15 Feb 2012 10:57:36 +0100 Original-Received: from localhost ([::1]:44443 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RxbcF-0007i8-BK for geb-bug-gnu-emacs@m.gmane.org; Wed, 15 Feb 2012 04:57:35 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:33792) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rxbc7-0007hx-LZ for bug-gnu-emacs@gnu.org; Wed, 15 Feb 2012 04:57:33 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rxbc2-0003ow-0f for bug-gnu-emacs@gnu.org; Wed, 15 Feb 2012 04:57:27 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:37450) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rxbc1-0003os-Rh for bug-gnu-emacs@gnu.org; Wed, 15 Feb 2012 04:57:21 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Rxbdd-0000IJ-Mg for bug-gnu-emacs@gnu.org; Wed, 15 Feb 2012 04:59:02 -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: Wed, 15 Feb 2012 09:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10805 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 10805-submit@debbugs.gnu.org id=B10805.13292999071088 (code B ref 10805); Wed, 15 Feb 2012 09:59:01 +0000 Original-Received: (at 10805) by debbugs.gnu.org; 15 Feb 2012 09:58:27 +0000 Original-Received: from localhost ([127.0.0.1]:41073 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rxbd5-0000HV-EN for submit@debbugs.gnu.org; Wed, 15 Feb 2012 04:58:27 -0500 Original-Received: from mailout-de.gmx.net ([213.165.64.22]:33744) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1Rxbd0-0000HD-4D for 10805@debbugs.gnu.org; Wed, 15 Feb 2012 04:58:26 -0500 Original-Received: (qmail invoked by alias); 15 Feb 2012 09:56:34 -0000 Original-Received: from 62-47-41-132.adsl.highway.telekom.at (EHLO [62.47.41.132]) [62.47.41.132] by mail.gmx.net (mp028) with SMTP; 15 Feb 2012 10:56:34 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX18YzJNS2c4YhOUHjqHdSYNGmasb3IwuRFU8CcwzO+ +/Iyh9cdZ2pMIC In-Reply-To: <87vcn97z07.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:56911 Archived-At: > Maybe. But please keep in mind that `edebug-trace-display' is about > _displaying_ a buffer. We don't want the user to edit the trace buffer, > so calling `select-window' is in fact not necessary in this case. The > former window is instantly re-selected by `edebug-trace-display'. IIUC edebug conflates the concepts of displaying and popping to buffers. Take `edebug-bounce-point': (save-excursion ;; If the buffer's currently displayed, avoid set-window-configuration. ---> Since `save-window-excursion' calls `set-window-configuration' we don't "avoid" anything here. (save-window-excursion (edebug-pop-to-buffer edebug-outside-buffer) ---> Here the `select-window' problem might strike as well. But why should the window be selected? To make `goto-char', `current-buffer' and `point' work? (goto-char edebug-outside-point) (message "Current buffer: %s Point: %s Mark: %s" (current-buffer) (point) (if (marker-buffer (edebug-mark-marker)) (marker-position (edebug-mark-marker)) "")) (edebug-sit-for arg) ---> Popping back to the original window as the _last_ action of a `save-window-excursion' doesn't make any sense. (edebug-pop-to-buffer edebug-buffer (car edebug-window-data))))) This may select a window up to three times for the apparent single purpose to display the context of a position in some buffer. > Please also note (another issue, but related) that if the trace buffer > is already visible in another (visible) frame, a new window pops up in > the current frame nevertheless, which is kind of annoying if source > files are spread over multiple frames. Probably because `edebug-get-buffer-window' (aliased to `get-buffer-window') is called with a nil ALL-FRAMES argument. Try to use another argument (you probably have to raise frames to make this useful). martin