all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gerd.moellmann@gmail.com, 65209@debbugs.gnu.org,
	monnier@iro.umontreal.ca
Subject: bug#65209: 30.0.50; Unexpected behaviour of setq-local
Date: Sat, 26 Aug 2023 04:09:11 +0200	[thread overview]
Message-ID: <87h6om8shk.fsf@web.de> (raw)
In-Reply-To: <83msyhqajo.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 24 Aug 2023 08:22:35 +0300")

Eli Zaretskii <eliz@gnu.org> writes:

> Please describe such situations, where the escape (i.e. how to avoid
> bumping into this subtlety, by either rewriting the code or using
> auxiliary variables) is not clear.

I don't know.  The problem is that when setting buffer-local variables
it is unknown which bindings are in effect unless you explicitly look.

Recently there was a question, I tried to find it again but failed,
where a user wanted to set, or expected a variable to be set - was it
`lexical-binding'? - and that failed because there was a binding of
`lexical-binding' in the call chain that prevented this.  Too bad I
don't find it anymore, it was not long ago.  Maybe the example has even
been fixed now, but maybe it was also the case that Stefan mention, that
case where the right semantics were not trivial.

Anyway, I mean potentially any operation where a new buffer is created
and set up, and any bindings of variables that may be made buffer local
are also bound when creating a buffer.  Dunno, like, creating a new
dired buffer from dired, and you need to bind the same variable to
create the buffer that you also want to make buffer local.

I don't know whether something like this can happen at all.  Stefan's
examples use `setq', not `setq-local', so maybe everything is just fine
after his fix of this bug.  I can't tell for sure because I can't read C
very efficiently and we don't have doc describing this, so I am not
really a good person to ask.  Since Stefan is quiet, let's assume the
situation is good enough now.


Michael.





  reply	other threads:[~2023-08-26  2:09 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-10 13:50 bug#65209: 30.0.50; Unexpected behaviour of setq-local Gerd Möllmann
2023-08-10 14:00 ` Eli Zaretskii
2023-08-11  0:17 ` Michael Heerdegen
2023-08-11  4:56   ` Gerd Möllmann
2023-08-11  5:53     ` Michael Heerdegen
2023-08-11  8:17       ` Gerd Möllmann
2023-08-11 11:09         ` Eli Zaretskii
2023-08-11 11:34           ` Gerd Möllmann
2023-08-11 11:36             ` Eli Zaretskii
2023-08-13  4:16           ` Michael Heerdegen
2023-08-13  5:53             ` Eli Zaretskii
2023-08-11 14:58         ` Drew Adams
2023-08-13 16:43 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-13 19:51   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-14  3:24     ` Michael Heerdegen
2023-08-14  4:05       ` Gerd Möllmann
2023-08-18 23:24         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-20  4:43           ` Michael Heerdegen
2023-08-20  6:49             ` Eli Zaretskii
2023-08-22  3:09               ` Michael Heerdegen
2023-08-22 10:56                 ` Eli Zaretskii
2023-08-23  3:47                   ` Michael Heerdegen
2023-08-23 11:39                     ` Eli Zaretskii
2023-08-23 12:51                       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-24  1:06                         ` Michael Heerdegen
2023-08-24  5:22                           ` Eli Zaretskii
2023-08-26  2:09                             ` Michael Heerdegen [this message]
2023-08-26  6:02                               ` Eli Zaretskii
2023-08-26 14:25                               ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-27  4:19                                 ` Michael Heerdegen
2023-08-24  3:31                       ` Michael Heerdegen
2023-08-24  5:35                         ` Eli Zaretskii

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h6om8shk.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=65209@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=gerd.moellmann@gmail.com \
    --cc=monnier@iro.umontreal.ca \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.