14

A minor mode is not enabled/disabled by setting a variable. The minor mode variable should be used to check the "mode enabled" status, not to set the mode state. If its value is t, the minor mode is on, else the mode is off. See the below snippets to see how to control any minor mode. Replace MINOR-MODE-NAME with the actual minor mode name you are dealing ...


13

Customize option auto-revert-verbose to nil. C-h v tells you this: auto-revert-verbose is a variable defined in autorevert.el. Its value is t Documentation: When nil, Auto-Revert Mode does not generate any messages. When non-nil, a message is generated whenever a file is reverted. You can customize this variable. It's kind of a shame that the doc of auto-...


11

auto-revert-tail-mode is great, but it has its limits. Therefore I prefer to use an asynchronous shell command. Open the remote directory in dired, position the cursor to the file you want to watch, and apply ! tail -f * &. If you want to suppress Tramp messages, decrease the verbosity. (setq tramp-verbose 1) shall be sufficient.


9

As someone who just had this problem, I found another solution: auto-image-file-mode. What it does is automatically make sure the file is in image mode instead of binary, so enable both that and auto-revert-mode and everything works as expected. Emacs 24.4.1 Source: http://osdir.com/ml/bug-gnu-emacs-gnu/2014-01/msg01061.html


8

You can do this for a specific buffer with M-x auto-revert-mode (manual). For file buffers, this will check every auto-revert-interval seconds (defaults to 5) for changes and update the buffer from disk automatically. Your title says "a particular file" while your question's body mentions a file type (org files). Depending on your circumstances, here are a ...


8

Funny: it looks like you choose a tag that directly answers your question ("directory-local-variables") The best way to accomplish this is by placing a .dir-locals.el file in your org directory and using it to enable auto-revert-mode. Specifically, the file should look contain this: ((nil . ((eval . (auto-revert-mode 1))))) If you want only org ...


6

This isn't specific to focus in/out but rather to just updating buffers when the underlying file changes. Emacs calls this "reverting" the buffer and has the functions revert-buffer to do it manually and auto-revert-mode to revert automatically when the file changes on disk. auto-revert-mode can be added to the hook for whatever mode your using or you turn ...


5

There is a customizable variable named auto-revert-remote-files, which does what you want.


5

Since Emacs 24.4, auto-revert-mode does not poll anymore. Instead, it uses file notifications from your underlying OS. There shouldn't be any performance problem; people have reported 600+ buffers in parallel in auto-revert-mode, IIRC.


4

You don't provide much information about what you are doing or what you are seeing. Try to give a step-by-step recipe, preferably starting from emacs -Q, and say what you expect versus what you see. Does manually reverting the buffer work (M-x revert-buffer, after setting the current buffer to the image buffer)? If so, then investigate what is different ...


4

Maybe use add-file-hook to turn off auto-revert-mode for a file buffer that is larger than some limit. This seems to work OK (tested minimally): (defvar my-max-auto-revert-size 1000000000 "Do not auto-revert file buffers larger than this.") (add-hook 'find-file-hook (lambda () (when (> (buffer-size) my-max-auto-revert-size) ...


4

As Dan pointed out, by default you need to manually revert dired buffers (e.g., by typing g) in order to update the directory listing view. If you want this to happen automatically, then you can turn on auto-revert mode. For example, (add-hook 'dired-mode-hook #'(turn-on-auto-revert-mode)) But see the Emacs manual, node Auto Reverting Dired for some ...


3

I don't know elfeed-log, but my crystal ball suggests, in order: just put the cursor at the very end of the buffer, and the window keep scrolling to keep the end of the buffer visible. if that doesn't work, set window-point-insertion-type to t in the elfeed-log buffer and try step 1 again. if neither works, send your problem to the maintainer of the elfeed-...


3

Assuming you're not using auto-revert-tail-mode, you might be able to just tell Emacs that if the file is too large, then the buffer is not "stale". E.g. something like: (defun my-not-too-big (&rest _) (or (not buffer-file-name) (let ((size (nth 7 (file-attributes buffer-file-name)))) (< size 10000000000)))) (add-function :after-...


3

Yes. Put this at the end of your file. * COMMENT Config Local Variables: eval: (auto-revert-mode 1) End: This assumes Org-mode, for other modes use comments in the language used as explained in the link given below. Note: see Local Variables in Files in the manual for the background, safety information and a caveat that this might not always be a good ...


3

I tried opening a png in emacs, enabling auto-revert-mode and then from a shell, copying another image over it and then replacing that file with a copy of the original png. What I found is that the file is sometimes updated to the new files binary contents, but not the rendered content. If it opens the binary content, try using C-c C-c to convert it to an ...


3

You don't set the variable using setq, you call the function: (global-auto-revert-mode)


2

To enable a minor-mode you have to use the eval keyword as explained in Specifying File Variables To enable or disable a minor mode in a local variables list, use the eval keyword with a Lisp expression that runs the mode command. While that isn't explicitly mentioned in Per-Directory Local Variables it does apply here to - after all directory variables ...


2

See https://debbugs.gnu.org/35418 - it discusses the problem.


2

You can just set auto-revert-interval to a very large value (like most-positive-fixnum).


2

You must set auto-revert-remote-files to a non-nil value.


1

As the message says the elfeed-log buffer is not visting a file but it's automatically updated by elfeed itself


1

The following lisp snippet installs a slight variation of what you want. It reverts all buffers that have windows in the current frame. So everything what you actually see is reverted. If you insist that only the current buffer should be reverted you can change the filter to something like (lambda (buf) (eq (car (window-list)) (get-buffer-window buf))). (...


1

auto-revert only works for buffers which are not modified. So at least for the "trying to save and getting the file changed on disk prompt" the behavior you describe is normal.


Only top voted, non community-wiki answers of a minimum length are eligible