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: Mon, 21 Feb 2022 15:00:50 +0100 Message-ID: <87fsocl3ot.fsf@gnus.org> References: <83mwig85an.fsf@gnu.org> <83d2jc81f8.fsf@gnu.org> <8361p39ar2.fsf@gnu.org> <87r17xsm7c.fsf_-_@gnus.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="12183"; 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 , 16577@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 21 15:06:25 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 1nM9Ka-0002w9-Im for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 21 Feb 2022 15:06:24 +0100 Original-Received: from localhost ([::1]:39366 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nM9KZ-0007vp-H3 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 21 Feb 2022 09:06:23 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:48090) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM9GN-0004D1-4Y for bug-gnu-emacs@gnu.org; Mon, 21 Feb 2022 09:02:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41583) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nM9GM-0005Yt-N8 for bug-gnu-emacs@gnu.org; Mon, 21 Feb 2022 09:02:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nM9GM-0002yF-Lp for bug-gnu-emacs@gnu.org; Mon, 21 Feb 2022 09:02:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 Feb 2022 14:02:02 +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.164545206811292 (code B ref 16577); Mon, 21 Feb 2022 14:02:02 +0000 Original-Received: (at 16577) by debbugs.gnu.org; 21 Feb 2022 14:01:08 +0000 Original-Received: from localhost ([127.0.0.1]:35467 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nM9FQ-0002vy-UT for submit@debbugs.gnu.org; Mon, 21 Feb 2022 09:01:08 -0500 Original-Received: from quimby.gnus.org ([95.216.78.240]:38792) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nM9FO-0002vD-F5 for 16577@debbugs.gnu.org; Mon, 21 Feb 2022 09:01:03 -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=9s+sE18ITBvXRszKYuJ6K7rrLE8fzNi0J+hSLxgv3Go=; b=ncslDqaWcis2/MeAkc1unrfPa4 LUCTpELr5NyxO5fq74f3XakSnR+ZFppuxPs4qXeHT6/B8cBWLSA9qI3hpnxQ4PboyWmcM/5o4ovB3 yJoxw70+dF8mKMJYDyn2qwGozbjPZrpdRbVc6TvZ65nuM7J+KDhZsAoWEOF4LTKe/pNs=; 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 1nM9FE-0007wE-4k; Mon, 21 Feb 2022 15:00:55 +0100 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAIVBMVEXb4yrq9ijr9hzd pztVOoUoLZSnoZHZQFQgGWRBL0n////8n+odAAAAAWJLR0QKaND0VgAAAAd0SU1FB+YCFQ0uDvWp EYoAAAGeSURBVDjLpZI9TyMxEIZttsjRrU1Bix0piG5hCkPHSU6AmvWJ8g4h6kWONNAnwvQnsfm3 jL1Zkt0k4k68xa40j+bjHQ9jSVz0lFNQbFO+Ix4B/zaQKv26IFNSa602gBxf6iipMt4BI1fuRXAE 2MmQ5+7urdAZHONpBwyDC2EGWBnogv35XZhZazzFlyDZl3WYPb9eTS2YFuRV8vTyfnVtS2s9tOMe Gi5yMIgvYVxO7a1OgD6IkAH66c3i79g6V4pP4DGqDm+L+dw5d7YEhoogGFjUgUTgZwNy79EXQwDG IqGUXyqBQ4MZMPBC6v0GuL0EBmigEDQYbbauYyk34QQOvPfAxUGyUqcesQvjGZqiWi7lpKnk3C1l oKkE7wPKGKB/Wr10HZIR6s5wgGr1Ij+aFJqXIX5eFk21rEUO2aAS68CtfPj12zm6iPMm57xYu5Jo Mbjyvt3uSloOF/YsvUfvELXOtRabQKWDUxulpG60E6g+0F+BLeNuB3pH8zacyL+V+v/mO4Fcb857 oD2ADTB6JP1RHZB2Ppo8TB5+K/EBD2OkmFWr3ggAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjItMDIt MjFUMTM6NDY6MTQrMDA6MDCJywIlAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIyLTAyLTIxVDEzOjQ2 OjE0KzAwOjAw+Ja6mQAAAABJRU5ErkJggg== X-Now-Playing: Macintosh Plus's _Sick & Panic_: "(untitled)" In-Reply-To: (Stefan Monnier's message of "Sun, 20 Feb 2022 10:06:58 -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:227334 Archived-At: Stefan Monnier writes: > BTW, maybe we can merge the two propositions: > Allow the use in `completion-ignored-files` of entries of the form > "/" where 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