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: Thu, 24 Nov 2022 09:48:52 +0200 Organization: LINKOV.NET Message-ID: <86bkowztrn.fsf@mail.linkov.net> References: <87lf5urv4c.fsf@mail.linkov.net> <86fspn1pjl.fsf@mail.linkov.net> <86ilj83fik.fsf@mail.linkov.net> <86ilj6rrnq.fsf@mail.linkov.net> <16f2a5d7-fb89-5e8c-71b7-c9f9ddc5d4e3@yandex.ru> <86leo1d0hj.fsf@mail.linkov.net> <89729272-82bd-f944-9815-3536a3f9830f@yandex.ru> <867czlcz2u.fsf@mail.linkov.net> <3805336b-bb24-6853-3b36-39481a49e64f@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="19765"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: 49731@debbugs.gnu.org, Daniel =?UTF-8?Q?Mart=C3=ADn?= To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 24 09:03:11 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 1oy7CR-0004xk-E8 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 24 Nov 2022 09:03:11 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oy7CK-0001vb-Sg; Thu, 24 Nov 2022 03:03:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oy7CI-0001uQ-Fs for bug-gnu-emacs@gnu.org; Thu, 24 Nov 2022 03:03:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oy7CI-0003va-1W for bug-gnu-emacs@gnu.org; Thu, 24 Nov 2022 03:03:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oy7CH-0004KD-TR for bug-gnu-emacs@gnu.org; Thu, 24 Nov 2022 03:03:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 24 Nov 2022 08:03:01 +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.166927693316555 (code B ref 49731); Thu, 24 Nov 2022 08:03:01 +0000 Original-Received: (at 49731) by debbugs.gnu.org; 24 Nov 2022 08:02:13 +0000 Original-Received: from localhost ([127.0.0.1]:57100 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oy7BU-0004Iw-Tp for submit@debbugs.gnu.org; Thu, 24 Nov 2022 03:02:13 -0500 Original-Received: from relay5-d.mail.gandi.net ([217.70.183.197]:54337) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oy7BT-0004Ih-16 for 49731@debbugs.gnu.org; Thu, 24 Nov 2022 03:02:11 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id F213F1C000D; Thu, 24 Nov 2022 08:02:00 +0000 (UTC) In-Reply-To: <3805336b-bb24-6853-3b36-39481a49e64f@yandex.ru> (Dmitry Gutov's message of "Wed, 23 Nov 2022 20:47: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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:248825 Archived-At: >> (add-hook 'xref-after-update-hook >> (lambda () >> (setq-local outline-default-state 1 >> outline-default-rules >> '((match-regexp . "ChangeLog\\|test/manual/etags"))) >> (outline-minor-mode +1))) >> where "ChangeLog" and "test/manual/etags" are not interesting groups. > > Makes sense. > > But IME the files you currently want to filter out depend on your current > activity: sometimes you want to show the tests, and sometimes > not. Sometimes you want to see the tests only. > > So it might be generally useful to have an interactive command to filter > out whatever one might prefer. If you agree, of course. This would be a nice addition to outline.el. For example, new commands outline-hide-by-regexp and outline-show-by-regexp that could use existing code extracted from outline--show-headings-up-to-level: (outline-map-region (lambda () (when (let ((beg (point)) (end (progn (outline-end-of-heading) (point)))) (string-match-p heading-regexp (buffer-substring beg end))) ;; hide entry when heading match regexp (outline-hide-entry))))