help-emacs-windows
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [h-e-w] Absolute/relative pathnames under nt


From: Underwood, Jonathan
Subject: RE: [h-e-w] Absolute/relative pathnames under nt
Date: Thu, 30 May 2002 12:49:21 -0400

> But in unix, '~' references the same location as $HOME, i.e. 
> a user's home 
> directory, not the root directory. Examples:
> 
> ~/xxx           - references the node xxx under your home directory
> ~smith/xxx      - references the node xxx under smith's home directory
> /home/smith/xxx - could reference the same node as above
> 
> As far as I am aware, the '~' is substituted for the absolute 
> path of the 
> user's directory (or selected directory), which is why it is 
> an absolute 
> file name and not a relative one. This is a bit more 
> complicated on Windows 
> because the filesystem is not seen to the user as a 
> homogeneous mass of 
> consistent names. E.g. on Unix, the files:

Agreed, but this is still no reason for ~ to be substituted for the absolute
path of the users directory under windows NT within ntemacs in exactly the
same manner as under unix. Then everything would be consistent. The naming
convention for directories relative to some root is indeed different under
unix and nt, but this seems irrelevant here. 

> 
> /home/john/tests/mirror/x.c and /etc/bin/rc.local
> 
> have consistent file naming information based on the root 
> directory '/', 
> but /home and /etc can be completely different drives. On Windows the 
> equivalent would be something like:
> 
> c:\john\tests\mirror\x.c and d:\bin\rc.local
> 
> i.e. there is no absolute root directory equivalent to '/' in Windows 
> (unless you count "My Computer" but that is more of a 
> conceptual root than 
> an actual directory).
> 
> You also have to consider the possibility of network names like:
> 
> \\MYSERVER\SHARE1
> 
> On Windows.
> 
> > It seems to me that for ntemacs, given that ntemacs needs a 
> home directory
> > to be specified via the HOME environment variable,
> 
> Well, not quite true because if the HOME variable doesn't 
> exist in Windows, 
> NT Emacs will use c:\ as the equivalent (I think).
> 
> > and that emacs
> > understands the ~ to represent this home directory, that 
> ntemacs should also
> > allow absolute filenames to begin with ~ a la unix.
> 
> > This would make things a lot easier for eg. using load-file 
> in your .emacs
> > for loading files consistently on different platforms etc.
> 
> It may be me who's getting confused here, (correct me if I'm 
> wrong) but '~' 
> is only absolute because (as I said it above) it is 
> effectively substited 
> for an absolute pathname before being used.
> 
> 
> Best Regards
> John McCabe
> 
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]