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 20:48:31 +0200

> From: Stefan Monnier <address@hidden>
> Cc: address@hidden, address@hidden, address@hidden
> Date: Wed, 28 Oct 2015 14:22:22 -0400
> 
> > And the manual clearly notes, for this very reason, "This is not quite
> > the same as the usual Unix terminology."
> 
> Differing from existing terminology is not a quality (tho it's
> sometimes justified, of course).  Here I don't see what justifies it.

It is justified because we have special functions to convert one into
the other and vice versa.  There's no way of describing such
operations without calling the results by some names, which should of
course be different.

> >> 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.
> 
> I didn't suggest to use those terms; I suggested that we define new
> terms for those specific concepts.

Which is what we did.  One is "directory name", the other "directory
file name".

> >> 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.
> 
> So you think code which uses
> 
>    (dolist (d load-path)
>      (... (concat d toto) ...))
> 
> should be considered correct and the users who did
> 
>    (add-to-list 'load-path "/foo/bar/")
> 
> [ Or should it be "/foo/bar"?  ]
> 
> is the one to blame?

I'm not talking about this, and I'm not going to pick up that
argument, sorry.  I submit that the changes discussed in this longish
thread have nothing to do with correct or incorrect code.  if someone
wants to use 'concat' instead of 'expand-file-name', they still can.
(But they should use (concat d "/" toto), of course.)

> Why put the burden on the poor end user who barely understands what
> add-to-list does?

The burden is not on the user, it's on us, the Emacs developers.
Users are still free to do what they want with load-path.

> What's the benefit, when the code can trivially be fixed by using
> `expand-file-name'?

I already answered that, more than once: consistency, which makes it
easier to have a more accurate doc string.

We are now back to the beginning of this discussion, for the second
time.  Can we please stop this, and agree to disagree?  Please?



reply via email to

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