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 16:59:57 +0300 Message-ID: <83bktru74y.fsf@gnu.org> References: <83r1375m6x.fsf@gnu.org> <837d4hw5to.fsf@gnu.org> <83ilo0vnwh.fsf@gnu.org> <83fsj4uvjg.fsf@gnu.org> <83mtdct5ze.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7554"; 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 16:04:48 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 1oBzSR-0001ih-V6 for ged-emacs-devel@m.gmane-mx.org; Thu, 14 Jul 2022 16:04:48 +0200 Original-Received: from localhost ([::1]:36396 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oBzSQ-0002rg-LG for ged-emacs-devel@m.gmane-mx.org; Thu, 14 Jul 2022 10:04:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54630) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBzNw-00075l-8n for emacs-devel@gnu.org; Thu, 14 Jul 2022 10:00:08 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:44070) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBzNu-0007HQ-AI; Thu, 14 Jul 2022 10:00:06 -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=nIpejrB/+7MZXx5AdfYYCDChgRmtZ3zjWcHeRc5tQKY=; b=W2j6C7TWraEs rsSojwU1Fjjc3wmSgS9699aZEiC1ZoJWyz9awdPD66J+yjuYi3hs6rEuXhXQHVM4bPqw2a+dfJIqF O7jH3pFEazabDugww2DKQ4SlPr51/F9lEySBMb6VFt+gsF34YtrULfuRHCxHjA9rfelwGEuYKCFog 3u80r0lHkrz1RVrKjcc2GFNjW0Phs7OyPlhIMF2IZMXB88CzyDeKACcKn3cgWegnvXWWrCY8lX7fc Dj3ZVVhsjAQwB6At1slwlzpk8FK4qUd5V2RXapY1fLt1FW1yBI9zH7U43rIsGb1x1Xg9L0ODv3deF MQGYaSpuGi6+7iNsDjEZ0g==; Original-Received: from [87.69.77.57] (port=3581 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 1oBzNr-0003hC-6P; Thu, 14 Jul 2022 10:00:04 -0400 In-Reply-To: (message from Alan Mackenzie on Thu, 14 Jul 2022 13:42:18 +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:292146 Archived-At: > Date: Thu, 14 Jul 2022 13:42:18 +0000 > Cc: larsi@gnus.org, monnier@iro.umontreal.ca, emacs-devel@gnu.org > From: Alan Mackenzie > > > > > You want to distinguish errors inside condition-case? > > > > More, distinguish the different condition-cases in which errors might > > > occur. > > > What else is exposed to Lisp? > > I don't understand this question. There's just one condition-case available to Lisp code, AFAICT, so why isn't it enough to distinguish condition-case from any other callers of internal_condition_case* ? > > > I think we need the new function safe_run_hooks_2_with_backtrace (see > > > below), since there is currently no "safe" function for hooks with > > > two arguments. But some of the other ones could disappear (see > > > below). > > > What is the second argument, and why do we need it? > > There are three arguments, the non-standard hook, and the two arguments > which will be fed to that hook. > > Currently, that hook (window-scroll-functions) is called with > run_hook_with_args_2, which doesn't have a "safe" in its functionality, > which we need. My change is to use safe_run_hooks_2 (a new function) > instead. OK, sounds good. > > > OK, I have an idea. I restore the variable redisplay_lisping back > > > into the code (I took it out last night), binding it to true (or Qt?) > > > at every place in xdisp.c where redisplay calls a Lisp hook. > > > These all go through a single function, so there's just one place to > > do that. > > I disagree. There are seven places, for the seven different Lisp hooks > currently called from redisplay. Aren't they all go through safe_call? Which seven places are you talking about?