From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#72229: (setq overriding-terminal-local-map nil) in isearch-done Date: Tue, 23 Jul 2024 20:46:33 +0300 Organization: LINKOV.NET Message-ID: <86jzhcyqb2.fsf@mail.linkov.net> References: <87r0bmer66.fsf@web.de> <87sew17fs1.fsf@web.de> <864j8gsk4i.fsf@mail.linkov.net> <87h6cg856c.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34598"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) Cc: 72229@debbugs.gnu.org To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jul 23 19:53:38 2024 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 1sWJhi-0008rB-0u for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 23 Jul 2024 19:53:38 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sWJh6-0006Ok-84; Tue, 23 Jul 2024 13:53:00 -0400 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 1sWJh3-0006NC-UI for bug-gnu-emacs@gnu.org; Tue, 23 Jul 2024 13:52:57 -0400 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 1sWJh3-0006nw-MX for bug-gnu-emacs@gnu.org; Tue, 23 Jul 2024 13:52:57 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sWJh8-0005YA-CB for bug-gnu-emacs@gnu.org; Tue, 23 Jul 2024 13:53:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 23 Jul 2024 17:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72229 X-GNU-PR-Package: emacs Original-Received: via spool by 72229-submit@debbugs.gnu.org id=B72229.172175715721297 (code B ref 72229); Tue, 23 Jul 2024 17:53:02 +0000 Original-Received: (at 72229) by debbugs.gnu.org; 23 Jul 2024 17:52:37 +0000 Original-Received: from localhost ([127.0.0.1]:60680 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sWJgj-0005XR-JR for submit@debbugs.gnu.org; Tue, 23 Jul 2024 13:52:37 -0400 Original-Received: from relay1-d.mail.gandi.net ([217.70.183.193]:47549) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sWJgg-0005X0-Ea for 72229@debbugs.gnu.org; Tue, 23 Jul 2024 13:52:35 -0400 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 3C3E8240003; Tue, 23 Jul 2024 17:52:21 +0000 (UTC) In-Reply-To: <87h6cg856c.fsf@web.de> (Michael Heerdegen's message of "Tue, 23 Jul 2024 18:05:31 +0200") X-GND-Sasl: juri@linkov.net 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:289185 Archived-At: >> This mechanism looks like a variable watcher enabled by >> `add-variable-watcher'. >> So you could add a watcher that conditionally controls variable >> modifications. > > I don't think variable watchers are very helpful here. They don't solve > the underlying problem: potentially infinite variables of the same name > can exist, shadowing each other, with values partly sharing structures. > > Using variable watchers I can see whether a variable value gets shadowed > or unassigned using a set operation - but I can't know whether the > previous value still exists, as binding of some other variable, and if > it will be stored back into the variable. Nor do I have access to old > bindings and their values until the program assigns it back to the > variable. > > I saw that in Bug#70938. Manipulations of a variable can interfere in > annoying ways. > > Functions are different. You have only one dynamic binding (unless in > the rare case of using `cl-letf', which is extremely rare). And you > always have access to it to undo any prior modification. I remember Stefan M suggested to use function variables as much as possible such as (defvar isearch-filter-predicate #'isearch-filter-visible), then it's easy to add more filters with add-function. But I'm not sure is it possible to do the same with a variable getter function? I mean that instead of (funcall isearch-filter-predicate) such a getter function could be called (get-value isearch-filter-predicate) to access the variable value.