unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#4823: w32 paths `substitute-in-file-name' fails when environmental variable is set for \\ style paths:
@ 2009-10-28 20:19 MON KEY
  2009-10-28 21:38 ` Juanma Barranquero
  0 siblings, 1 reply; 5+ messages in thread
From: MON KEY @ 2009-10-28 20:19 UTC (permalink / raw)
  To: bug-gnu-emacs

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)






^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-07-02  1:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-28 20:19 bug#4823: w32 paths `substitute-in-file-name' fails when environmental variable is set for \\ style paths: MON KEY
2009-10-28 21:38 ` Juanma Barranquero
2009-10-29  0:43   ` Stefan Monnier
2011-07-02  1:39     ` Juanma Barranquero
2011-07-02  1:47       ` Juanma Barranquero

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).