Subject: bug#36945: 27.0.50; read-library-name

From: Stefan Monnier <[email-masked]>
Date: Mon, 14 Sep 2020 16:46:05 -0400

> read-library-name offers <name> and <name>.elc for each library name.
> I expect that .elc names should not be offered.

I think it should indeed not be displayed when `<name>` is already
listed alongside others, but when the users type `<name> TAB` it would
make sense to list the `.elc` file since it's quite possible that they
want to choose between the `.el` and the `.elc` version of the file.

> .dir-locals
> .elpaignore
> .elpaignore
> .git
> .git
>
> in the list of propositions. These are obviously not library names.

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

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 :-(

        Stefan