From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?H=C3=A5kon_?= =?UTF-8?Q?H=C3=A6gland?= Newsgroups: gmane.emacs.bugs Subject: bug#32266: Cannot add directory names ending in .el with normal-top-level-add-subdirs-to-load-path Date: Wed, 25 Jul 2018 09:12:08 +0200 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000006eb3890571cd99e3" X-Trace: blaine.gmane.org 1532502668 3734 195.159.176.226 (25 Jul 2018 07:11:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 25 Jul 2018 07:11:08 +0000 (UTC) To: 32266@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 25 09:11:04 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fiDwt-0000sT-6D for geb-bug-gnu-emacs@m.gmane.org; Wed, 25 Jul 2018 09:11:03 +0200 Original-Received: from localhost ([::1]:45486 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fiDyz-0003Ux-Qt for geb-bug-gnu-emacs@m.gmane.org; Wed, 25 Jul 2018 03:13:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57675) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fiDyr-0003Ub-SF for bug-gnu-emacs@gnu.org; Wed, 25 Jul 2018 03:13:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fiDyo-0007Qj-RR for bug-gnu-emacs@gnu.org; Wed, 25 Jul 2018 03:13:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:51023) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fiDyo-0007QW-Mp for bug-gnu-emacs@gnu.org; Wed, 25 Jul 2018 03:13:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fiDyo-0001wJ-Bx for bug-gnu-emacs@gnu.org; Wed, 25 Jul 2018 03:13:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?H=C3=A5kon_?= =?UTF-8?Q?H=C3=A6gland?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Jul 2018 07:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 32266 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15325027597419 (code B ref -1); Wed, 25 Jul 2018 07:13:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 25 Jul 2018 07:12:39 +0000 Original-Received: from localhost ([127.0.0.1]:56040 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fiDyQ-0001va-ON for submit@debbugs.gnu.org; Wed, 25 Jul 2018 03:12:39 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:38333) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fiDyO-0001vN-B7 for submit@debbugs.gnu.org; Wed, 25 Jul 2018 03:12:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fiDyG-0006me-1s for submit@debbugs.gnu.org; Wed, 25 Jul 2018 03:12:31 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:53705) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fiDyF-0006mU-Tv for submit@debbugs.gnu.org; Wed, 25 Jul 2018 03:12:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57524) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fiDyC-0003Qp-NN for bug-gnu-emacs@gnu.org; Wed, 25 Jul 2018 03:12:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fiDy9-0006dH-N1 for bug-gnu-emacs@gnu.org; Wed, 25 Jul 2018 03:12:24 -0400 Original-Received: from mail-wm0-x22e.google.com ([2a00:1450:400c:c09::22e]:36055) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fiDy9-0006cI-Ap for bug-gnu-emacs@gnu.org; Wed, 25 Jul 2018 03:12:21 -0400 Original-Received: by mail-wm0-x22e.google.com with SMTP id s14-v6so4875486wmc.1 for ; Wed, 25 Jul 2018 00:12:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=E6VhKQ2MblkdeYjL65Z370XexxKUpSeJpIFbMkJRuiM=; b=eGhuQev1uT5En1dDbOC4sNpMhjnA7NvZuh0FFWq4Fpmh8P68/d7A6ZqC+fuF03tpvE WQhwG4Wg+miJ3NqInuzPj6cgzTmSxcW6clA2kCPTcOuyWs51kSv7WVwo3NWqMghiRwe4 Crdce/JtlhLl0QtKn3t2+EV4Oi+rcj0wnSuOAeGV0+WRZLMbvaPHiKWbSVHOGyjxTNaa H2cWPDSl3CiXaiUEYs5/Rfow18SimvfLsFnKE81kaQDRcbigkyLr5tbby3dxRkD1LqZa FTwlVuZT/dDRnbsWKDFQjLslYtcjT81mC9ZCrnGXoql/L5HX5OvsBv3TkZZVmm5u+C+y ieaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=E6VhKQ2MblkdeYjL65Z370XexxKUpSeJpIFbMkJRuiM=; b=DjKRR74Uh9SVzB24o4UxFRfRVjkHhgmAtIXVJVScoT4Sx36rOa/xCPz0u+QBzSiDkI VIUSXYNecUQJbmW61pmXPSRXofo6Ju0CXKnBodMfi1WqZ83EVmrNtWUjJLtz8ZGJsMHL /LKCg8t0qU1km52PCfuDwaSttkKFS3AzF9GRr6hVloNOyV5a1SyN70aDHX1R9o3q/Oyk O9RKXKO95dmHJR4UGOR22cvgRS/SiBdJT60NBksTIbZzysbHUyBw/dz8xotwbOhc2mqd eVnH4PxcUHsLC8QaBpPSU2bYgsXttUBsF05qqacSUOb9e/x8IYlZ8S8hYuZgUrHPl98j 9vJQ== X-Gm-Message-State: AOUpUlFAgyUrMTaMMhpi4y6WlFjHquLMqlqKjuMzx21pwi0pWqhpT+d9 l/ON6xb7Ci117omCxxMA22Se4FEGTUEtIvRJaD0DeoKB X-Google-Smtp-Source: AAOMgpdTobLcbt25lUr6YTuORa0ZvCFb+PATzu3+7skZeya9r4UByeEYczay/EAfE02QXwth8hRhr44iHZuex8lJ8fE= X-Received: by 2002:a1c:14c3:: with SMTP id 186-v6mr3583621wmu.21.1532502739955; Wed, 25 Jul 2018 00:12:19 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: -3.9 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -4.9 (----) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:148915 Archived-At: --0000000000006eb3890571cd99e3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I am trying to use the package "f" which has prerequisites the packages "s" and "dash". I wanted to load "f.el" with "use-package", so I downloade= d the four packages with git into a custom folder: ~/.emacs.d/installed-from-github/ I recognized that after cloning with git the folder names of the first three packages became dash.el, s.el, and f.el. Note that each folder name contains a dot. But according to the documentation of normal-top-level-add-subdirs-to-load-path it should work for these type of directory names. Also refer to the source of normal-top-level-add-subdirs-to-load-path at http://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/startup.el#n445 However, when I try to run emacs with the following init file: (setq debug-on-error t) (let ((default-directory "~/.emacs.d/installed-from-github/")) (normal-top-level-add-subdirs-to-load-path)) (message "%S" load-path) (require 'use-package) (use-package dash :demand) (use-package s :demand) (use-package f :demand) I get the following error: Error (use-package): Cannot load dash and when I inspect the *Messages* buffer I can see that load-path does not contain any of "/home/hakon/.emacs.d/installed-from-github/dash.el", "/home/hakon/.emacs.d/installed-from-github/s.el", or "/home/hakon/.emacs.d/installed-from-github/f.el". Also, when I look at line #474 of the source http://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/startup.el#n474 I see the following predicate for including a directory: (not (string-match "\\.elc?\\'" file)) I wonder if this can be a bug? At least I think it should be documented in the doc string of the function that it will not include directories ending with .el or .elc and the reason why. ------------------------- In GNU Emacs 25.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.30) of 2018-04-28 built on hakon-Vostro-5568 Windowing system distributor 'The X.Org Foundation', version 11.0.11906000 System Description: Ubuntu 18.04 LTS Configured using: 'configure CFLAGS=3D-no-pie --with-xft --prefix=3D/opt/emacs-25.3' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 Important settings: value of $LC_MONETARY: nb_NO.UTF-8 value of $LC_NUMERIC: nb_NO.UTF-8 value of $LC_TIME: nb_NO.UTF-8 value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=3Dibus locale-coding-system: utf-8-unix ---------------------- Best regards H=C3=A5kon H=C3=A6gland --0000000000006eb3890571cd99e3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I am trying to use the package "f" which ha= s prerequisites the packages
"s" and=C2=A0 "dash&q= uot;. I wanted to load "f.el" with "use-package", so I = downloaded
the four packages with git into a custom folder:
=

