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 01:53:09 +0300 Organization: LINKOV.NET Message-ID: <87im0wadre.fsf@mail.linkov.net> References: <87lf5urv4c.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4652"; 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: 49731@debbugs.gnu.org To: Daniel =?UTF-8?Q?Mart=C3=ADn?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jul 27 01:01:21 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 1m89b7-00016y-7a for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 27 Jul 2021 01:01:21 +0200 Original-Received: from localhost ([::1]:46762 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m89b6-0004OF-64 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 26 Jul 2021 19:01:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48098) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m89ao-0004Ng-T2 for bug-gnu-emacs@gnu.org; Mon, 26 Jul 2021 19:01:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40161) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m89ao-0003rt-LF for bug-gnu-emacs@gnu.org; Mon, 26 Jul 2021 19:01:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m89ao-0002uI-B6 for bug-gnu-emacs@gnu.org; Mon, 26 Jul 2021 19:01: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: Mon, 26 Jul 2021 23:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49731 X-GNU-PR-Package: emacs Original-Received: via spool by 49731-submit@debbugs.gnu.org id=B49731.162734044411127 (code B ref 49731); Mon, 26 Jul 2021 23:01:02 +0000 Original-Received: (at 49731) by debbugs.gnu.org; 26 Jul 2021 23:00:44 +0000 Original-Received: from localhost ([127.0.0.1]:51706 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m89aV-0002tP-Lt for submit@debbugs.gnu.org; Mon, 26 Jul 2021 19:00:43 -0400 Original-Received: from relay1-d.mail.gandi.net ([217.70.183.193]:46509) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m89aQ-0002sr-FI for 49731@debbugs.gnu.org; Mon, 26 Jul 2021 19:00:39 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 2984C240003; Mon, 26 Jul 2021 23:00:30 +0000 (UTC) In-Reply-To: ("Daniel =?UTF-8?Q?Mart=C3=ADn?="'s message of "Mon, 26 Jul 2021 13:49:11 +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:210770 Archived-At: >> (add-hook 'xref-after-update-hook >> (lambda () >> (setq-local outline-regexp >> (if (eq xref-file-name-display 'abs) "/" "[^ 0-9]")) >> (outline-minor-mode +1) >> (save-excursion >> (goto-char (point-min)) >> (while (search-forward "ChangeLog" nil t) >> (outline-cycle))))) > > This is similar to what I have in mind. Instead of hardcoding > "ChangeLog", the proposed command would ask the user for the regular > expression. Your command hides entries that match the pattern, but I > think that for the new command the opposite interpretation is more > common (only show those entries that match the pattern, and hide > everything else). Does it make sense to offer both behaviors? (Like > flush-lines/keep-lines.) Indeed, both include/exclude make sense. In your example of using "tests/" to get results only from unit tests, actually in most projects I need exactly the inverse: to ignore all results from unit tests, because when I need to get results only from "tests/", then it's easy to run 'C-x p g' (project-find-regexp) with the prefix C-u and specify the directory to search such as "tests/". > Another xref-mode-map command bound to "q", for example, would disable > outline-minor-mode to present the xref buffer with full visibility. There is 'outline-cycle-buffer' bound to 'S-TAB' that can enable full visibility, or just 'outline-show-all'.