2009-08-20

Switching from Gnu Emacs 22.x to 23.1 on Windows.

When moving from GNU Emacs 22.x to GNU Emacs 23.1 I get only two trubles.

Firstly I get error message:

error: The directory e:/home/.emacs.d/server is unsafe
when run (server-start). Problem placed in function server-ensure-safe-dir:
(unless (and (eq t (car attrs)) (eql (nth 2 attrs) (user-uid)) (or (eq system-type 'windows-nt) (zerop (logand ?\077 (file-modes dir))))) (error "The directory %s is unsafe" dir))))
Solusion found on stackoverflow.com. You must delete higlighted code and update correcponding bytecode (Emacs firstly search for .elc files and then for .el, so edit emacs-23.1/lisp/server.el and type C-x byte-compile-file <Down> <Ret>).

Seconf problem occur with deprication of codepage-setup function (no longer in distributive). Now you dont need call codepage-setup to work with IBM cpXXX codepages! For compatibility with old Emacs versions put (or replace old) in your .emacs such code:

(when (<= emacs-major-version 22) (codepage-setup 866) (codepage-setup 1251) )

Announce of GNU Emacs 23.1 release: groups.google.com

Update: 2010-03-17.

2009-09-19 fixed bug #4197 about server-ensure-safe-dir. From ChangeLog:

This fixes bug#4197 (merged to bug#865, though not identical). * server.el (server-auth-dir): Add docstring note about FAT32. (server-ensure-safe-dir): Accept FAT32 directories as "safe", but warn against using them.

Also I found another workaround:

(require 'server) (when (and (= emacs-major-version 23) (= emacs-minor-version 1) (equal window-system 'w32)) (defun server-ensure-safe-dir (dir) "Noop" t)) ; Suppress error directory ~/.emacs.d/server is unsafe on windows. (server-start)

Update: 2010-03-19.

Also see discussion on stackoverflow.com.