bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#16577: Add regexp-based version of completion-ignored-extensions


From: Lars Ingebrigtsen
Subject: bug#16577: Add regexp-based version of completion-ignored-extensions
Date: Mon, 21 Feb 2022 15:00:50 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> BTW, maybe we can merge the two propositions:
> Allow the use in `completion-ignored-files` of entries of the form
> "/<RE>" where <RE> will be matched against the nondirectory part of the
> file name.

I haven't looked at the various code snippets that use the resulting
regexps, but I imagine that some are matching on the full file name and
some aren't?

But do you mean that completion-ignored-files should be on the form
(... "/CV[A-S]/" ...)?

> We'd probably want to make this match anchored, since that's
> what the "/" suggests.  It means that instead of "/.git/" we'd add
> "/\\.git/" or "/\\.git/?\\'".

If we want this to work against both full file names and nondirectory
parts, it'd be...  er...

"\\(?:\\`\\|/\\)\\.git/?\\'"

I guess. 

Which nobody is going to get right, so I wonder whether it should just
be a list of strings instead of a list of regexps.

> This should make the change much less invasive, with most existing uses
> of `completion-ignored-files` unaffected.

I guess I should start poking at this and see how it works out in
practice.  Skimming the places where it's used, I think it's about a
dozen locations that needs adjusting.  But I may be overestimating.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

[Prev in Thread] Current Thread [Next in Thread]