GNU bug report logs - #16577
Add regexp-based version of completion-ignored-extensions

Previous Next

Package: emacs;

Reported by: Rotem Yaari <vmalloc <at> gmail.com>

Date: Tue, 28 Jan 2014 11:16:02 UTC

Severity: minor

Merged with 20937

Found in versions 24.3, 24.4

Full log


Message #56 received at 16577 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: vmalloc <at> gmail.com, Glenn Morris <rgm <at> gnu.org>, Eli Zaretskii <eliz <at> gnu.org>,
 16577 <at> debbugs.gnu.org
Subject: Re: bug#16577: Add regexp-based version of
 completion-ignored-extensions
Date: Mon, 21 Feb 2022 15:00:50 +0100
Stefan Monnier <monnier <at> 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




This bug report was last modified 3 years and 34 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.