[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#49731: 28.0.50; Filter xref results by filename
From: |
Juri Linkov |
Subject: |
bug#49731: 28.0.50; Filter xref results by filename |
Date: |
Wed, 05 Jun 2024 09:36:07 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) |
>> Also there is an additional helper function that is needed
>> to keep hidden outlines and restore them after reverting the
>> xref buffer with 'g' (xref-revert-buffer).
>> This is an example of advice that does this.
>> Later when xref will use revert-buffer-function,
>> this advice could be replaced by a simple hook call:
>>
>> #+begin_src emacs-lisp
>> (define-advice xref-revert-buffer (:around (ofun &rest args) keep-outlines)
>> "Keep hidden outlines after xref revert."
>> (let ((regexp (outline-hidden-headings-regexp))
>> (value (apply ofun args)))
>> (outline-hide-by-heading-regexp regexp)
>> value))
>> #+end_src
>
> So here is the patch for xref:
This is pushed now as well.