6

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 '14 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. – Elena Dec 9 '14 at 14:17
  • 1
    Any chance you've changed the value of enable-local-variables or enable-local-eval? – glucas Dec 9 '14 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. – Elena Dec 10 '14 at 11:19
4

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, privacy policy and cookie policy

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