From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Leake Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master 4d3a595: `load-path' should contain only directory names Date: Sat, 24 Oct 2015 16:37:43 -0500 Message-ID: <86bnboeymw.fsf@stephe-leake.org> References: <20151023135532.11512.53356@vcs.savannah.gnu.org> <83mvv8wejc.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1445722733 21485 80.91.229.3 (24 Oct 2015 21:38:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 24 Oct 2015 21:38:53 +0000 (UTC) Cc: Stefan Monnier , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 24 23:38:38 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Zq6WG-0007ur-Vg for ged-emacs-devel@m.gmane.org; Sat, 24 Oct 2015 23:38:33 +0200 Original-Received: from localhost ([::1]:45756 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zq6WG-0000Vb-6q for ged-emacs-devel@m.gmane.org; Sat, 24 Oct 2015 17:38:32 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49162) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zq6W3-0000VF-Jf for emacs-devel@gnu.org; Sat, 24 Oct 2015 17:38:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zq6W0-00055x-DH for emacs-devel@gnu.org; Sat, 24 Oct 2015 17:38:19 -0400 Original-Received: from gproxy7-pub.mail.unifiedlayer.com ([70.40.196.235]:38386) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1Zq6W0-00051e-5q for emacs-devel@gnu.org; Sat, 24 Oct 2015 17:38:16 -0400 Original-Received: (qmail 22656 invoked by uid 0); 24 Oct 2015 21:37:56 -0000 Original-Received: from unknown (HELO cmgw3) (10.0.90.84) by gproxy7.mail.unifiedlayer.com with SMTP; 24 Oct 2015 21:37:56 -0000 Original-Received: from host114.hostmonster.com ([74.220.207.114]) by cmgw3 with id ZFdn1r0052UdiVW01Fdq9D; Sat, 24 Oct 2015 21:37:54 -0600 X-Authority-Analysis: v=2.1 cv=Zs1+dbLG c=1 sm=1 tr=0 a=CQdxDb2CKd3SRg4I0/XZPQ==:117 a=CQdxDb2CKd3SRg4I0/XZPQ==:17 a=DsvgjBjRAAAA:8 a=f5113yIGAAAA:8 a=9i_RQKNPAAAA:8 a=IkcTkHD0fZMA:10 a=hEr_IkYJT6EA:10 a=x_XPkuGwIRMA:10 a=5lJygRwiOn0A:10 a=mDV3o1hIAAAA:8 a=8JFHxFVJ_YzyF0py_XIA:9 a=QEXdDO2ut3YA:10 Original-Received: from [76.218.37.33] (port=56712 helo=TAKVER2) by host114.hostmonster.com with esmtpa (Exim 4.84) (envelope-from ) id 1Zq6VY-0004Fm-Uu; Sat, 24 Oct 2015 15:37:49 -0600 In-Reply-To: <83mvv8wejc.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 24 Oct 2015 17:02:15 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (windows-nt) X-Identified-User: {2442:host114.hostmonster.com:stephele:stephe-leake.org} {sentby:smtp auth 76.218.37.33 authed with stephen_leake@stephe-leake.org} X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 70.40.196.235 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:192589 Archived-At: Eli Zaretskii writes: >> From: Stefan Monnier >> Date: Sat, 24 Oct 2015 09:49:29 -0400 >> Cc: Stephen Leake >>=20 >> > `load-path' should contain only directory names >>=20 >> 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 =E2=80=98defau= lt-directory=E2=80=99). Initialized during startup as described in Info node =E2=80=98(elisp)Lib= rary Search=E2=80=99. 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=E2=80=99s 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 =E2=80=98= default-directory=E2=80=99). Initialized during startup as described in Info node =E2=80=98(elisp)Lib= rary Search=E2=80=99. (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). --=20 -- Stephe