GNU bug report logs - #49731
28.0.50; Filter xref results by filename

Previous Next

Package: emacs;

Reported by: Daniel Martín <mardani29 <at> yahoo.es>

Date: Sun, 25 Jul 2021 08:21:02 UTC

Severity: normal

Found in version 28.0.50

Fixed in version 30.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Juri Linkov <juri <at> linkov.net>
To: Dmitry Gutov <dmitry <at> gutov.dev>
Cc: 49731 <at> debbugs.gnu.org
Subject: bug#49731: 28.0.50; Filter xref results by filename
Date: Wed, 05 Jun 2024 09:36:07 +0300
>> 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.




This bug report was last modified 1 year and 49 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.