Skip to main content
Share Your Experience: Take the 2024 Developer Survey
13 votes
Accepted

How to stop dired printing "Reverting buffer ..."

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 ...
Drew's user avatar
  • 77.9k
13 votes
Accepted

Revert all open buffers (and ignore errors)

Original Here is my slightly improved version of the snippet in the question. Reviewing my VC history, I confirm that the below snippet started out as the snippet posted by the OP. So I do pay ...
Kaushal Modi's user avatar
  • 25.7k
8 votes
Accepted

Surprisingly persistent local variable

In case someone else runs into this, I had enabled TeX-auto-save, which saves settings to an auto/ directory and loads them when a file is revisited. https://www.gnu.org/software/auctex/manual/...
Toothrot's user avatar
  • 3,264
7 votes

Is it possible to DISABLE auto-reverting remote file?

Set auto-revert-remote-files to nil. This disables auto reverting for all files with Tramp syntax. If you want to disable auto reverting of remote files in a mounted directory, or in a sync directory,...
Michael Albinus's user avatar
7 votes

How do I reload a file in a buffer?

For spacemacs users: SPC b R (spacemacs/safe-revert-buffer). For skipping confirmation, other answers already cover that, though I agree with others that it's probably not a good idea to bind that to ...
Croad Langshan's user avatar
6 votes

Revert all open buffers (and ignore errors)

Another: (defun revert-all-no-confirm () "Revert all file buffers, without confirmation. Buffers visiting files that no longer exist are ignored. Files that are not readable (including do not exist)...
Drew's user avatar
  • 77.9k
5 votes

How do I reload a file in a buffer?

Magit manages file reversions for you automatically, thus solving your core problem. You also benefit from its other features. Here are the docs for tweaking the settings you're interested in: If you ...
webappzero's user avatar
4 votes

How to understand the meaning of "revert"?

If I understand correctly, "revert" means to reload the file in the file system into the emacs buffer This is correct. (There are other details which you can read about in the documentation, ...
phils's user avatar
  • 51.6k
4 votes
Accepted

dired not showing recently created files when emacs is run in daemon mode

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 ...
deprecated's user avatar
  • 2,835
3 votes

Is it possible to DISABLE auto-reverting remote file?

You could use C-hv global-auto-revert-ignore-buffer with C-hv find-file-hook (defun my-inhibit-remote-auto-revert () "Used in `find-file-hook'." (when (file-remote-p buffer-file-name) (setq ...
phils's user avatar
  • 51.6k
3 votes
Accepted

How to revert a buffer using the "g" shortcut

You can see what command a key sequence is bound to by using 'M-x describe-key' (normally bound to 'C-h k'). Switching to a dired buffer and running C-h k gives an extensive help text. The start is:...
Realraptor's user avatar
  • 1,293
3 votes

Automatic periodic reload of all orgmode agenda files

you could use a local variable in your org files this way: # Local Variables: # eval: (auto-revert-mode) # End: Just append those lines at the end of each generated file. It'll work next time you ...
Muihlinn's user avatar
  • 2,634
2 votes

How do I reload a file in a buffer?

It seems there is a built-in function named revert-buffer-quick which does the trick (source). It checks if you have unsaved modification on the buffer, if there is any, it asks for confirmation, ...
Mehrad's user avatar
  • 139
2 votes

Revert all open buffers (and ignore errors)

Based on @Drew's answer, I've made a package revert-buffer-all. It handles some additional cases: Progress reporting (since it can be slow with many files open). Clear undo state, so you don't ...
ideasman42's user avatar
  • 8,826
2 votes

Revert all open buffers (and ignore errors)

I accepted Kausal's answer since it was closest to what I wanted, but I grabbed part of Drew's solution, too. I wrapped revert-buffer in with-demoted-errors and dropped the :preserve-modes parameter ...
Patrick Collins's user avatar
2 votes

Why needs syntax highlighting often a `revert-buffer`?

When there is an error in the syntax highlighting code, it is silently ignored by the font-lock package. When this happens, the buffer can be left in an unhighlighted state. You can use the package ...
Lindydancer's user avatar
  • 6,170
2 votes

How to quickly revert the buffer?

The revert-buffer function takes a few parameters which I think make the reload faster. I've got this bound to a keyboard shortcut for reloading the current buffer, it feels as fast as when you first ...
saintamh's user avatar
1 vote
Accepted

How to avoid the prompt in `revert-buffer`

I use this (and in keeping with the MS Windows key for reverting I bind it to <f5>). It's similar to what you're using, but not quite the same. I've been using it for a l o n g t i m e . (...
Drew's user avatar
  • 77.9k
1 vote

How to avoid the prompt in `revert-buffer`

I believe you can set "revert-without-query" to t.
joncgoodwin's user avatar
1 vote

How to cancel a mini-buffer prompt from elisp, eg: "... changed on disk; really edit this buffer?"

Based upon a reading of the code for the function ask-user-about-supersession-threat, it may be sufficient to use (signal 'file-supersession (list "My custom message")) to cancel the mini-buffer ...
lawlist's user avatar
  • 19.2k
1 vote

Automatic periodic reload of all orgmode agenda files

See: https://www.gnu.org/software/emacs/manual/html_node/elisp/Idle-Timers.html To see the mandatory and optional arguments to functions such as run-with-timer and revert-buffer, type C-h f (aka M-x ...
lawlist's user avatar
  • 19.2k
1 vote
Accepted

Revert buffer with coding system

As I already tried to describe in my comment: (add-hook 'org-mode-hook (lambda () (revert-buffer-with-coding-system "utf-8"))) cannot work because revert-buffer-with-coding-system indirectly runs org-...
Tobias's user avatar
  • 33.3k
1 vote

Dired+. Autorefresh after copy files

Hm. I don't see that behavior. What I see is that the file that was copied shows up immediately in the Dired listing of the directory where it was copied. Did you try with emacs -Q and then just ...
Drew's user avatar
  • 77.9k
1 vote

How to revert buffer after magit-checkout?

magit-auto-revert-mode is a mode and therefore should be enabled by calling the mode function, not by setting the variable. But it is supposed to be enabled by default, so you shouldn't have to do ...
tarsius's user avatar
  • 25.8k
1 vote

Revert all open buffers (and ignore errors)

I'd fix this with a condition-case or ignore-errors (docs here). I don't know exactly what you'll want it to do; if you want to do something with errors, if you can use condition-case to specify the ...
Gastove's user avatar
  • 1,551
1 vote
Accepted

Reload single file in every window

It's not very clear to me just what you are looking for. I get the impression that you just want to revert the buffer and then restore the position from before reverting. If so, that's this: (defun ...
Drew's user avatar
  • 77.9k

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