I use emacs on different boxes and I want to share some files between them. The canonical examples would be gnus-startup-file and remember-data-file.

I can set the files to remote locations (like, e.g., /sds@myserver:~/.newsrc) and tramp would take care of that. However, myserver is not always available and I don't want my gnus to freeze when myserver goes down.

The behavior I want is local files which are synced to a remote location every now and then.

For now I do it from gnus-before-startup-hook/gnus-after-exiting-gnus-hook and midnight-hook, but I was wondering what would others suggest.

PS. Note that these files aren't on the same exalted level as, say, .emacs (which is kept under hg), so I do not want to preserve their history.

2 Answers 2


I keep those files in a git repository. Then I run a script every once in a while which does git commit; git pull; git push. I really wish someone would write a file-system which does that for me.

  • 1
    loggedfs? gitfs? (They both record every write.) Aug 25, 2016 at 21:12
  • I don't think these files deserve version control. Those that do are, indeed, kept under hg.
    – sds
    Aug 25, 2016 at 21:34
  • 1
    gitfs is on the right track I think, but it needs more work. The way I see it, it should be as commonplace/standard/robust as NFS. It could be seen as a competitior to owncloud. As for whether they deserver versioning, I agree they don't except to detect and handle merges/conflicts.
    – Stefan
    Aug 26, 2016 at 3:38

Just put those files in your .emacs.d and symlink to them from your home directory.

That way they'll always be up to date as long as you keep your .emacs.d syncronized.

  • I don't understand. How is .emacs.d synchronized?
    – sds
    Aug 26, 2016 at 5:23
  • Rereading your question, I see you said your .emacs was in hg, not your .emacs.d. My bad, I use .emacs.d/init.el instead of .emacs and forget about it sometimes. Aug 26, 2016 at 5:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.