From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Redisplay hook error backtraces Date: Thu, 14 Jul 2022 08:12:51 +0300 Message-ID: <83fsj4uvjg.fsf@gnu.org> References: <83r1396lvr.fsf@gnu.org> <83edz87ivz.fsf@gnu.org> <83r1375m6x.fsf@gnu.org> <837d4hw5to.fsf@gnu.org> <83ilo0vnwh.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25981"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jul 14 07:14:20 2022 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 1oBrB6-0006Zl-6b for ged-emacs-devel@m.gmane-mx.org; Thu, 14 Jul 2022 07:14:20 +0200 Original-Received: from localhost ([::1]:50100 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oBrB3-00046P-Pq for ged-emacs-devel@m.gmane-mx.org; Thu, 14 Jul 2022 01:14:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42108) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBr9p-0003PZ-JB for emacs-devel@gnu.org; Thu, 14 Jul 2022 01:13:02 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:37588) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBr9n-00008I-V3; Thu, 14 Jul 2022 01:12:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Sfg2Of+jDGtQC2B9HyU+Xd9ztKN7CJtk3RmOD17v9uo=; b=HsA0g3ia2uE+ BUU5okxkyoEVmQP2RA4p/a+sT2F76HuVAfWVFboFTWB1JE6KQW+KgMzSvIFanOKMojxV6YjlRjQQk ydcUiLST6Npzq7AnRw4Ced2K5cf8HPaUhqYzktbQsMByvaJ+Gzh46p/3QRXYsLP+uP5zGhX4WTzk3 NP0dqPzCfgUmhGNKSoiDjy8i9bQ5/zvHshEXO6o1f6gDY7/Mc5pgytZP+NQDXOjclkqABUxdVbBIO Iqa2/kttD3JzRetUaPJwCxG/hsmHkU28ZYRMKABAuPUJjInFApDRNL9X/hAJdUFOMzN+N3+URxso5 y/Ziz40VfdwJKzzrUVaO1g==; Original-Received: from [87.69.77.57] (port=2490 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBr9n-0001Vk-CE; Thu, 14 Jul 2022 01:12:59 -0400 In-Reply-To: (message from Alan Mackenzie on Wed, 13 Jul 2022 20:12:42 +0000) 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" Xref: news.gmane.io gmane.emacs.devel:292127 Archived-At: > Date: Wed, 13 Jul 2022 20:12:42 +0000 > Cc: larsi@gnus.org, monnier@iro.umontreal.ca, emacs-devel@gnu.org > From: Alan Mackenzie > > > I still don't think I understand why testing redisplaying_p and the > > new optional variable would not be enough. > > We've got to distinguish between the signals we want to generate > backtraces for and those we don't. redisplaying_p is not relevant to > that, I think. For example, we don't want to generate a backtrace for a > "failed" evaluation of the code generated by `c-safe'. You want to distinguish errors inside condition-case? If they are not already marked in some way that allows you to do so, I think it's better to do it the other way around: bind some variable in internal_lisp_condition_case before invoking the body. > > > You mean, all the changes in eval.c and keyboard.c? I think the changes > > > to internal_condition_case_n are essential to the patch, and I honestly > > > don't think it can be done much more elegantly, but I'm open to > > > suggestions. > > > Can we discuss how to implement it without introducing a special > > handler and without adding new safe_run_hooks_* functions? > > OK. Perhaps with extra optional arguments, that kind of thing? Maybe, I don't know. I still think the job of signal_or_quit and safe_run_hooks is almost the same when you want to collect backtrace, so too many differences strike me as unexpected.