From: Michael Heerdegen via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Juri Linkov <juri@linkov.net>
Cc: 72229@debbugs.gnu.org
Subject: bug#72229: (setq overriding-terminal-local-map nil) in isearch-done
Date: Tue, 23 Jul 2024 18:05:31 +0200 [thread overview]
Message-ID: <87h6cg856c.fsf@web.de> (raw)
In-Reply-To: <864j8gsk4i.fsf@mail.linkov.net> (Juri Linkov's message of "Tue, 23 Jul 2024 09:32:21 +0300")
Juri Linkov <juri@linkov.net> writes:
> Indeed, you are right, `isearch-done' should restore the original value.
> The existing variable `isearch--saved-overriding-local-map' can't be used,
> so a similar variable should be added like in this patch:
LGTM for master - thank you.
> 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.
Michael.
next prev parent reply other threads:[~2024-07-23 16:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-21 14:49 bug#72229: (setq overriding-terminal-local-map nil) in isearch-done Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-22 12:49 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-23 6:32 ` Juri Linkov
2024-07-23 11:29 ` Eli Zaretskii
2024-07-23 17:54 ` Juri Linkov
2024-07-23 16:05 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-07-23 17:46 ` Juri Linkov
2024-07-24 16:42 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-24 17:27 ` Drew Adams via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-24 20:12 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87h6cg856c.fsf@web.de \
--to=bug-gnu-emacs@gnu.org \
--cc=72229@debbugs.gnu.org \
--cc=juri@linkov.net \
--cc=michael_heerdegen@web.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).