Heiko Muenkel wrote:
>>>>> "Darryl" == Darryl Okahata <darrylo(a)sr.hp.com>
writes:
[snip]
> According to Hrvoje Niksic <hniksic(a)srce.hr>, one
should
> use:
> (expand-file-name "man/man1" "/usr/local")
Puh. I`d never expected that this function does the job of converting
pathnames between systems. There should be at least a hint in it's
documentation.
Well, the docs for expand-file-name do say:
Convert filename NAME to absolute, and canonicalize it.
^^^^^^^^^^^^
Maybe that should be made more explicit.
The following example shows, which problems will propably hit the
XEmacs in the future, when MS-DOS pertubed people are going to write
elisp programs ...
(expand-file-name "man\man1" "\usr\local")
=> "/home/muenkel/data/docs/mail/Inbox/usrlocal/manman1"
There are actually two bogus assumptions in your example; the one that
you were pointing out (ie that authors know what the user's directory
separator is) but also the assumption that system paths like /usr/local
exist on Win32.
Jonathan.
--
Jonathan Harris | jhar(a)tardis.ed.ac.uk
London, England | Jonathan.Harris(a)symbian.com