From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#49731: 28.0.50; Filter xref results by filename Date: Tue, 27 Jul 2021 23:51:35 +0300 Organization: LINKOV.NET Message-ID: <8735rzo5fk.fsf@mail.linkov.net> References: <030dbe6c-130d-e578-f50d-54e90bfa7cfa@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34997"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: dgutov@yandex.ru, mardani29@yahoo.es To: 49731@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jul 27 22:54:20 2021 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 1m8U5j-0008u0-Hx for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 27 Jul 2021 22:54:19 +0200 Original-Received: from localhost ([::1]:54078 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m8U5i-0006Qf-J5 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 27 Jul 2021 16:54:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51522) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m8U5S-0006Pm-Sm for bug-gnu-emacs@gnu.org; Tue, 27 Jul 2021 16:54:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42523) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m8U5S-0005nH-L5 for bug-gnu-emacs@gnu.org; Tue, 27 Jul 2021 16:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m8U5S-0003xT-Jo for bug-gnu-emacs@gnu.org; Tue, 27 Jul 2021 16:54:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 27 Jul 2021 20:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49731 X-GNU-PR-Package: emacs X-Debbugs-Original-To: Daniel =?UTF-8?Q?Mart=C3=ADn?= via "Bug reports for GNU Emacs, the Swiss army knife of text editors" X-Debbugs-Original-Cc: Daniel =?UTF-8?Q?Mart=C3=ADn?= , 49731@debbugs.gnu.org, Dmitry Gutov Original-Received: via spool by 49731-submit@debbugs.gnu.org id=B49731.162741922015173 (code B ref 49731); Tue, 27 Jul 2021 20:54:02 +0000 Original-Received: (at 49731) by debbugs.gnu.org; 27 Jul 2021 20:53:40 +0000 Original-Received: from localhost ([127.0.0.1]:54068 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m8U56-0003wf-He for submit@debbugs.gnu.org; Tue, 27 Jul 2021 16:53:40 -0400 Original-Received: from relay4-d.mail.gandi.net ([217.70.183.196]:51287) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m8U52-0003wB-Hd for 49731@debbugs.gnu.org; Tue, 27 Jul 2021 16:53:37 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 1D2F7E0004; Tue, 27 Jul 2021 20:53:28 +0000 (UTC) In-Reply-To: ("Daniel =?UTF-8?Q?Mart=C3=ADn?= via \"Bug reports for GNU Emacs, the Swiss army knife of text editors\""'s message of "Tue, 27 Jul 2021 19:08:00 +0200") 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:210807 Archived-At: >> 1. Add the possibility to add filtering by file names, types, etc, >> before the search is done. This should fit 'project-find-regexp' >> well. I can point you to a previous discussion with some ideas. The >> main upside is you can speed up the search. And store such settings as >> a history. > > I think that kind of search scoping in advance can be specially useful > when you are doing a grep-like search in the codebase, using either > grep, rgrep, project-find-regexp, or xref-find-apropos. Then in your comparison with grep, this is similar to grep options 'grep-find-ignored-directories' and 'grep-find-ignored-files'. >> I've never exactly considered the option 2., but I'd be happy to talk >> the details. WRT UI, maybe something along the lines of >> package-menu-filter-* commands, bound inside a '/' prefix. One command >> could add "inclusion filter", another - "exclusion filter", and the >> third one - reset all filters. '/ /' be bound to the last one. > > I didn't have in mind implementing cumulative filters. I don't know if > people would need such advanced filtering of results. Earlier you compared this to flush-lines/keep-lines, and these commands are cumulative. But maybe xref filtering doesn't need to be cumulative when it will support specifying a regexp with alternatives '\|'. > I've bound the new command to "f". For simplicity, each time you press > "f" you'll filter the entire list (filters are not cumulative). As you > said, pressing "p" and "n" navigate results that are folded, which is > confusing. Perhaps a new minor mode in xref could do the outline > folding and also make sure that "p" and "n" skip results that are > folded. Thanks, I'll test your command for a while.