From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: The poor quality of Emacs's backtraces Date: Fri, 14 Jul 2023 10:58:28 +0000 Message-ID: References: <3D901B62-4826-4783-B684-968E6890E75A@gmail.com> <87wmz2j52m.fsf@localhost> <04C7EE32-F6C4-4310-A8B8-FEFF45C6ACB7@gmail.com> <87h6q6j1gk.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38964"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Mattias =?iso-8859-1?Q?Engdeg=E5rd?= , emacs-devel@gnu.org To: Ihor Radchenko Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jul 14 12:59:04 2023 Return-path: Envelope-to: ged-emacs-devel@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 1qKGVr-0009r8-FP for ged-emacs-devel@m.gmane-mx.org; Fri, 14 Jul 2023 12:59:03 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qKGVP-0006Bi-Kv; Fri, 14 Jul 2023 06:58:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qKGVN-0006BU-Ri for emacs-devel@gnu.org; Fri, 14 Jul 2023 06:58:33 -0400 Original-Received: from mx3.muc.de ([193.149.48.5]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qKGVL-0003LW-OI for emacs-devel@gnu.org; Fri, 14 Jul 2023 06:58:33 -0400 Original-Received: (qmail 10801 invoked by uid 3782); 14 Jul 2023 12:58:29 +0200 Original-Received: from acm.muc.de (p4fe159b6.dip0.t-ipconnect.de [79.225.89.182]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 14 Jul 2023 12:58:28 +0200 Original-Received: (qmail 2034 invoked by uid 1000); 14 Jul 2023 10:58:28 -0000 Content-Disposition: inline In-Reply-To: <87h6q6j1gk.fsf@localhost> X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de Received-SPF: pass client-ip=193.149.48.5; envelope-from=acm@muc.de; helo=mx3.muc.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:307865 Archived-At: Hello, Ihor and Mattias. On Fri, Jul 14, 2023 at 09:18:19 +0000, Ihor Radchenko wrote: > Mattias Engdegård writes: > > 14 juli 2023 kl. 10.00 skrev Ihor Radchenko : [ .... ] > I am a bit confused. > Aren't we talking about terminal output? > >> Of course, the `condition-case' created by ERT will still be an issue. > > Yes, and that was probably what really caused Alan's troubles. We could do something about that. condition-case and backtrace mix very poorly. The problem is that, in the event of an error, condition-case unwinds the stack _before_ executing its error handler. So the pertinent information is discarded before backtrace gets evaluated. As yet, I've only got vague notions as to how to solve this. But it surely ought to be possible to amend condition-case, or create a variant of condition-case, where the stack unwinding only occurs _after_ evaluating the error handler. > I think that this problem was left unresolved due to lack of ideas: > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=50629 That bug looks like just the same problems I'm having. > -- > Ihor Radchenko // yantar92, > Org mode contributor, > Learn more about Org mode at . > Support Org development at , > or support my work at -- Alan Mackenzie (Nuremberg, Germany).