From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#55863: 29.0.50; [PATCH] Avoid hanging chad of *Backtrace* Date: Thu, 09 Jun 2022 20:58:39 +0300 Organization: LINKOV.NET Message-ID: <86edzxbu6w.fsf@mail.linkov.net> References: <877d5qetfm.fsf@dick> <874k0u6lhv.fsf@gnus.org> <87czfi3pyu.fsf@dick> <864k0teq3y.fsf@mail.linkov.net> <878rq5zqod.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10292"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: 55863@debbugs.gnu.org, dick To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 09 20:46:48 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nzNB8-0002WS-Si for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 09 Jun 2022 20:46:46 +0200 Original-Received: from localhost ([::1]:41642 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nzNB7-0004He-KK for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 09 Jun 2022 14:46:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35864) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzMSs-0006hl-ML for bug-gnu-emacs@gnu.org; Thu, 09 Jun 2022 14:01:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53807) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nzMSs-00016s-DY for bug-gnu-emacs@gnu.org; Thu, 09 Jun 2022 14:01:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nzMSs-0007U1-Aq for bug-gnu-emacs@gnu.org; Thu, 09 Jun 2022 14:01:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 09 Jun 2022 18:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55863 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 55863-submit@debbugs.gnu.org id=B55863.165479762228694 (code B ref 55863); Thu, 09 Jun 2022 18:01:02 +0000 Original-Received: (at 55863) by debbugs.gnu.org; 9 Jun 2022 18:00:22 +0000 Original-Received: from localhost ([127.0.0.1]:47704 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nzMSE-0007Sh-Fj for submit@debbugs.gnu.org; Thu, 09 Jun 2022 14:00:22 -0400 Original-Received: from relay7-d.mail.gandi.net ([217.70.183.200]:36323) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nzMS8-0007SA-Ko for 55863@debbugs.gnu.org; Thu, 09 Jun 2022 14:00:19 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id B64AB20005; Thu, 9 Jun 2022 18:00:08 +0000 (UTC) In-Reply-To: <878rq5zqod.fsf@gnus.org> (Lars Ingebrigtsen's message of "Thu, 09 Jun 2022 19:34:42 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:234146 Archived-At: >> A better question is why *Backtrace* is erased? >> Often I accidentally quit the backtrace, then >> try to switch to the *Backtrace* buffer to check >> the backtrace again, but to no avail. > > I don't think you can usefully interact with it after exiting the > recursive edit? That is, I think all the stuff that's bound in the > `debug' command (debugger-outer-match-data etc etc) has to continue to > be bound... > > But perhaps that can be fixed? I have no idea what will happen when it's not erased, need to try. Hmm, interesting, after this all backtrace links are still valid: diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index 6c172d6c31..eb71b12341 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el @@ -308,13 +308,13 @@ debug ;; Restore previous state of debugger-buffer in case we were ;; in a recursive invocation of the debugger, otherwise just ;; erase the buffer. - (when (buffer-live-p debugger-buffer) - (with-current-buffer debugger-buffer - (if debugger-previous-state - (debugger--restore-buffer-state debugger-previous-state) - (setq backtrace-insert-header-function nil) - (setq backtrace-frames nil) - (backtrace-print)))) + ;; (when (buffer-live-p debugger-buffer) + ;; (with-current-buffer debugger-buffer + ;; (if debugger-previous-state + ;; (debugger--restore-buffer-state debugger-previous-state) + ;; (setq backtrace-insert-header-function nil) + ;; (setq backtrace-frames nil) + ;; (backtrace-print)))) (with-timeout-unsuspend debugger-with-timeout-suspend) (set-match-data debugger-outer-match-data))) (setq debug-on-next-call debugger-step-after-exit)