title: Portable Emacs? (Emacs server not working)
body: <p>I have seen a few suggestions on making emacs portable (on Windows). I have this in my site-start.el:</p>
  
  <pre><code>(defvar program-dir (substring data-directory 0 -4))
  
  (setq inhibit-startup-message t)
  (setenv "HOME" program-dir)
  </code></pre>
  
  <p>I changed the HOME variable so that not only my .emacs init files (and other init files) are read, but everything generated by emacs will stay in the program directory, not needing me to specify the path for everything one by one. </p>
  
  <p>Well this works well but the emacs server is not working; I get error message "no connection could be made because target machine actively refused it." If I don't change my HOME var then emacs server works. Is there way to fix this?</p>