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)
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:
Author at Zettelkasten.de • http://christiantietze.de/
It looks like you're new here. If you want to get involved, click one of these buttons!