I like it when I use larsreed, but compile the code ready for use:
(require 'server)
(when (and (> = emacs-major-version 23)
(equal window-system 'w32))
(defun server-ensure-safe-dir (dir) "Noop" t)); Suppress error "directory
; ~ / .emacs.d / server is unsafe "
; on windows.
(server-start)
I will talk about this problem in my blog article http://brain-break.blogspot.com/2009/08/when-moving-from-gnu-emacs-22.html
Also note that bug # 4197 about server-security-dir was fixed in 2009-09-19, so this workaround is not required in incoming Emacs 23.2.
In the recently released Emacs 23.2, I have this warning:
Warning (server): using ~/.emacs.d/server to store Emacs server authentication files. Directories on FAT32 file systems are NOT protected against unauthorized access. See the variable server-auth-dir more details.
To fix this, how to say a warning, you can point server-auth-dir to the NTFS partition ( %APPDATA% usually found in Windows %SYSTEMDRIVE% , and the user usually formats the system drive as an NTFS partition):
(require 'server)
(when (and (eq window-system 'w32) (file-exists-p (getenv "APPDATA")))
(setq server-auth-dir (concat (getenv "APPDATA") "/.emacs.d/server"))
(make-directory server-auth-dir))
(server-start)
gavenkoa Oct 14 '09 at 14:25 2009-10-14 14:25
source share