I have different work-specific .emacs configuration files on servers where I do work for various companies. These are packages that, for various reasons, I don't want to store locally on my machine. Is there any way to start up emacs using one of those remote directories as if it were local?
Tramp is great for actually editing remote files as if they were local -- now I'd like to be able to start up a whole emacs editor in the same way.
start up emacs using one of those remote directories as if it were local
If the servers are unix/linux servers and you have ssh access, then you could try SSH Filesystem. Then you can mount the servers to local directories, e.g.:
> sshfs server1: ~/remote/server1
> sshfs server2: ~/remote/server2
Then you could start emacs with emacs --no-init-file --load ~/remote/servers2/.emacs
and so on.
packages that, for various reasons, I don't want to store locally
If packages are installed in .emacs.d on the remote machines you could create scripts like the following on your local machine:
;; .emacs.server1.el
(add-to-list 'load-path (expand-file-name "~/remote/server1/.emacs.d"))
(add-to-list 'load-path (expand-file-name "~/remote/server1/.emacs.d/package1"))
(load (expand-file-name "~/remote/server1/.emacs"))
And then start emacs like this: emacs --no-init-file --load ~/.emacs.server1.el
Obvious this script depends on the mounts above.