Sync Emacs org files and reload on external changes
Haxx0red my Emacs to do what I always wanted it to do, and am so happy with the setup I want to share it with the 0.2% of readers who use Emacs ![]()
I did read Emacs org files on mobile devices using the beorg app but hesitated to modify them because of file/buffer content conflicts. Now I found out how to set up Emacs to sync two ways via Dropbox with virtually no conflicts.
- Auto-save org buffers regularly:
(add-hook 'auto-save-hook 'org-save-all-org-buffers) Enable
auto-revert-modefor buffers from files in your synced org directory. Create a.dir-locals.elin that directory with the following content to run a script when a file is opened from that dir (best trick ever!):((nil . ((eval . (auto-revert-mode 1)))))
I didn't want to enable global-auto-revert-mode, and this limits reverting/reloading from disk to the synced files. Hooray!
I wrote this up in more detail on my blog:
https://christiantietze.de/posts/2019/03/sync-emacs-org-files/
-- Christian
Author at Zettelkasten.de • https://christiantietze.de/
Howdy, Stranger!
Categories
- 3K All Categories
- 152 Research & Reading
- 692 The Zettelkasten Method
- 7 Knowledge Work
- 99 Writing
- 464 Software & Gadgets
- 154 Workflows
- 729 The Archive
- 15 Plug-In Showcase
- 88 Resolved Issues
- 225 Projects Logs and Journals
- 83 Project: Zettelkasten.de
- 53 Critique my Zettel
- 171 Random
- 373 Introduce Yourselves!