如何配置Dired在文件/文件夹更改时立即更新?


14

有时,我启动Dired,然后重命名文件或添加新文件,并且Dired在重新启动Emacs之前看不到更改。是否可以通过轮询或文件系统挂钩将Dired配置为更快地刷新自身?


8
使用revert-buffer。默认绑定g
KAction 2013年

1
@KAction Upvote。非常有用,但不是自动的。
mcandre

Answers:


17

添加一个挂钩

;; Auto-refresh dired on file change
(add-hook 'dired-mode-hook 'auto-revert-mode)
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.