[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

buffer-local-value confusion

From: Eric Abrahamsen
Subject: buffer-local-value confusion
Date: Wed, 08 Oct 2014 14:13:45 +0800
User-agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux)

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

 (get-buffer nnir-tmp-buffer)) --> nil

I thought this was the whole point of buffer-local-value? Am I doing it

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...


reply via email to

[Prev in Thread] Current Thread [Next in Thread]