I use spacemacs. It seems like every time I switch windows from spacemacs and come back to it I get the annoying error

recentf changed on disk; really edit the buffer?

I have tried disabling recentf mode, but other modes turn it back on automatically (i.e., helm or ido). I need those modes for my workflow.

  • 1
    might want to take a look at stackoverflow.com/questions/2284703/… Commented Sep 28, 2017 at 5:23
  • just remember: if you edit a file or a directory (which is currently visited by Emacs) outside of Emacs, Emacs will notice the change, but will not update its buffers automatically in case you want to preserve your edits. This is actually a feature, which gives you more control about what happens to your edits.
    – kuli
    Commented Oct 17, 2017 at 10:13
  • Is there anything special about this situation, e.g., running Emacs in a virtual machine (guest) with the data on the host?
    – lawlist
    Commented May 27, 2018 at 1:16
  • Have you determined what the changes in recentf file? It may not be emacs making the changes. For example, I’ve observed similar behavior in files when I unintentionally configured git to automatically change file encoding from Unix to DOS.
    – Melioratus
    Commented May 30, 2018 at 13:47

3 Answers 3


Removing the whole emacs cache fixed the issue:

rm -rf ~/.emacs.d/.cache/

Maybe try turning on global-auto-revert-mode?

global-auto-revert-mode is an interactive autoloaded compiled Lisp
function in ‘autorevert.el’.

(global-auto-revert-mode &optional ARG)

Toggle Global Auto-Revert Mode.
With a prefix argument ARG, enable Global Auto-Revert Mode if ARG
is positive, and disable it otherwise.  If called from Lisp,
enable the mode if ARG is omitted or nil.

Global Auto-Revert Mode is a global minor mode that reverts any
buffer associated with a file when the file changes on disk.  Use
‘auto-revert-mode’ to revert a particular buffer.

My invocation of it looks like this:

(use-package autorevert
  ;; Also auto refresh dired, but be quiet about it
  (setq global-auto-revert-non-file-buffers t)
  (setq auto-revert-verbose nil)
  (global-auto-revert-mode t))
  • This unfortunately didn't solve the problem.
    – George
    Commented May 25, 2018 at 14:01

Force-updating spacemacs (at least on the master branch) seems to have solved this problem.

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.