2

When running emacs in daemon mode, a directory listing using dired does not seem to show the latest created files.

What could be the cause of this issue, and how can I fix it?

Drew
  • 75,699
  • 9
  • 109
  • 225
  • `dired` does not automatically update directory buffers that are already open. You can `revert-buffer` them, though. – Dan Jul 31 '17 at 19:05

1 Answers1

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 limitations of this.

You might also want to combine that with something like this:

(customize-set-value
  'auto-revert-verbose
  nil
  "Prevent any auto-revert messages from obscuring the minibuffer at crucial times!")
Drew
  • 75,699
  • 9
  • 109
  • 225
deprecated
  • 2,775
  • 14
  • 15