GNU bug report logs - #36974
26.2.90; [PATCH] Add imenu support to xref

Previous Next

Package: emacs;

Reported by: Damien Cassou <damien <at> cassou.me>

Date: Thu, 8 Aug 2019 11:54:01 UTC

Severity: wishlist

Tags: fixed, patch

Found in version 26.2.90

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 36974 in the body.
You can then email your comments to 36974 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#36974; Package emacs. (Thu, 08 Aug 2019 11:54:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Damien Cassou <damien <at> cassou.me>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 08 Aug 2019 11:54:01 GMT) Full text and rfc822 format available.

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

From: Damien Cassou <damien <at> cassou.me>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.2.90; [PATCH] Add imenu support to xref
Date: Thu, 08 Aug 2019 13:53:03 +0200
[Message part 1 (text/plain, inline)]
* lisp/progmodes/xref.el (xref--imenu-prev-index-position)
(xref--imenu-extract-index-name): Add functions to get imenu support.
(xref--xref-buffer-mode): Set imenu variables to the new functions.
* etc/NEWS: Add corresponding entry.

-- 
Damien Cassou
Företagsplatsen AB
Phone/Fax: +46 (0)8 774 63 00
Mobile: +33 (0)6 80 50 18 91
Address: Skeppsbron 26, 4tr, SE-111 30 Stockholm
Web: www.foretagsplatsen.se
[0001-Add-imenu-support-to-xref.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36974; Package emacs. (Fri, 23 Aug 2019 04:33:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Damien Cassou <damien <at> cassou.me>
Cc: 36974 <at> debbugs.gnu.org
Subject: Re: bug#36974: 26.2.90; [PATCH] Add imenu support to xref
Date: Fri, 23 Aug 2019 06:32:22 +0200
Damien Cassou <damien <at> cassou.me> writes:

> * lisp/progmodes/xref.el (xref--imenu-prev-index-position)
> (xref--imenu-extract-index-name): Add functions to get imenu support.
> (xref--xref-buffer-mode): Set imenu variables to the new functions.
> * etc/NEWS: Add corresponding entry.

I'm not a big imenu user, so I'm probably not the best to judge the
applicability of this patch, but it looked logical to me, and I've
applied the patch (after folding a couple of too-long lines).

-- 
(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. (Fri, 23 Aug 2019 04:33:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 27.1, send any further explanations to 36974 <at> debbugs.gnu.org and Damien Cassou <damien <at> cassou.me> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 23 Aug 2019 04:33: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. (Fri, 20 Sep 2019 11:24:09 GMT) Full text and rfc822 format available.

bug unarchived. Request was from Dmitry Gutov <dgutov <at> yandex.ru> to control <at> debbugs.gnu.org. (Tue, 24 Dec 2019 20:33:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36974; Package emacs. (Tue, 24 Dec 2019 20:42:02 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Lars Ingebrigtsen <larsi <at> gnus.org>, Damien Cassou <damien <at> cassou.me>
Cc: 36974 <at> debbugs.gnu.org
Subject: Re: bug#36974: 26.2.90; [PATCH] Add imenu support to xref
Date: Tue, 24 Dec 2019 22:41:17 +0200
On 23.08.2019 7:32, Lars Ingebrigtsen wrote:
> Damien Cassou<damien <at> cassou.me>  writes:
> 
>> * lisp/progmodes/xref.el (xref--imenu-prev-index-position)
>> (xref--imenu-extract-index-name): Add functions to get imenu support.
>> (xref--xref-buffer-mode): Set imenu variables to the new functions.
>> * etc/NEWS: Add corresponding entry.
> I'm not a big imenu user, so I'm probably not the best to judge the
> applicability of this patch, but it looked logical to me, and I've
> applied the patch (after folding a couple of too-long lines).

This patch had a typo which made it not work at all (which is easy to 
see by calling 'M-x imenu' in any of the Xref buffers).

Considering it's been applied 4 months ago and nobody noticed the 
problem, maybe it's not that useful after all?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36974; Package emacs. (Wed, 25 Dec 2019 16:18:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: Damien Cassou <damien <at> cassou.me>, 36974 <at> debbugs.gnu.org
Subject: Re: bug#36974: 26.2.90; [PATCH] Add imenu support to xref
Date: Wed, 25 Dec 2019 17:17:29 +0100
Dmitry Gutov <dgutov <at> yandex.ru> writes:

> This patch had a typo which made it not work at all (which is easy to
> see by calling 'M-x imenu' in any of the Xref buffers).

I get

imenu-unavailable-error: imenu unavailable: "No items suitable for an
index found in this buffer"

when I say `M-x imenu' in an xref buffer, but I assumed that was
expected. 

> Considering it's been applied 4 months ago and nobody noticed the
> problem, maybe it's not that useful after all?

Possibly?

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36974; Package emacs. (Wed, 25 Dec 2019 16:31:01 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Damien Cassou <damien <at> cassou.me>, 36974 <at> debbugs.gnu.org
Subject: Re: bug#36974: 26.2.90; [PATCH] Add imenu support to xref
Date: Wed, 25 Dec 2019 18:29:59 +0200
On 25.12.2019 18:17, Lars Ingebrigtsen wrote:
> I get
> 
> imenu-unavailable-error: imenu unavailable: "No items suitable for an
> index found in this buffer"
> 
> when I say `M-x imenu' in an xref buffer, but I assumed that was
> expected.

Do you get it still?

It should error out because the implementation in this patch offers all 
file names as imenu entries. And there must be at least one.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36974; Package emacs. (Wed, 25 Dec 2019 16:44:02 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Damien Cassou <damien <at> cassou.me>, 36974 <at> debbugs.gnu.org
Subject: Re: bug#36974: 26.2.90; [PATCH] Add imenu support to xref
Date: Wed, 25 Dec 2019 18:43:08 +0200
Sorry,

On 25.12.2019 18:29, Dmitry Gutov wrote:
> On 25.12.2019 18:17, Lars Ingebrigtsen wrote:
>> I get
>>
>> imenu-unavailable-error: imenu unavailable: "No items suitable for an
>> index found in this buffer"
>>
>> when I say `M-x imenu' in an xref buffer, but I assumed that was
>> expected.
> 
> Do you get it still?
> 
> It should error out ... 

     ^ shouldn't




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36974; Package emacs. (Wed, 25 Dec 2019 17:11:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: Damien Cassou <damien <at> cassou.me>, 36974 <at> debbugs.gnu.org
Subject: Re: bug#36974: 26.2.90; [PATCH] Add imenu support to xref
Date: Wed, 25 Dec 2019 18:10:01 +0100
Dmitry Gutov <dgutov <at> yandex.ru> writes:

>>> when I say `M-x imenu' in an xref buffer, but I assumed that was
>>> expected.
>> Do you get it still?
>> It should error out ... 
>
>      ^ shouldn't

Ah; no, it seems to work now.

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36974; Package emacs. (Fri, 27 Dec 2019 10:12:01 GMT) Full text and rfc822 format available.

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

From: Damien Cassou <damien <at> cassou.me>
To: Dmitry Gutov <dgutov <at> yandex.ru>, Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 36974 <at> debbugs.gnu.org
Subject: Re: bug#36974: 26.2.90; [PATCH] Add imenu support to xref
Date: Fri, 27 Dec 2019 11:11:11 +0100
Dmitry Gutov <dgutov <at> yandex.ru> writes:
> This patch had a typo which made it not work at all (which is easy to 
> see by calling 'M-x imenu' in any of the Xref buffers).


can you please tell what typo you are referring to? Also, when you say
"had" a typo, do you mean someone fixed it somewhere? Can you please
give a little more details? I can't find any fix.


> Considering it's been applied 4 months ago and nobody noticed the 
> problem, maybe it's not that useful after all?


I haven't switched to Emacs 27 yet.

-- 
Damien Cassou

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36974; Package emacs. (Fri, 27 Dec 2019 13:51:01 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Damien Cassou <damien <at> cassou.me>, Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 36974 <at> debbugs.gnu.org
Subject: Re: bug#36974: 26.2.90; [PATCH] Add imenu support to xref
Date: Fri, 27 Dec 2019 16:50:31 +0300
On 27.12.2019 12:11, Damien Cassou wrote:
> can you please tell what typo you are referring to? Also, when you say
> "had" a typo, do you mean someone fixed it somewhere? Can you please
> give a little more details? I can't find any fix.

It's this one:

commit 9ea9ac9a61067995a3f7a38f62766f32a8c38bb2
Author: Dmitry Gutov <dgutov <at> yandex.ru>
Date:   Tue Dec 24 22:30:02 2019 +0200

    Apply the 'xref-group' property properly

    * lisp/progmodes/xref.el (xref--insert-xrefs):
    Apply the 'xref-group' property properly (bug#36974).

diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index 8d8e7ab208..13a1600594 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -814,7 +814,7 @@ xref--insert-xrefs
            for line-format = (and max-line-width
                                   (format "%%%dd: " max-line-width))
            do
-           (xref--insert-propertized '(face xref-file-header 'xref-group t)
+           (xref--insert-propertized '(face xref-file-header xref-group t)
                                      group "\n")
            (cl-loop for (xref . more2) on xrefs do
                     (with-slots (summary location) xref

>> Considering it's been applied 4 months ago and nobody noticed the
>> problem, maybe it's not that useful after all?
> 
> 
> I haven't switched to Emacs 27 yet.

I hope you were going to do that before the release.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36974; Package emacs. (Fri, 27 Dec 2019 14:25:02 GMT) Full text and rfc822 format available.

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

From: Damien Cassou <damien <at> cassou.me>
To: Dmitry Gutov <dgutov <at> yandex.ru>, Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 36974 <at> debbugs.gnu.org
Subject: Re: bug#36974: 26.2.90; [PATCH] Add imenu support to xref
Date: Fri, 27 Dec 2019 15:24:49 +0100
Dmitry Gutov <dgutov <at> yandex.ru> writes:
> On 27.12.2019 12:11, Damien Cassou wrote:
>> can you please tell what typo you are referring to? Also, when you say
>> "had" a typo, do you mean someone fixed it somewhere? Can you please
>> give a little more details? I can't find any fix.
>
> It's this one: […]



ok. I guess I only checked my patch in Emacs 26 and not in Emacs
27. Sorry about that.


>> I haven't switched to Emacs 27 yet.
>
> I hope you were going to do that before the release.

I have done that some hours ago.

-- 
Damien Cassou

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36974; Package emacs. (Fri, 27 Dec 2019 14:33:02 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Damien Cassou <damien <at> cassou.me>, Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 36974 <at> debbugs.gnu.org
Subject: Re: bug#36974: 26.2.90; [PATCH] Add imenu support to xref
Date: Fri, 27 Dec 2019 17:32:42 +0300
On 27.12.2019 16:24, Damien Cassou wrote:
> ok. I guess I only checked my patch in Emacs 26 and not in Emacs
> 27. Sorry about that.

Um. I don't think it should have worked in either version. Could be 
mistaken, though.

> I have done that some hours ago.

Cool.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 25 Jan 2020 12:24:04 GMT) Full text and rfc822 format available.

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

Previous Next


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