I'm using doom-emacs with Emacs 28. I'm trying to set a file variable in org-mode, and I've seen numerous posts with how to do it, but I can't seem to make it work.

#+TITLE: Test

#+TITLE: Test

* Local variables
# local variables:
# eval: (auto-fill-mode 0)
#  eval: (poly-org-mode 0)
# org-html-xml-declaration: '(("html" . "") ("php" . "")
# end:

After doing M-x describe-variable, org-html-xml-declaration still has its original value.

Why is this? Can someone point out what I'm doing wrong?

Is there a definitive guide for how to set local variables like this?

1 Answer 1


You have a syntax error in the value you give for org-html-xml-declaration. If you check the *Messages* buffer, you will probably find one that says “File local-variables error: (end-of-file)”. It is telling you that it was trying to parse the local variables when it encountered an end-of-file error. You forgot a closing parenthesis, so it kept looking for it until it got to the end of the file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.