The first line of a plain-text file reads:

# -*- eval: (auto-revert-tail-mode 1); -*-

Yet Emacs does not enable auto-revert-tail-mode after opening this file. What is wrong?

  • 2
    It works here, so your syntax is correct. Does it do that with only one file, or all? Only plain-text files, or also files with other major modes? What is the major mode? (text-mode, fundamental-mode, other?)
    – T. Verron
    Dec 9, 2014 at 14:13
  • Right. I forgot to try with emacs -Q, too; and it works there. My Emacs configuration must be messed up: there are many that don't work, besides this one.
    – Eleno
    Dec 9, 2014 at 14:17
  • 2
    Any chance you've changed the value of enable-local-variables or enable-local-eval?
    – glucas
    Dec 9, 2014 at 19:10
  • @glucas: custom-set-variables was setting enable-local-eval to nil. I don't remember having set this option myself. I suppose that Customize did it when I was trying to stop Emacs from pestering me about whether to apply file-local variables or not. I will leave this variable as nil, though, and I will find another way to enable auto-revert-tail-mode on this file. If you convert your comment to an answer, I will select it. Thank you.
    – Eleno
    Dec 10, 2014 at 11:19

1 Answer 1


Take a look at the variables enable-local-eval and enable-local-variables. If you've changed one or both of these from their default values it could explain the behavior you are seeing.

For example if enable-local-eval is nil then that eval line in your file would be ignored.

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.