From unknown Fri Jun 20 07:19:20 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#12502 <12502@debbugs.gnu.org> To: bug#12502 <12502@debbugs.gnu.org> Subject: Status: 24.2.50; Debugger messes up current-buffer Reply-To: bug#12502 <12502@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:19:20 +0000 retitle 12502 24.2.50; Debugger messes up current-buffer reassign 12502 emacs submitter 12502 Helmut Eller severity 12502 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 24 04:33:04 2012 Received: (at submit) by debbugs.gnu.org; 24 Sep 2012 08:33:05 +0000 Received: from localhost ([127.0.0.1]:52084 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TG46C-0000gs-Bl for submit@debbugs.gnu.org; Mon, 24 Sep 2012 04:33:04 -0400 Received: from eggs.gnu.org ([208.118.235.92]:51348) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TG46A-0000gm-KR for submit@debbugs.gnu.org; Mon, 24 Sep 2012 04:33:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TG44K-0002eC-Rl for submit@debbugs.gnu.org; Mon, 24 Sep 2012 04:31:09 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:46827) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TG44K-0002e8-H4 for submit@debbugs.gnu.org; Mon, 24 Sep 2012 04:31:08 -0400 Received: from eggs.gnu.org ([208.118.235.92]:39439) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TG44J-0005KW-KH for bug-gnu-emacs@gnu.org; Mon, 24 Sep 2012 04:31:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TG44H-0002do-L9 for bug-gnu-emacs@gnu.org; Mon, 24 Sep 2012 04:31:07 -0400 Received: from mail-we0-f169.google.com ([74.125.82.169]:60034) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TG44H-0002dd-Bg for bug-gnu-emacs@gnu.org; Mon, 24 Sep 2012 04:31:05 -0400 Received: by weyu3 with SMTP id u3so1772361wey.0 for ; Mon, 24 Sep 2012 01:31:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:mime-version:content-type; bh=/2k46PAIVWC2YbDSfAqyaSM3OZq4/6+4daP8BpAxkpM=; b=diaT/PPCelt/SE7AMRYAQ9GFJVvfA9rY0h7cF17LQCKdSnxjg/+bWcge5bWub6BDA2 5OGXQDFm9EimnfHCTh9bMr3BfdUh8KOas8/cC2SQRKh3rMYTCbmY/WECEvXpwn6BDFr4 uV0I/GJ6WPuObHMEbc2IhyRA+Icm6gw/IUJ0sGdE1G6keEIhjvdTZ2k1sYFwiam4wXya wWRHpV5SWOjcfYWC5xlmp4LvXyvCbCxRApzIYvBiZgDEywi5YeGdBzJApqaJGyFuusCs 6RZk4t3rb7iVR3WmmfxpDBK4ruJAJpZluXxDDTUndxkY2s4zKg8e9jtrTnwnemV6h58H Of1Q== Received: by 10.180.75.67 with SMTP id a3mr5227543wiw.1.1348475464585; Mon, 24 Sep 2012 01:31:04 -0700 (PDT) Received: from ix (dial-181022.pool.broadband44.net. [212.46.181.22]) by mx.google.com with ESMTPS id l5sm15561970wix.5.2012.09.24.01.31.03 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 24 Sep 2012 01:31:04 -0700 (PDT) Received: from helmut by ix with local (Exim 4.72) (envelope-from ) id 1TG44G-0000iX-B0 for bug-gnu-emacs@gnu.org; Mon, 24 Sep 2012 10:31:04 +0200 From: Helmut Eller To: bug-gnu-emacs@gnu.org Subject: 24.2.50; Debugger messes up current-buffer Date: Mon, 24 Sep 2012 10:31:04 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.1 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.1 (------) The debugger now changes the current buffer in the following situation: 1. Create a file foo.el with this code: (progn (require 'cl) (defun foo () (with-current-buffer (get-buffer-create "test") (let ((b (current-buffer))) (debug) (assert (eq b (current-buffer)) t)))) (foo)) 2. In the foo.el buffer, evaluate the expression with C-x C-e 3. The debugger pops up with this message: Debugger entered: nil 4. Press c (i.e. debugger-continue) 5. The assertion fails with: Assertion failed: (eq b (current-buffer)), #, # This is a regression to older versions. In GNU Emacs 24.2.50.1 (i686-pc-linux-gnu, GTK+ Version 2.20.1) of 2012-09-22 on ix Bzr revision: 110128 cyd@gnu.org-20120922032937-yf6yua64ed45tzap Windowing system distributor `The X.Org Foundation', version 11.0.10707000 Configured using: `configure '--with-jpeg=no' '--with-gif=no' '--with-tiff=no'' From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 24 08:40:18 2012 Received: (at 12502) by debbugs.gnu.org; 24 Sep 2012 12:40:18 +0000 Received: from localhost ([127.0.0.1]:52302 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TG7xS-00075m-9q for submit@debbugs.gnu.org; Mon, 24 Sep 2012 08:40:18 -0400 Received: from mailout-de.gmx.net ([213.165.64.23]:49943) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1TG7xQ-00075f-Qw for 12502@debbugs.gnu.org; Mon, 24 Sep 2012 08:40:17 -0400 Received: (qmail invoked by alias); 24 Sep 2012 12:38:21 -0000 Received: from 62-47-40-30.adsl.highway.telekom.at (EHLO [62.47.40.30]) [62.47.40.30] by mail.gmx.net (mp039) with SMTP; 24 Sep 2012 14:38:21 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1/FlsptAIPF2g5AMThLbpgjtpbpAcmyvKipYbiB3+ O10R6QdXIZSmkc Message-ID: <50605429.10900@gmx.at> Date: Mon, 24 Sep 2012 14:38:01 +0200 From: martin rudalics MIME-Version: 1.0 To: Helmut Eller Subject: Re: bug#12502: 24.2.50; Debugger messes up current-buffer References: In-Reply-To: Content-Type: multipart/mixed; boundary="------------060608030804070001040902" X-Y-GMX-Trusted: 0 X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 12502 Cc: 12502@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.3 (/) This is a multi-part message in MIME format. --------------060608030804070001040902 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit > The debugger now changes the current buffer in the following situation: [...] > This is a regression to older versions. Thanks for the report. Would the attached patch fix it? BTW, I notice that you quite often run functions with a current buffer different from that of the selected window. In all these cases `quit-window' might misbehave for you because it does not restore the buffer that was current at the time the window's buffer was displayed. So if you see any problems in this context, please tell me. We then could try to restore the current buffer (optionally at least) too. martin --------------060608030804070001040902 Content-Type: text/plain; name="debug-restore-current-buffer.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="debug-restore-current-buffer.diff" === modified file 'lisp/emacs-lisp/debug.el' --- lisp/emacs-lisp/debug.el 2012-09-20 13:35:13 +0000 +++ lisp/emacs-lisp/debug.el 2012-09-24 12:30:50 +0000 @@ -273,7 +273,8 @@ (setq debugger-previous-window-height (window-total-size debugger-window)) ;; Unshow debugger-buffer. - (quit-restore-window debugger-window debugger-bury-or-kill)) + (quit-restore-window debugger-window debugger-bury-or-kill) + (set-buffer debugger-old-buffer)) ;; Restore previous state of debugger-buffer in case we were ;; in a recursive invocation of the debugger, otherwise just ;; erase the buffer and put it into fundamental mode. --------------060608030804070001040902-- From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 25 11:38:26 2012 Received: (at 12502) by debbugs.gnu.org; 25 Sep 2012 15:38:26 +0000 Received: from localhost ([127.0.0.1]:55401 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TGXDO-0007s3-9v for submit@debbugs.gnu.org; Tue, 25 Sep 2012 11:38:26 -0400 Received: from mail-ey0-f172.google.com ([209.85.215.172]:36622) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TGXDM-0007rw-Mk for 12502@debbugs.gnu.org; Tue, 25 Sep 2012 11:38:25 -0400 Received: by eaak13 with SMTP id k13so774322eaa.3 for <12502@debbugs.gnu.org>; Tue, 25 Sep 2012 08:36:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=RXWgojq+DiO4w7IS+xwVcrkNmEPvW6kCTzqu2DZP1VU=; b=JyRTBx9Mm2ry1t7WYgyAiPXbYtxqwQcVIhgrknL1zTpkThp7p7uX3yqkv65Iv1SBMW 2YAJ0OF4tJjotpjkXw4J0gBI6OWksGWEllO6hQtHJNRSWm8d+sB0xZh3cZGYTZtEi/WO fhbDmhUG5uMdpLJElWFm1EsjDdzLCqYFj/qzJ/gy2CDFl/sZ/dE9q9ggeVznpC2Qb+78 9YFGh/0FZTSW6+6SgwtWbgkdyVL6jSGJq08XjosL7hVmBiUuLFGEzwxsaKUIvDnXZ7WZ 7CLp/j95NzZMvBoyAcbjwQlt6+8BPO+Z24IGLULonekIJGmT514fn/saOO6+T5Q1KGGe JfVg== Received: by 10.14.209.129 with SMTP id s1mr21065337eeo.24.1348587383818; Tue, 25 Sep 2012 08:36:23 -0700 (PDT) Received: from ix (dial-181022.pool.broadband44.net. [212.46.181.22]) by mx.google.com with ESMTPS id j24sm856014bkv.0.2012.09.25.08.36.22 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 25 Sep 2012 08:36:22 -0700 (PDT) Received: from helmut by ix with local (Exim 4.72) (envelope-from ) id 1TGXBL-0001D7-UM; Tue, 25 Sep 2012 17:36:19 +0200 From: Helmut Eller To: martin rudalics Subject: Re: bug#12502: 24.2.50; Debugger messes up current-buffer References: <50605429.10900@gmx.at> Date: Tue, 25 Sep 2012 17:36:19 +0200 In-Reply-To: <50605429.10900@gmx.at> (martin rudalics's message of "Mon, 24 Sep 2012 14:38:01 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 12502 Cc: 12502@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On Mon, Sep 24 2012, martin rudalics wrote: >> The debugger now changes the current buffer in the following situation: > [...] >> This is a regression to older versions. > > Thanks for the report. Would the attached patch fix it? Yes, that seems to fix the problem. But the save-exursion in line 218 looks now supsisously irrelevant. > BTW, I notice that you quite often run functions with a current buffer > different from that of the selected window. In all these cases > `quit-window' might misbehave for you because it does not restore the > buffer that was current at the time the window's buffer was displayed. > So if you see any problems in this context, please tell me. We then > could try to restore the current buffer (optionally at least) too. I'l look for problems, but I'm not sure what the correct/incorrect behaviour regarding window management should be. The old save-window-excursion worked pretty well for me. Helmut From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 25 12:47:09 2012 Received: (at 12502) by debbugs.gnu.org; 25 Sep 2012 16:47:09 +0000 Received: from localhost ([127.0.0.1]:55467 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TGYHs-0001t7-Qq for submit@debbugs.gnu.org; Tue, 25 Sep 2012 12:47:08 -0400 Received: from mailout-de.gmx.net ([213.165.64.23]:52153) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1TGYHq-0001sz-Ro for 12502@debbugs.gnu.org; Tue, 25 Sep 2012 12:47:08 -0400 Received: (qmail invoked by alias); 25 Sep 2012 16:45:05 -0000 Received: from 62-47-32-73.adsl.highway.telekom.at (EHLO [62.47.32.73]) [62.47.32.73] by mail.gmx.net (mp035) with SMTP; 25 Sep 2012 18:45:05 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX18yAgFvZLUyBhB0/nXgZx7wY0Cmgl7+or7A2YCdD3 TSeYkgHHZALK1y Message-ID: <5061DFA7.5050309@gmx.at> Date: Tue, 25 Sep 2012 18:45:27 +0200 From: martin rudalics MIME-Version: 1.0 To: Helmut Eller Subject: Re: bug#12502: 24.2.50; Debugger messes up current-buffer References: <50605429.10900@gmx.at> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 12502 Cc: 12502@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > Yes, that seems to fix the problem. But the save-exursion in line 218 > looks now supsisously irrelevant. Maybe. There's another one nested inside. I know next to nothing about the internals of the debugger. > I'l look for problems, but I'm not sure what the correct/incorrect > behaviour regarding window management should be. The old > save-window-excursion worked pretty well for me. It didn't work at all for people showing the debugger in an extra frame. martin From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 03 05:15:22 2012 Received: (at 12502-done) by debbugs.gnu.org; 3 Oct 2012 09:15:23 +0000 Received: from localhost ([127.0.0.1]:38633 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TJL34-0001tB-MA for submit@debbugs.gnu.org; Wed, 03 Oct 2012 05:15:22 -0400 Received: from mailout-de.gmx.net ([213.165.64.23]:42001) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1TJL33-0001t4-2j for 12502-done@debbugs.gnu.org; Wed, 03 Oct 2012 05:15:21 -0400 Received: (qmail invoked by alias); 03 Oct 2012 09:14:43 -0000 Received: from 62-47-56-28.adsl.highway.telekom.at (EHLO [62.47.56.28]) [62.47.56.28] by mail.gmx.net (mp001) with SMTP; 03 Oct 2012 11:14:43 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX19SELV+/sdSUK0mwOhNUqEVRAfnQpl5z41Ad6IKrl jm78JryNF/kAjJ Message-ID: <506C020F.8090708@gmx.at> Date: Wed, 03 Oct 2012 11:14:55 +0200 From: martin rudalics MIME-Version: 1.0 To: Helmut Eller Subject: Re: bug#12502: 24.2.50; Debugger messes up current-buffer References: <50605429.10900@gmx.at> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 12502-done Cc: 12502-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.8 (/) >> Thanks for the report. Would the attached patch fix it? > > Yes, that seems to fix the problem. Installed. Bug closed. > But the save-exursion in line 218 > looks now supsisously irrelevant. I left it in because IIUC it can't do any harm. martin From unknown Fri Jun 20 07:19:20 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 31 Oct 2012 11:24:02 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator