I have to work on multiple different machines and it would be nice to keep my .emacs file consistent everywhere.
Question: is there a package which allows to update the file at startup from a remote location such as github or via ssh?
I would do this outside of Emacs, with a wrapper script that pulls the updated config first.
Something like this:
#! /bin/sh cd ~/.emacs.d && git pull --rebase exec /usr/bin/emacs "$@"
Then make this executable, name it emacs, and put it on your PATH before the real one.
Another option would be to have
init.el do pretty much the same thing:
(call-process-shell-command "cd ~/.emacs.d/ && git pull --rebase"), and then proceed to load the other files from under
~/.emacs.d/. The downside of this is that
init.el itself will not be reloaded. But if this is all that your
init.el does, and you delegate everything else to files loaded from it, that should be fine.
Since I presume you are going to be
sshing to these machines, I suggest you can take a look at sshrc which lets you take your local dotfiles along when you ssh into any server.