[please keep CC, since I'm not currently in the list]
I'm Running Win98 with IE 5.
For some reason the ~ is not interpreted as HOME
-- My Home disks are under drive d:
-- And Unix replicate is on drive e:
(setenv "HOME" "d:/home/jaalto/")
(expand-file-name "~")
"e:\\usr\\local\\bin\\emacs\\xemacs\\XEmacs-21.1.6\\i386-pc-win32\\home\\jaalto\\"
Since expand-file-name is used in numerous places I tried
to fix this with simple advice code. But using the adviced
function makes Xemacs to die with windows exception :-)
(defun my-expand-file-name (path)
"Expand ~ to mean HOME. XEmacs 21.1.6 win32 expands it somehow wrong."
(let ((home (getenv "HOME"))
)
(cond
((string-match "~/" path)
(concat (file-name-as-directory home)
(substring path 2)))
((string-match "~" path)
(file-name-as-directory home))
(t
path
))))
(when (string-match "21\.1.*win32" (emacs-version))
(defadvice expand-file-name (before my act)
"Replace Function with `my-expand-file-name'."
(ad-set-arg 0 (my-expand-file-name (ad-get-arg 0)))))
(expand-file-name "~") C-xC-e ---> and XEmacs is taken down by the
Win98....
jari
Show replies by date