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 14:22:22 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

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

>> 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.  Note that the distinction is very
rarely needed, so those terms will rarely be used anyway.

>> 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?  How can that make sense?  Why put the burden on
the poor end user who barely understands what add-to-list does?
What's the benefit, when the code can trivially be fixed by using
`expand-file-name'?


        Stefan



reply via email to

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