From: Patrick Nicodemus <gadget142@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Why does saving a buffer to a new file clear local variables?
Date: Tue, 10 Dec 2024 23:05:00 -0500 [thread overview]
Message-ID: <CADZEZBZbKRo7uHpqjOBTADhQcUG5U=H+RuZOOwd7DRdtLE_s5A@mail.gmail.com> (raw)
If I create a new buffer like (get-buffer-create "tmpbuf"),
switch to the buffer, and execute the commands
(make-variable-buffer-local "abc")
(setq abc 3)
and then save the buffer to, say, "tmpbuf", then abc becomes nil.
Why is this the case?
Is this behavior documented anywhere?
I checked that it doesn't change the major mode. It is "Fundamental" before
and after saving.
next reply other threads:[~2024-12-11 4:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-11 4:05 Patrick Nicodemus [this message]
2024-12-12 7:31 ` Why does saving a buffer to a new file clear local variables? Jean Louis
2024-12-12 11:32 ` Michael Heerdegen via Users list for the GNU Emacs text editor
2024-12-12 12:41 ` Jean Louis
2024-12-12 13:01 ` Michael Heerdegen via Users list for the GNU Emacs text editor
2024-12-12 18:31 ` Jean Louis
2024-12-12 12:50 ` Michael Heerdegen
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='CADZEZBZbKRo7uHpqjOBTADhQcUG5U=H+RuZOOwd7DRdtLE_s5A@mail.gmail.com' \
--to=gadget142@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/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.
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).