[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#49731: 28.0.50; Filter xref results by filename
From: |
Daniel Martín |
Subject: |
bug#49731: 28.0.50; Filter xref results by filename |
Date: |
Mon, 26 Jul 2021 13:49:11 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (darwin) |
Juri Linkov <juri@linkov.net> writes:
>
> I have exactly the same problem while using xref on the Emacs source tree:
> most of the time I'm not interested in the results found in ChangeLog files,
> so I want to ignore all ChangeLog files, and only ChangeLog files.
>
> This problem was solved by enabling outline-minor-mode on the xref output,
> then collapsing all ChangeLog entries automatically:
>
> #+begin_src emacs-lisp
> (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)))))
> #+end_src
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.)
Another xref-mode-map command bound to "q", for example, would disable
outline-minor-mode to present the xref buffer with full visibility.
- bug#49731: 28.0.50; Filter xref results by filename, Daniel Martín, 2021/07/25
- bug#49731: 28.0.50; Filter xref results by filename, Lars Ingebrigtsen, 2021/07/25
- bug#49731: 28.0.50; Filter xref results by filename, Eli Zaretskii, 2021/07/25
- bug#49731: 28.0.50; Filter xref results by filename, Juri Linkov, 2021/07/25
- bug#49731: 28.0.50; Filter xref results by filename,
Daniel Martín <=
- bug#49731: 28.0.50; Filter xref results by filename, Dmitry Gutov, 2021/07/26
- bug#49731: 28.0.50; Filter xref results by filename, Daniel Martín, 2021/07/27
- bug#49731: 28.0.50; Filter xref results by filename, Dmitry Gutov, 2021/07/27
- bug#49731: 28.0.50; Filter xref results by filename, Juri Linkov, 2021/07/28
- bug#49731: 28.0.50; Filter xref results by filename, Dmitry Gutov, 2021/07/28
- bug#49731: 28.0.50; Filter xref results by filename, Juri Linkov, 2021/07/29
- bug#49731: 28.0.50; Filter xref results by filename, Daniel Martín, 2021/07/31