emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] master 4d3a595: `load-path' should contain only direct


From: Stefan Monnier
Subject: Re: [Emacs-diffs] master 4d3a595: `load-path' should contain only directory names
Date: Wed, 28 Oct 2015 12:30:27 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

>> > The manual says "directory name" ends in a slash, and talks about
>> > "file name of a directory" which doesn't.
>> I don't think we generally use the term "directory name" in such
>> a strict sense.  At the very least, in all these years, I never noticed
>> that this term had such a precise meaning and it's never bitten me.
> It's a very old confusion, yes.  But that doesn't mean IMO that we
> shouldn't try to fix it, at least in those places where it's
> important.  Like this one.

In which way is it important for load-path?

> If you disagree that this situation is confusing, I guess we will have
> to agree to disagree, because it sounds confusing to me, and it surely
> confused Stephen, who is not exactly a newbie.

The problem here is in the manual: "directory name" is a general term
used in the POSIX world and beyond, and it usually doesn't care whether
there's a trailing slash.  There are a few particular situations where
the difference matters, indeed, but rather than co-opt the generally
known term and load it with a more precise semantics than is usual, I'd
prefer that we introduce new names for "directory name with a slash" and
"directory name without a slash".

And in all the cases where the difference shouldn't matter because
there's no ambiguity, then we shouldn't add extra restrictions.

> The changes to the doc string and to the manual were intended to
> rectify this confusion.  We now define another term, "directory file
> name",

That's fine to define "directory name without a slash".

> and use it in the doc string of load-path,

That's wrong, because an element of load-path may (or may not) have
a trailing slash and we should (and do) handle both cases correctly as
well, and all users of load-path (e.g. Stephen's code) should also
handle both cases.


        Stefan



reply via email to

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