[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#36945: 27.0.50; read-library-name
From: |
Lars Ingebrigtsen |
Subject: |
bug#36945: 27.0.50; read-library-name |
Date: |
Tue, 15 Sep 2020 14:32:58 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> ~/.emacs is a common name for a file that can be loaded, so I will
> object to it being "obvious". Also, while `.git` should preferably not
> be listed, `.git/` arguably could since you might keep Elisp files in
> there.
>
> So I think we should list all directories, but I agree we should
> probably strip away all files whose name doesn't end in `.el`, `.elc`,
> `.el.gz` (and any other such extension in `load-suffixes`), and we
> should ideally only list the extension when it's the only
> remaining choice.
read-library-name has slightly unclear semantics -- I didn't know that
it was supposed to complete over directory names at all. Perhaps that
should be mentioned in the doc string?
> Oh, and another reason to keep files that don't just end in `.el` is
> when you want to load `foo.el.BAK` or `foo.el~`, so maybe we should only
> skip those files which don't have `.el` somewhere in their name :-(
Hm... perhaps the function is just misnamed. When I want to find a
library, I really do want to complete over the library's name, and
nothing else. What read-library-name does, however, is file name
completion over load-path, which is something a bit different.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no