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: Eli Zaretskii
Subject: Re: [Emacs-diffs] master 4d3a595: `load-path' should contain only directory names
Date: Wed, 28 Oct 2015 18:53:34 +0200

> From: Stefan Monnier <address@hidden>
> Cc: address@hidden, address@hidden, address@hidden
> Date: Wed, 28 Oct 2015 12:30:27 -0400
> 
> >> > 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?

The distinction between these two is important in any place where we
want to refer specifically to one but not the other.

> > 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.

And the manual clearly notes, for this very reason, "This is not quite
the same as the usual Unix terminology."

> 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".

That's a mouthful that no one will use, and we will be back at the
same confusion.

What is wrong with "directory file name"?  It is shorter and matches
the name of the function used to return one.

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

That's a separate issue.  I was talking about the confusion in the
documentation, as you asked about that specifically.

> > 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.

I already said that I disagree.



reply via email to

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