2

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.

  • might want to take a look at stackoverflow.com/questions/2284703/… – Diego Alvarez Sep 28 '17 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 Oct 17 '17 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 May 27 '18 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 May 30 '18 at 13:47
1

Removing the whole emacs cache fixed the issue:

rm -rf ~/.emacs.d/.cache/
| improve this answer | |
0

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
  :config
  ;; Also auto refresh dired, but be quiet about it
  (setq global-auto-revert-non-file-buffers t)
  (setq auto-revert-verbose nil)
  :init
  (global-auto-revert-mode t))
| improve this answer | |
  • This unfortunately didn't solve the problem. – George May 25 '18 at 14:01
0

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

| improve this answer | |

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.