On Mon, Nov 03, 2025 at 06:57:33PM +0000, Ihor Radchenko wrote:
> Pedro Andres Aranda Gutierrez <[email protected]> writes:
> 
> > I tried your suggestion of
> >
> > (let ((org-latex-whatever org-latex-whatever))
> >
> > to keep the names and although all tests passed, the exporter lost all my
> > features.
> > I have just reverted that commit.
> > Let's investigate why you can't duplicate the variable name in a
> > let-binding... but in the mean-time, we'll keep my ugly names.
> 
> Then, I should be wrong thinking that let-binding override buffer-local value.
> buffer-locals + let is tricky.

It's the other way around.

In a fresh buffer, (for convenience in Lisp mode), eval those two in sequence:

  (set (make-local-variable 'foo) 23)

  (let ((foo 42))
    (message (format "foo is: %S, its buffer-local value is %S"
                     foo
                     (buffer-local-value 'foo (current-buffer)))))

  => foo is: 42, its buffer-local value is 42

Let bindings shadow buffer-local ones.

Cheers
-- 
t

Attachment: signature.asc
Description: PGP signature

Reply via email to