help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: wrong type error in local variables


From: Stefan Monnier
Subject: Re: wrong type error in local variables
Date: Thu, 02 Jul 2020 11:56:29 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>     Local Variables:
>     eval: (ab-new-buffer (prog1 (find-file "chapter16.tex") (message "After 
> find file.")))
>     End:

Joost Kremers gave a good answer.  I'll just add some "unrelated" comments:

- `find-file` should not be called from Elisp.
  Use `find-file-noselect` instead.

- It's OK to temporarily change to another buffer, but your "eval"
  should eventually return to the original buffer.  Otherwise, do expect
  weird behaviors.  IOW wrap a `save/with-current-buffer` around your code.


        Stefan




reply via email to

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