emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: unclear documentation for directory-sep-char


From: David Kastrup
Subject: Re: unclear documentation for directory-sep-char
Date: 11 Jan 2003 16:00:54 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

"Eli Zaretskii" <address@hidden> writes:

> > From: David Kastrup <address@hidden>
> > Date: 10 Jan 2003 22:47:54 +0100
> > 
> > If you use the Windows command shell for executing commands, it will
> > not accept forward slashes AFAIK for its commands like `cd'.  Most
> > programs will also not output forward slashes when printing paths.
> 
> If I understand correctly, you have two problems:
> 
>   - how to handle file names output by Windows programs
>   - how to send commands with file names to a Windows shell
> 
> I believe the first one can be dealt with by running the file names
> through expand-file-name, or, if that doesn't work, by simply
> replacing ?\\ with ?/ conditioned on system-type being windows-nt.
> 
> The second problem can be solved by running the file names through
> convert-standard-file-name.  On Posix systems it's a no-op, while on
> Windows it will convert forward slashes to backslashes if the shell
> in use requires that.
>
> If the above doesn't help,

The above helps.  Indeed it helps so much that it is a royal shame it
is not mentioned in the doc string to directory-sep-char as a reason
for its deprecation.  At the very least the doc should contain:

`directory-sep-char' has been deprecated because its support in many
primitives was unreliable at best, and we see no cases that would not
be better handled with `convert-standard-file-name' or
`expand-file-name'.

> > I have a reputation to lose.  I can't have clueless Windows users
> > report to all bulletin boards that my packages don't work.  Don't
> > make it harder than necessary.
> 
> I thought I was making it _easier_ by trying to help you solve the
> problems you have.

Oh, I was not talking about making it harder by replying to me, but
by making it harder by removing features like `directory-sep-char'
without providing a replacement (as I had been unable to see the
replacement).

I still feel that it could not possibly do any harm to keep this
variable as a _strictly_ read-only variable, but the doc string should
mention the alternatives.

Thanks for your explanation, and please add some of it to the doc
string of `directory-sep-char' so that others will be saved this
predicament.


-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

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