简体   繁体   English

创建我的emacs组织模式文件的自动历史记录(版本控制)

[英]Create an automatic history (version control) of my emacs org-mode files

I love Emacs org-mode but I sometimes wish I could tell when I wrote a specific line or made a specific change. 我喜欢Emacs的组织模式,但有时我希望我能告诉我何时写特定行或进行特定更改。

It would be great to have an automatic versioning mechanism that would keep track of all the changes (or deltas), say every hours and timestamp all the changes. 拥有一个自动版本控制机制来跟踪所有更改(或增量),例如每小时一次并标记所有更改的时间戳,将是很棒的。

Any suggestions? 有什么建议么?

My suggestion would be to just let version control be version control: keep your files in git or some other existing VCS. 我的建议是让版本控制成为版本控制:将文件保存在git或其他现有的VCS中。 Then you just need a way to automate the commit process either after every change or periodically - for example, see the discussion in https://superuser.com/questions/132218/emacs-git-auto-commit-every-5-minutes 然后,您只需要一种在每次更改后或定期自动执行提交过程的方法-例如,请参阅https://superuser.com/questions/132218/emacs-git-auto-commit-every-5-minutes中的讨论

My solution is as follows (inspired by Bernt Hansen's setup: http://doc.norang.ca/org-mode.html#HourlyCommits ): 我的解决方案如下(受Bernt Hansen的设置启发: http : //doc.norang.ca/org-mode.html#HourlyCommits ):

I'm under Windows 10, and I have a git repository for all my org files. 我在Windows 10下,并且我所有的组织文件都有一个git存储库。 Emacs is set up to save all open buffers at 00:59 every hour, and on top of every hour, a scheduled job runs a batch script executing a git commit. Emacs设置为每小时00:59保存所有打开的缓冲区,并且每小时安排一次,预定的作业运行执行git commit的批处理脚本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM