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.bugs Subject: bug#68075: 30.0.50; New special form `handler-bind` Date: Sun, 31 Dec 2023 21:36:05 +0200 Message-ID: <83wmsu17x6.fsf@gnu.org> References: <835y0i92kb.fsf@gnu.org> <83le9c3z6k.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2592"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 68075@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 31 20:37:15 2023 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 1rK1cZ-0000UD-ND for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 31 Dec 2023 20:37:15 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rK1cM-0004tO-6m; Sun, 31 Dec 2023 14:37:02 -0500 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 1rK1cK-0004tG-Tn for bug-gnu-emacs@gnu.org; Sun, 31 Dec 2023 14:37:00 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rK1cK-000365-M2 for bug-gnu-emacs@gnu.org; Sun, 31 Dec 2023 14:37:00 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rK1cL-0007ez-V3 for bug-gnu-emacs@gnu.org; Sun, 31 Dec 2023 14:37:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 31 Dec 2023 19:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68075 X-GNU-PR-Package: emacs Original-Received: via spool by 68075-submit@debbugs.gnu.org id=B68075.170405138029397 (code B ref 68075); Sun, 31 Dec 2023 19:37:01 +0000 Original-Received: (at 68075) by debbugs.gnu.org; 31 Dec 2023 19:36:20 +0000 Original-Received: from localhost ([127.0.0.1]:47054 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rK1bf-0007e4-QL for submit@debbugs.gnu.org; Sun, 31 Dec 2023 14:36:20 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56062) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rK1bd-0007dr-9i for 68075@debbugs.gnu.org; Sun, 31 Dec 2023 14:36:18 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rK1bW-00033j-MM; Sun, 31 Dec 2023 14:36:10 -0500 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=ZkJWqAFCjHnTuxSC61lqxjH1wikgT9dTSCu1E2f/o5Q=; b=kCfcpsbe3gDG J8h7WSQwc+u8ikD+KH56Tb9T1jgSzH43CoQ/aO8+TLGM/5Us1ZIIjKGcJqzGgFC16EoVXyoxgFrme jPCPIibvlcyWUapM4NTO47M8Hw++irP3QQzP9yssqHCQuU2o57orms0snOYM7dGZxoSqIC7arnmBX tXLP5n3V8Uxe5h6JZlIgDEL+poeeUIgRARPxHr927VZL1TylnbzcF8V8dbcCrPP3CQ0SCL32jzX3K YeI8YLOGqwlG2ZhsW1++YT9s1GhKtCP5udXiztRJi2hWD3r8feckAguJX1P9ncMdn63ymQreSRNZl 0iQufMf4zYNPHeAPAJ4ObQ==; In-Reply-To: (message from Stefan Monnier on Sun, 31 Dec 2023 14:07:18 -0500) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:277159 Archived-At: > From: Stefan Monnier > Cc: 68075@debbugs.gnu.org > Date: Sun, 31 Dec 2023 14:07:18 -0500 > > >> >> +@var{handler} is called in the dynamic context where the error > >> >> +happened, without first unwinding the stack, meaning that all the > >> >> +dynamic bindings are still in effect, > >> > > >> > Should we tell something about the effects of lexical-binding on those > >> > "dynamic bindings"? > >> > >> It's not related to `handler-bind` in any case, so if > >> we want to say something about it, we should do it elsewhere (and > >> I think we already do when we discuss lexical binding). > > > > Maybe I'm confused by your use of "dynamic context" and "dynamic > > bindings" in that passage, which somehow hinted on dynamic vs lexical > > binding. > > Of course: "dynamic context" refers to things that include dynamically > bound variable (as well as the set of active catch tags, error handlers, > and unwind-protect forms), and does not include statically bound > variables. `handler-bind` is different from `condition-case` in the way > it interacts with that dynamic context. But for statically bound > variables, well, they obey the rules of static scoping so there's > nothing to influence here. > > > If this is irrelevant, maybe try to reword the text so that > > this potentially confusing terminology is not used? > > Could you give an example piece of code where this "confusing > terminology" makes you unsure how things would work? That's the quoted part of your patch at the beginning of this message. It uses the word "dynamic" twice and "dynamic bindings" once.