GNU bug report logs -
#4823
w32 paths `substitute-in-file-name' fails when environmental variable is set for \\ style paths:
Previous Next
Reported by: MON KEY <monkey <at> sandpframing.com>
Date: Wed, 28 Oct 2009 20:25:05 UTC
Severity: normal
Done: Juanma Barranquero <lekktu <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
w32 paths `substitute-in-file-name' fails when environmental variable
is set for \\ style paths:
;; :SITUATION-1 w/out trailing `\\'
(setenv "HOME2" "C:\\home\\me")
(getenv "HOME2")
;=> "C:\\home\\me"
(substitute-in-file-name "$HOME2\\.emacs")
;=> "C:\\home\\me/emacs"
(substitute-in-file-name "$HOME2/.emacs")
;=>"C:\\home\\me/.emacs"
(substitute-in-file-name "$HOME2.emacs")
;=> "C:\\home\\me.emacs"
;; :SITUATION-2 with trailing `\\'
(setenv "HOME2" "C:\\home\\me\\")
(getenv "HOME2")
;=> "C:\\home\\me\\"
(substitute-in-file-name "$HOME2\\.emacs")
;=> "/.emacs"
(substitute-in-file-name "$HOME2\.emacs")
;=> "C:\\home\\me\\.emacs"
(substitute-in-file-name "$HOME2//.emacs")
;=> "/.emacs"
(substitute-in-file-name "$HOME2.emacs")
;=> "C:\\home\\me\\.emacs"
;; ON FOLLOWING SYSTEM:
GNU Emacs 23.1.50.1 (i386-mingw-nt5.1.2600)
of 2009-06-30 on LENNART-69DE564 (patched)
This bug report was last modified 13 years and 324 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.