From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: help-gnu-emacs@gnu.org
Subject: buffer-local-value confusion
Date: Wed, 08 Oct 2014 14:13:45 +0800 [thread overview]
Message-ID: <87k34bxf52.fsf@ericabrahamsen.net> (raw)
I have defined a buffer-local variable like this:
(defvar nngnorb-attachment-file-list nil)
(make-variable-buffer-local 'nngnorb-attachment-file-list)
I'm first setting a value for it in the buffer referred to by
nnir-tmp-buffer, then trying to copy that buffer-local value to a
different buffer. Here's what I'm seeing, which confuses me:
(with-current-buffer (get-buffer nnir-tmp-buffer)
nngnorb-attachment-file-list) --> proper, populated value
(buffer-local-value
nngnorb-attachment-file-list
(get-buffer nnir-tmp-buffer)) --> nil
I thought this was the whole point of buffer-local-value? Am I doing it
wrong?
On the other hand, using with-current-buffer is almost precisely the
same number of characters as buffer-local-value, so maybe there's no
point in insisting on the latter...
Eric
next reply other threads:[~2014-10-08 6:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-08 6:13 Eric Abrahamsen [this message]
2014-10-08 7:29 ` buffer-local-value confusion Thorsten Jolitz
[not found] <mailman.10699.1412748865.1147.help-gnu-emacs@gnu.org>
2014-10-08 7:27 ` Marco Wahl
2014-10-08 7:34 ` Eric Abrahamsen
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=87k34bxf52.fsf@ericabrahamsen.net \
--to=eric@ericabrahamsen.net \
--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).