开发者

Keeping track of file opening

开发者 https://www.devze.com 2023-03-27 21:31 出处:网络
Is there an extension or easy way to hack Emacs to keep track of all file open and file save operations?

Is there an extension or easy way to hack Emacs to keep track of all file open and file save operations? I looked at recentf, and it doesn't seem to work with multiple Emacs processes running in parallel.

BTW, I found a way to keep track of file save operations, using http://www.emacswiki.org/emacs/BackupEachSave

(add-to-list 'load-path "~/.emacs.d/")
(开发者_运维问答require 'backup-each-save)
(add-hook 'after-save-hook 'backup-each-save)
(setq backup-each-save-mirror-location "/usr/local/google/users/yaroslavvb/backups")

It saves backup on each save with timestamp in filename, so you can get list of all save operations by traversing backups tree


There are hooks for visiting and saving files. You can use those to create some kind of common tracking function if you know elisp:

http://www.gnu.org/s/emacs/manual/html_node/elisp/Standard-Hooks.html

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号