From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#16577: Add regexp-based version of completion-ignored-extensions Date: Sun, 20 Feb 2022 14:26:47 +0100 Message-ID: <87r17xsm7c.fsf_-_@gnus.org> References: <83mwig85an.fsf@gnu.org> <83d2jc81f8.fsf@gnu.org> <8361p39ar2.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21327"; 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, 16577@debbugs.gnu.org, Stefan Monnier To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 20 14:34:57 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 1nLmMa-0005HR-I3 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 20 Feb 2022 14:34:56 +0100 Original-Received: from localhost ([::1]:55006 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nLmMY-0004P3-UD for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 20 Feb 2022 08:34:54 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:35360) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nLmFu-0000cQ-C2 for bug-gnu-emacs@gnu.org; Sun, 20 Feb 2022 08:28:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37470) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nLmFu-0002SB-1X for bug-gnu-emacs@gnu.org; Sun, 20 Feb 2022 08:28:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nLmFt-0003Ku-VT for bug-gnu-emacs@gnu.org; Sun, 20 Feb 2022 08:28:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 20 Feb 2022 13:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16577 X-GNU-PR-Package: emacs Original-Received: via spool by 16577-submit@debbugs.gnu.org id=B16577.164536362312741 (code B ref 16577); Sun, 20 Feb 2022 13:28:01 +0000 Original-Received: (at 16577) by debbugs.gnu.org; 20 Feb 2022 13:27:03 +0000 Original-Received: from localhost ([127.0.0.1]:59597 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nLmEx-0003JQ-5a for submit@debbugs.gnu.org; Sun, 20 Feb 2022 08:27:03 -0500 Original-Received: from quimby.gnus.org ([95.216.78.240]:54538) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nLmEv-0003Is-Dn for 16577@debbugs.gnu.org; Sun, 20 Feb 2022 08:27:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=SA4SWbUxWSc85aF53Kj8Mx1TK6ZxfCDExJaJmQkEVr4=; b=SpjXvLSfjUYDQAy2ex63L3KMIu X2BlUrmqwsW1kyYSxLAUtKbdw2aZnLhgZr5WSglqrkFS3XoE9z+aaQ7gbOjAF3We+GYRe00fWTIx7 eGxsgBDMefJY9iNWQq/ZmBWyUWIcyGMbPmC3vLVPxiFH6Fz87+tP3PINvZpsiREOoy6c=; Original-Received: from [84.212.220.105] (helo=giant) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nLmEk-000249-1E; Sun, 20 Feb 2022 14:26:53 +0100 X-Now-Playing: Meat Beat Manifesto's _Storm the Studio_: "Re-Animator (Part 2)" In-Reply-To: (Glenn Morris's message of "Tue, 28 Jan 2014 21:43:41 -0500") 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:227231 Archived-At: Glenn Morris writes: > In the short term, maybe it would be better if .git etc were removed > from completion-ignored-extensions. This was eight years ago, which is probably still short term in Emacs years. Anyway, this problem is still present in Emacs 29. To reproduce: mkdir /tmp/dir mkdir /tmp/dir/a.git mkdir /tmp/dir/aCVS mkdir /tmp/dir/b mkdir /tmp/dir/c emacs -Q /tmp/dir M-x ido-mode C-x C-f 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 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), so it may require rewriting a whole bunch of stuff. And it'll be slightly non-backwards-compatible if a user has removed "CVS/" from the old variable, and then it reappears in the new one. But it sounds worth doing, I think. Anybody have any opinions? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no