Stephen Berman writes: > On Thu, 13 Jun 2013 14:16:40 +0200 Rainer M Krug wrote: > >> Hi >> >> I have the following function definition: >> >> ,---- >> | (defun org-babel-mark-file-as-tangled () >> | (when (string-match "[.]R" (buffer-file-name)) >> | (add-file-local-variable 'org-babel-tangled-file t) >> | (add-file-local-variable 'buffer-read-only t) >> | (basic-save-buffer))) >> `---- >> >> Now I would like to set the minor mode (auto-revert-mode) as >> well. According to the manual, one should use >> >> ,---- >> | eval: (auto-revert-mode) >> `---- >> >> But how can I include this in my function above? > > How about this: > > (defun org-babel-mark-file-as-tangled () > (when (string-match "[.]R" (buffer-file-name)) > (add-file-local-variable 'org-babel-tangled-file t) > (add-file-local-variable 'buffer-read-only t) > (add-file-local-variable 'eval '(auto-revert-mode)) > (basic-save-buffer))) Haven't thought about that - but it makes perfect sense now. Have somehow thought, the function add-file-local-variable is limited to variables - and as eval: is not a variable, I discarded this option before trying it. Thanks, Rainer > > Steve Berman > > > -- Rainer M. Krug email: RMKruggmailcom