From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#16577: Add regexp-based version of completion-ignored-extensions Date: Mon, 21 Feb 2022 11:06:52 -0500 Message-ID: References: <83mwig85an.fsf@gnu.org> <83d2jc81f8.fsf@gnu.org> <8361p39ar2.fsf@gnu.org> <87r17xsm7c.fsf_-_@gnus.org> <87fsocl3ot.fsf@gnus.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16634"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: vmalloc@gmail.com, Glenn Morris , Eli Zaretskii , 16577@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 21 17:10:20 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nMBGV-00046J-Ej for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 21 Feb 2022 17:10:19 +0100 Original-Received: from localhost ([::1]:53984 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nMBGU-0000o3-B3 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 21 Feb 2022 11:10:18 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:58996) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nMBEI-0007gl-EE for bug-gnu-emacs@gnu.org; Mon, 21 Feb 2022 11:08:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44836) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nMBEI-00045B-4q for bug-gnu-emacs@gnu.org; Mon, 21 Feb 2022 11:08:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nMBEH-0003gO-Uv for bug-gnu-emacs@gnu.org; Mon, 21 Feb 2022 11:08:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 Feb 2022 16:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16577 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 16577-submit@debbugs.gnu.org id=B16577.164545962514090 (code B ref 16577); Mon, 21 Feb 2022 16:08:01 +0000 Original-Received: (at 16577) by debbugs.gnu.org; 21 Feb 2022 16:07:05 +0000 Original-Received: from localhost ([127.0.0.1]:38733 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nMBDN-0003fB-EM for submit@debbugs.gnu.org; Mon, 21 Feb 2022 11:07:05 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:51149) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nMBDM-0003ei-Gf for 16577@debbugs.gnu.org; Mon, 21 Feb 2022 11:07:04 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id C36E644103B; Mon, 21 Feb 2022 11:06:58 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 92099441036; Mon, 21 Feb 2022 11:06:57 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1645459617; bh=yVGiJJu3hjyl+XNtiegi4udlFiDsOVpDVwu7RSZzMfg=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=B1icU2lxDmiVzDTemipk1Eu72wv3XgCOg4idxZBJWYCriBoZzg0iAMfTYgaetV5LS G1LmAJOZfN4vIV/U9IFkpNOv3jv7JhsurrxpnGsA8hOX8uy4jR/YvP2BSXMAKFYZDn 2MkVqStitbSBl9qKUfeNWohM4KJ75Md7AWF8eyJje9qcL7VjkGzQ6x6G2BOiR9rIcx 3bZbHeCsVUfyITDUKBtJkmVNEPAR4xoEQO8JbQ7RqrUVU7S3GA2YuUPnk9U73NcN3m 0iwE+o/QAi1OrFusuxW/MrtP8j37Fxh38i8FHbU6cMR0cNTDfg5GLVRR/wZWZd4PWc +PhMPKkRHwhUg== Original-Received: from pastel (unknown [45.72.237.157]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 5F1B2120F05; Mon, 21 Feb 2022 11:06:57 -0500 (EST) In-Reply-To: <87fsocl3ot.fsf@gnus.org> (Lars Ingebrigtsen's message of "Mon, 21 Feb 2022 15:00:50 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:227358 Archived-At: > 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? I think the important case only has the nondirectory part of the file name at hand, which is why I propose for "/" to be defined as matching only on that part (with a terminating / if it's a directory). > But do you mean that completion-ignored-files should be on the form > (... "/CV[A-S]/" ...)? If we want to ignore .../CVA/, .../CVB/, etc yes. >> 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/?\\'" No, the "/" would look like it's matching the / of a full file name, but it would really be just a marker to indicate that the rest is a regexp (and where it's anchored) and the matching code would extract the regexp from it (and replace it with the equivalent of \\(?:\\`\\|/\\) as needed). Stefan