GNU bug report logs - #23455
25.0.93; profiler-report doesn't configure xref for elisp

Previous Next

Package: emacs;

Reported by: Juliusz Chroboczek <jch <at> pps.univ-paris-diderot.fr>

Date: Thu, 5 May 2016 02:11:02 UTC

Severity: normal

Tags: fixed, patch

Found in version 25.0.93

Fixed in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 23455 in the body.
You can then email your comments to 23455 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#23455; Package emacs. (Thu, 05 May 2016 02:11:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Juliusz Chroboczek <jch <at> pps.univ-paris-diderot.fr>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 05 May 2016 02:11:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Juliusz Chroboczek <jch <at> pps.univ-paris-diderot.fr>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.0.93; profiler-report doesn't configure xref for elisp
Date: Thu, 05 May 2016 04:09:05 +0200
Pressing M-. in the buffer generated by profiler-report prompts me for
a TAGS file rather than behaving like it does in an elisp buffer.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23455; Package emacs. (Sun, 28 Jul 2019 14:40:01 GMT) Full text and rfc822 format available.

Message #8 received at 23455 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Juliusz Chroboczek <jch <at> pps.univ-paris-diderot.fr>
Cc: 23455 <at> debbugs.gnu.org
Subject: Re: bug#23455: 25.0.93; profiler-report doesn't configure xref for
 elisp
Date: Sun, 28 Jul 2019 16:38:55 +0200
Juliusz Chroboczek <jch <at> pps.univ-paris-diderot.fr> writes:

> Pressing M-. in the buffer generated by profiler-report prompts me for
> a TAGS file rather than behaving like it does in an elisp buffer.

(I'm going through old Emacs bug reports that haven't received any
response.)

The following patch seems to make `M-.' work as expected in the report
buffers, but I'm wholly unfamiliar with how xref works -- I just
cargo-culted the code in elisp-mode.el.

Perhaps somebody who knows how this works can say whether it looks OK:

diff --git a/lisp/profiler.el b/lisp/profiler.el
index ee11ff68c5..92495e2de8 100644
--- a/lisp/profiler.el
+++ b/lisp/profiler.el
@@ -615,9 +615,12 @@ profiler-report-setup-buffer
       (profiler-report-render-calltree))
     buffer))
 
+(defun profiler--xref-backend () 'elisp)
+
 (define-derived-mode profiler-report-mode special-mode "Profiler-Report"
   "Profiler Report Mode."
   (add-to-invisibility-spec '(profiler . t))
+  (add-hook 'xref-backend-functions #'profiler--xref-backend nil t)
   (setq buffer-read-only t
 	buffer-undo-list t
 	truncate-lines t))

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) patch. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 28 Jul 2019 14:40:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23455; Package emacs. (Mon, 29 Jul 2019 23:17:01 GMT) Full text and rfc822 format available.

Message #13 received at 23455 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Lars Ingebrigtsen <larsi <at> gnus.org>,
 Juliusz Chroboczek <jch <at> pps.univ-paris-diderot.fr>
Cc: 23455 <at> debbugs.gnu.org
Subject: Re: bug#23455: 25.0.93; profiler-report doesn't configure xref for
 elisp
Date: Tue, 30 Jul 2019 02:15:58 +0300
On 28.07.2019 17:38, Lars Ingebrigtsen wrote:

> The following patch seems to make `M-.' work as expected in the report
> buffers, but I'm wholly unfamiliar with how xref works -- I just
> cargo-culted the code in elisp-mode.el.
> 
> Perhaps somebody who knows how this works can say whether it looks OK:

It does, thanks. Please feel free to install.

> diff --git a/lisp/profiler.el b/lisp/profiler.el
> index ee11ff68c5..92495e2de8 100644
> --- a/lisp/profiler.el
> +++ b/lisp/profiler.el
> @@ -615,9 +615,12 @@ profiler-report-setup-buffer
>         (profiler-report-render-calltree))
>       buffer))
>   
> +(defun profiler--xref-backend () 'elisp)

You could also use elisp--xref-backend directly, but this way we'll have 
a direct place for future improvements.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23455; Package emacs. (Tue, 30 Jul 2019 10:06:02 GMT) Full text and rfc822 format available.

Message #16 received at 23455 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 23455 <at> debbugs.gnu.org, Juliusz Chroboczek <jch <at> pps.univ-paris-diderot.fr>
Subject: Re: bug#23455: 25.0.93; profiler-report doesn't configure xref for
 elisp
Date: Tue, 30 Jul 2019 12:05:06 +0200
Dmitry Gutov <dgutov <at> yandex.ru> writes:

>> Perhaps somebody who knows how this works can say whether it looks OK:
>
> It does, thanks. Please feel free to install.

Thanks; I've now pushed the change.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 30 Jul 2019 10:06:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 27.1, send any further explanations to 23455 <at> debbugs.gnu.org and Juliusz Chroboczek <jch <at> pps.univ-paris-diderot.fr> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 30 Jul 2019 10:06:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 27 Aug 2019 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 298 days ago.

Previous Next


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