From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#68075: 30.0.50; New special form `handler-bind` Date: Sun, 31 Dec 2023 14:07:18 -0500 Message-ID: References: <835y0i92kb.fsf@gnu.org> <83le9c3z6k.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20480"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 68075@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 31 20:08:20 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 1rK1AZ-00058U-Pr for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 31 Dec 2023 20:08:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rK1AL-0008Ey-1S; Sun, 31 Dec 2023 14:08:05 -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 1rK1AH-0008EZ-Mg for bug-gnu-emacs@gnu.org; Sun, 31 Dec 2023 14:08:01 -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 1rK1AH-0007Hx-F7 for bug-gnu-emacs@gnu.org; Sun, 31 Dec 2023 14:08:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rK1AI-0001nE-DM for bug-gnu-emacs@gnu.org; Sun, 31 Dec 2023 14:08:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 31 Dec 2023 19:08:02 +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.17040496496853 (code B ref 68075); Sun, 31 Dec 2023 19:08:02 +0000 Original-Received: (at 68075) by debbugs.gnu.org; 31 Dec 2023 19:07:29 +0000 Original-Received: from localhost ([127.0.0.1]:47029 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rK19l-0001mT-Fn for submit@debbugs.gnu.org; Sun, 31 Dec 2023 14:07:29 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:24186) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rK19j-0001mG-8J for 68075@debbugs.gnu.org; Sun, 31 Dec 2023 14:07:27 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 385B8442B0A; Sun, 31 Dec 2023 14:07:20 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1704049639; bh=mxqPYqfYViWN4qiL6Q067+ZU+2f5r2ikiMcy/OyQiVU=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Yv+oPzolzQkYZuM1WJTUrEEjUUhd0WK+T0gSugJ8CWicw+by2iCeMos8NO7pTiKSU drmuUYE4U18w22N5QZ5NLGki5pU7Ysi2NNScnD79LXT4LGzRd7Gl1EuRotL4jTmhFk 8FviVl5Q8OR3CEHiOtfS0qcmEfpMfBoOwlGS9nW5pN+Sw+G/zLeKYhrr730+MBrmnN Yz5s1fPNL9Tgg3LGFZOorPhTMiHKZ/6PTdzd5ZRvm+3dcNN78PQw2bOrFeos2H4S38 GrHJl/yVu13Pgxh6J3JMYm377d6XNSrTl4TLV3Sy529LbzvB4NkUde8PdTES6E/idn 8Vty70dXmFXBw== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 0544E442B03; Sun, 31 Dec 2023 14:07:19 -0500 (EST) Original-Received: from alfajor (unknown [207.96.224.130]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id E3D8812121B; Sun, 31 Dec 2023 14:07:18 -0500 (EST) In-Reply-To: <83le9c3z6k.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 30 Dec 2023 09:52:03 +0200") 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:277155 Archived-At: >> >> +@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? Stefan