I am trying to establish an ox-hugo workflow using the Auto-saving feature described in the official website. However, when trying to enable it using the following snippet:

  . ((org-mode . ((eval . (org-hugo-auto-export-mode)))))))

I receive the following error:

Debugger entered--Lisp error: (invalid-function ("content-org/" (org-mode (eval org-hugo-auto-export-mode)))) (("content-org/" (org-mode (eval org-hugo-auto-export-mode))))

Any ideas why the official doc instructions would not be valid?

  • Where are you putting this snippet? It should be in a file called .dir-locals.el in the project root. Emacs has different evaluation rules for such a file and it looks, from yr debugger output, that they have not been applied in yr case. Commented Apr 4, 2020 at 10:13
  • @FranBurstall you were right, i was including the snippet in my .emacs file! I did not know there were differences in evaluation of these. If you make this an answer I'll gladly accept it
    – brodoll
    Commented Apr 4, 2020 at 12:09

1 Answer 1


You must put this snippet in file called .dir-locals.el in the project root. This file is read by emacs with special evaluation rules in place which differ from those with which .emacs and most other .el files are read.

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.