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: Fri, 15 Jul 2022 08:50:23 +0300 Message-ID: <83tu7isz4w.fsf@gnu.org> References: <83ilo0vnwh.fsf@gnu.org> <83fsj4uvjg.fsf@gnu.org> <83mtdct5ze.fsf@gnu.org> <83bktru74y.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24470"; mail-complaints-to="usenet@ciao.gmane.io" Cc: monnier@iro.umontreal.ca, larsi@gnus.org, emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jul 15 07:53:54 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 1oCEGw-0006Bm-4G for ged-emacs-devel@m.gmane-mx.org; Fri, 15 Jul 2022 07:53:54 +0200 Original-Received: from localhost ([::1]:56902 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oCEGu-000828-JC for ged-emacs-devel@m.gmane-mx.org; Fri, 15 Jul 2022 01:53:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42740) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oCEDg-0006uR-RA for emacs-devel@gnu.org; Fri, 15 Jul 2022 01:50:32 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:57350) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oCEDf-0000vn-2e; Fri, 15 Jul 2022 01:50:31 -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=b62tTLS5UH4juwTb84etFoNrBgI/kxlBECtHR9e+Xds=; b=bWjqaOYpoCL8 WeLHjIbWW17J9j4FrUHkuhFbbrSZQLTtCdfzehJuLs2wIX41RlhOrm69Dx9xHZ0PoMMbmod5ciOou RsfK0gHrFVcrIbZ1lgbqpnAXlnJQwXtBlBba4bM5GYZcKirmVMCkjoTO6P8TJ6Y+r4QocLO8OXPd1 OJAJT7rmS/ITNBh4oat3gYgeMZckhhJPsCykyUgJ0buenB8olY1KClBwkB73Jy8S6ayA5TLLCSW7Q F9WZ702tP/EIxi8eZpxXoAHoGYWBDUK7XpE7dQ6n0zcsWBbeeVpjxFBNSJmk2oD5A4xCN0hlKnyuq K70Vp0IEcJa/oyQDePxzpg==; Original-Received: from [87.69.77.57] (port=1886 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 1oCEDc-0000aF-Ee; Fri, 15 Jul 2022 01:50:30 -0400 In-Reply-To: (message from Alan Mackenzie on Thu, 14 Jul 2022 19:47:25 +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:292183 Archived-At: > Date: Thu, 14 Jul 2022 19:47:25 +0000 > Cc: Eli Zaretskii , larsi@gnus.org, emacs-devel@gnu.org > From: Alan Mackenzie > > > Being in redisplay is usually a good reason why we don't want to let > > errors escape, even we do care about those errors (and hence we need > > to use a mechanism like the one you're implementing in order to debug > > those problems), but there can be other such cases that also use > > `safe_call` and where we would also want to use your new code. > > There are approximately 38 calls to something like safe_call in the C > sources, about half of which are in xdisp.c. That's a lot of scope for > irritation if non-events continually swamp the real errors in redisplay's > Lisp hooks. > > It feels like we would want some mechanism to filter out "some" safe_call > calls, and things are getting complicated fast. The scope of the > exercise has already expanded considerably, from just > fontification-functions to all redisplay hooks. Alan, you are again over-engineering things. Assuming that safe__call is the only interesting gateway for Lisp errors during redisplay should be good enough, if you in addition test redisplaying_p.