~/.emacs.d/installed-from-github/

<= div>I recognized that after cloning with git the folder names of the first<= /div>
three packages became dash.el, s.el, and f.el. Note that each fol= der
name contains a dot. But according to the documentation of
normal-top-level-add-subdirs-to-load-path it should work for
<= div>these type of directory names. Also refer to the source of
no= rmal-top-level-add-subdirs-to-load-path at

h= ttp://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/startup.el#n445

However, when I try to run emacs with the
f= ollowing init file:=C2=A0

(setq debug-on-error t)<= /div>
(let ((default-directory=C2=A0 "~/.emacs.d/installed-from-gi= thub/"))
=C2=A0 (normal-top-level-add-subdirs-to-load-path))=
(message "%S" load-path)
(require 'use-p= ackage)
(use-package dash
=C2=A0 :demand)
(us= e-package s
=C2=A0 :demand)
(use-package f
= =C2=A0 :demand)

I get the following error:

Error (use-package): Cannot load dash

and when I inspect the *Messages* buffer I can see that load-path doe= s
not contain any of "/home/hakon/.emacs.d/installed-from-gi= thub/dash.el",
"/home/hakon/.emacs.d/installed-from-git= hub/s.el", or
"/home/hakon/.emacs.d/installed-from-gith= ub/f.el".=C2=A0

Also, when I look at line #47= 4 of the source


I see= the following predicate for including a directory:

(not (string-match "\\.elc?\\'" file))

=
I wonder if this can be a bug? At least I think it should be documente= d in the
doc string of the function that it will not include dire= ctories ending
with .el or .elc and the reason why.
-------------------------

In GNU = Emacs 25.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
=C2=A0of= 2018-04-28 built on hakon-Vostro-5568
Windowing system distribut= or 'The X.Org Foundation', version 11.0.11906000
System D= escription: Ubuntu 18.04 LTS

Configured using:
=C2=A0'configure CFLAGS= =3D-no-pie --with-xft --prefix=3D/opt/emacs-25.3'

<= div>Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK S= OUND GPM DBUS GSETTINGS NOTIFY
ACL LIBSELINUX GNUTLS LIBXML2 FREE= TYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11
<= div>
Important settings:
=C2=A0 value of $LC_MONETA= RY: nb_NO.UTF-8
=C2=A0 value of $LC_NUMERIC: nb_NO.UTF-8
=C2=A0 value of $LC_TIME: nb_NO.UTF-8
=C2=A0 value of $LANG: en= _US.UTF-8
=C2=A0 value of $XMODIFIERS: @im=3Dibus
=C2= =A0 locale-coding-system: utf-8-unix

-------= ---------------

Best regards
H=C3=A5kon = H=C3=A6gland
--0000000000006eb3890571cd99e3--