[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] master 4d3a595: `load-path' should contain only direct
From: |
Stephen Leake |
Subject: |
Re: [Emacs-diffs] master 4d3a595: `load-path' should contain only directory names |
Date: |
Sat, 24 Oct 2015 16:37:43 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (windows-nt) |
Eli Zaretskii <address@hidden> writes:
>> From: Stefan Monnier <address@hidden>
>> Date: Sat, 24 Oct 2015 09:49:29 -0400
>> Cc: Stephen Leake <address@hidden>
>>
>> > `load-path' should contain only directory names
>>
>> You mean names with a trailing slash? Why?
>
> No, he means without the trailing slash.
Hmm. I now realize this is confused, and the doc string for `load-path'
does not match the implementation.
Here's the `load-path' doc string (from master):
List of directories to search for files to load.
Each element is a string (directory name) or nil (meaning
‘default-directory’).
Initialized during startup as described in Info node ‘(elisp)Library Search’.
That says "directory name".
(info "(elisp) Directory Names") says:
On GNU and Unix systems, this is simple: a directory name ends in a
slash, whereas the directory’s name as a file lacks that slash.
This info node does not give a canonical phrase for "the directory's name as
a file". This is the string returned by `directory-file-name'; I guess
"directory file name" works.
In emacs -Q, `load-path' has no terminating slashes.
I have the impression that some other documentation uses "directory"
instead of "directory name", but I can't find a good example at the moment.
So the doc string for `load-path' should be changed to:
List of directories to search for files to load.
Each element is a string (directory file name) or nil (meaning
‘default-directory’).
Initialized during startup as described in Info node ‘(elisp)Library Search’.
(just added 'file') possibly refilled.
And the info node should define "directory file name".
However, there is one more quirk; `default-directory' does end in a
slash, so having nil mean that in `load-path' is inconsistent. Should
that then be:
... or nil (meaning (directory-file-name default-directory)).
?
I don't think I've ever had nil in `load-path'; that seems like a bug,
comparable to having "." in PATH. And most of the path iterating code
I've written would fail on nil (sigh).
--
-- Stephe
Re: [Emacs-diffs] master 4d3a595: `load-path' should contain only directory names,
Stephen Leake <=
- Re: [Emacs-diffs] master 4d3a595: `load-path' should contain only directory names, Eli Zaretskii, 2015/10/25
- Re: [Emacs-diffs] master 4d3a595: `load-path' should contain only directory names, Stephen Leake, 2015/10/26
- Re: [Emacs-diffs] master 4d3a595: `load-path' should contain only directory names, Dmitry Gutov, 2015/10/26
- Re: [Emacs-diffs] master 4d3a595: `load-path' should contain only directory names, Eli Zaretskii, 2015/10/26
- Re: [Emacs-diffs] master 4d3a595: `load-path' should contain only directory names, Stefan Monnier, 2015/10/26
- Re: [Emacs-diffs] master 4d3a595: `load-path' should contain only directory names, Eli Zaretskii, 2015/10/26
- Re: [Emacs-diffs] master 4d3a595: `load-path' should contain only directory names, Dmitry Gutov, 2015/10/26
- Re: [Emacs-diffs] master 4d3a595: `load-path' should contain only directory names, Eli Zaretskii, 2015/10/26
- Re: [Emacs-diffs] master 4d3a595: `load-path' should contain only directory names, Dmitry Gutov, 2015/10/26
Re: [Emacs-diffs] master 4d3a595: `load-path' should contain only directory names, Stefan Monnier, 2015/10/27