>>>> "Charles" == Charles G Waldman
<cgw(a)pgt.com> writes:
Charles>
DQoNCkphbiBWcm9vbmhvZiB3cml0ZXM6DQoNCiA+IEl0IGNvdWxkIGJlIGEgYnVnIGluIHRoZSBO
<64 lines deleted by Adrian>
Charles>
dG9yeTogSW52YWxpZCBhcmd1bWVudCwgYzpcaG9tZVxjZ3dcBQFwP4IvLmF1dG9zYXZlDQoNCg==
Is this what you call MIME? ;->
Anyways, I was able to decrypt it:
CW> Jan Vroonhof writes:
CW>
CW> > It could be a bug in the NT expand-file-name routines (what does
CW> > (expand-file-name "test" "~/test/") give under your
machines).
CW>
CW> (setenv "HOME" "/home/cgw")
CW>
CW> (insert (getenv "HOME")) /home/cgw
CW> (insert (expand-file-name "test" "~/test/"))
c:\home\cgw\test\test
CW>
CW> (setenv "HOME" "C:\\home\\cgw")
CW>
CW> (insert (getenv "HOME")) C:\home\cgw
CW> (insert (expand-file-name "test" "~/test/"))
c:\home\cgw\test\test
CW>
CW> (setenv "HOME" "\\\\reactor\\cgwhome")
CW>
CW> (insert (getenv "HOME")) \\reactor\cgwhome
CW> (insert (expand-file-name "test" "~/test/"))
c:\home\cgw\test\test
CW>
CW> (setenv "HOME" "//reactor/cgwhome")
CW>
CW> (insert (getenv "HOME")) //reactor/cgwhome
CW> (insert (expand-file-name "test" "~/test/"))
c:\home\cgw\test\test
Charles, you will have to change the environment variable HOME in the
Control Panel and then run a new XEmacs from Start->Run...
Then you will get different results for (expand-file-name ...) above.
I do, at least. Even the UNC path works for me.
Regards,
Adrian
CW>
CW> > I do not know the NT port but shouldn't HOME be a directory including
CW> > driveletter since otherwise it is not uniquely specified?
CW>
CW> I tried it with HOME=/home/cgw and HOME=C:\home\cgw, get the same
CW> behaviour (No such file or directory, c:\home\cgw\home\cgw\/.autosave)
CW> both ways.
CW>
CW> > The funny thing is that XEmacs tries to do its best to copy with funny
CW> > HOME values but on NT it seems to be switched of explicitly:
CW> >
CW> > if (IS_DIRECTORY_SEP (nm[1])
CW> > || nm[1] == 0) /* ~ by itself */
CW> > {
CW> > if (!(newdir = (Bufbyte *) get_home_directory()))
CW> > newdir = (Bufbyte *) "";
CW> > nm++;
CW> > #ifdef WINDOWSNT
CW> > collapse_newdir = 0;
CW> > #endif
CW> > }
CW> >
CW> > The collapse_newdir explicitly tells XEmacs to not consider the fact
CW> your
CW> > HOME prefix starts with a / and just prepend the current dir which
CW> > happened to be c:\home\cgw in your case. It seems bogus to me.
CW> >
CW> > Could you try removing that code and then test what happends to expand
CW> > file name in all case. i.e. with
CW> >
CW> > 1. HOME includes driveletter
CW> > 2. HOME does not include drive letter.
CW> > 3. HOME is a network path
CW>
CW> Sorry, I was not completely clear on what code you wanted me to
CW> remove. The 3 lines beginning with #ifdef WINDOWSNT, or the entire
CW> block you quoted above? I tried it both ways.
CW>
CW> With the "#ifdef WINDOWSNT" changed to "#ifdef
XXXWINDOWSNTXXX"
CW> I get no warnings from make-auto-save-file-name, but clearly wrong
CW> behaviour from expand-file-name:
CW>
CW> (setenv "HOME" "/home/cgw")
CW>
CW> (insert (getenv "HOME")) /home/cgw
CW> (insert (expand-file-name "test" "~/test/")) c:\test\test
CW>
CW> (setenv "HOME" "C:\\home\\cgw")
CW>
CW> (insert (getenv "HOME")) C:\home\cgw
CW> (insert (expand-file-name "test" "~/test/")) c:\test\test
CW>
CW> (setenv "HOME" "\\\\reactor\\cgwhome")
CW>
CW> (insert (getenv "HOME")) \\reactor\cgwhome
CW> (insert (expand-file-name "test" "~/test/")) c:\test\test
CW>
CW> (setenv "HOME" "//reactor/cgwhome")
CW>
CW> (insert (getenv "HOME")) //reactor/cgwhome
CW> (insert (expand-file-name "test" "~/test/")) c:\test\test
CW>
CW>
CW>
CW> With the entire block removed I get this result:
CW>
CW>
CW> (setenv "HOME" "/home/cgw")
CW>
CW> (insert (getenv "HOME")) /home/cgw
CW> (insert (expand-file-name "test" "~/test/"))
c:\home\cgw\test\test
CW>
CW> (setenv "HOME" "C:\\home\\cgw")
CW>
CW> (insert (getenv "HOME")) C:\home\cgw
CW> (insert (expand-file-name "test" "~/test/"))
c:\home\cgw\test\test
CW>
CW> (setenv "HOME" "\\\\reactor\\cgwhome")
CW>
CW> (insert (getenv "HOME")) \\reactor\cgwhome
CW> (insert (expand-file-name "test" "~/test/"))
c:\home\cgw\test\test
CW>
CW> (setenv "HOME" "//reactor/cgwhome")
CW>
CW> (insert (getenv "HOME")) //reactor/cgwhome
CW> (insert (expand-file-name "test" "~/test/"))
c:\home\cgw\test\test
CW>
CW>
CW> (1) (warning/warning) Error caught in `make-auto-save-file-name':
CW> Creating directory: Invalid argument, c:\home\cgw\??/.autosave
CW>
CW> (2) (warning/warning) Error caught in `make-auto-save-file-name':
CW> Creating directory: Invalid argument, c:\home\cgw\p?/.autosave
--
Adrian Aichner
European Design Center
Teradyne GmbH
Semiconductor Test Group Telephone +49/89/41861(0)-208
Dingolfinger Strasse 2 Fax +49/89/41861-217 (What is a Fax?)
D-81673 MUENCHEN E-mail adrian.aichner(a)teradyne.com