Subject: RE: [External] : bug#16577: Add regexp-based version of completion-ignored-extensions

From: Drew Adams <[email-masked]>
Date: Sun, 20 Feb 2022 21:48:45 +0000

> > In the short term, maybe it would be better if .git etc were removed
> > from completion-ignored-extensions.
> 
> Anyway, this problem is still present in Emacs 29.  To reproduce:
...
> Notice that it only completes to b and c, and a.git and aCVS are
> excluded.  This is because:
> 
> completion-ignored-extensions
> =>
> (".o" "~" ".bin" ".lbin" ".so" ".a" ".ln" ".blg" ".bbl" ".elc" ".lof" ".glo"
> ".idx" ".lot" ".svn/" ".hg/" ".git/" ".bzr/" "CVS/" "_darcs/" "_MTN/" ".fmt"
> ".tfm" ".class" ".fas" ".lib" ".mem" ".x86f" ".sparcf" ".dfsl" ".pfsl"
> ".d64fsl" ".p64fsl" ".lx64fsl" ".lx32fsl" ".dx64fsl" ".dx32fsl" ".fx64fsl"
> ".fx32fsl" ".sx64fsl" ".sx32fsl" ".wx64fsl" ".wx32fsl" ".fasl" ".ufsl"
> ".fsl" ".dxl" ".lo" ".la" ".gmo" ".mo" ".toc" ".aux" ".cp" ".fn" ".ky" ".pg"
> ".tp" ".vr" ".cps" ".fns" ".kys" ".pgs" ".tps" ".vrs" ".pyc" ".pyo")
> 
> So we're using this mechanism to try to exclude directories named "CVS",
> which end up excluding directories called "aCVS".

(I'm not following this thread.)

It sounds like `completion-ignored-extensions'
is maybe being misused somewhere (?).

Maybe `vc-directory-exclusion-list' is relevant
for what you're wanting?

 Its value is 
 ("SCCS" "RCS" "CVS" "MCVS" ".src" ".svn" ".git"
  ".hg" ".bzr" "_MTN" "_darcs" "{arch}")

 Documentation:
 List of directory names to be ignored when walking directory trees.

 You can customize this variable.

> I think perhaps of introducing a regexp-based extra mechanism here that
> we should introduce a new completion-ignored-files variable, which would
> default to '(".svn/" ".hg/" ".git/" ".bzr/" "CVS/" "_darcs/" "_MTN/")
> (probably), and then remove those from -extensions.
> 
> However, this will require a lot of work --
> completion-ignored-extensions is used many places (and it's commonly
> used as a regexp),

It's used as a regexp?  So all of the entries
".<something>" match any non-newline char
before what <something> matches, instead of a
literal dot there?

Where do you see it used as a regexp?