GNU bug report logs -
#78250
31.0.50; Eglot: eglot-show-call-hierarchy
Previous Next
Reported by: Gerd Möllmann <gerd.moellmann <at> gmail.com>
Date: Mon, 5 May 2025 03:37:02 UTC
Severity: normal
Found in version 31.0.50
Done: João Távora <joaotavora <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Thu, 08 May 2025 21:43:36 +0100
with message-id <87h61ubzpj.fsf <at> gmail.com>
and subject line Re: bug#78250: 31.0.50; Eglot: eglot-show-call-hierarchy
has caused the debbugs.gnu.org bug report #78250,
regarding 31.0.50; Eglot: eglot-show-call-hierarchy
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
78250: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=78250
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
In GNU Emacs 31.0.50 (build 1, aarch64-apple-darwin24.4.0) of 2025-05-04
This is in an Emacs repository, with clangd 20.1 installed via Homebrew
on macOS.
In insdel.c, navigate to function insert_and_inherit, then, on the
function name, C-u M-x eglot-show-call-hierarchy RET and choose
outgoing.
The resulting buffer looks like this:
[-] ∘ insert_and_inherit
|-[+] → chars_in_text
|-[+] → insert_1_both
|-[+] → signal_after_change
`-[+] → update_compositions
1. Wishlist: Expanding/collapsing nodes and jumping to call sites is not
easily reachable with the "usual" keys like TAG, RET, and so on that are
used by the profiler, Magit etc. It would be very nice if that could be
added.
2. Bug: Clicking on "chars_in_text" in the tree above takes me here:
character.c:
586 ptrdiff_t
587 str_as_multibyte (unsigned char *str, ptrdiff_t len, ptrdiff_t nbytes,
588 ptrdiff_t *nchars)
589 {
Clicking on "insert_1_both" OTOH takes me here which is correct
insdel.c:
581 void
582 insert_and_inherit (const char *string, ptrdiff_t nbytes)
583 {
584 if (nbytes > 0)
585 {
586 ptrdiff_t len = chars_in_text ((unsigned char *) string, nbytes), opoint;
587 insert_1_both (string, len, nbytes, 1, 1, 0);
Clicking on "signal_after_change" is also correct, and clicking on
update_compositions is incorrect again.
The outgoing call tree I get from eglot-supplements does all correctly.
[Message part 3 (message/rfc822, inline)]
Gerd Möllmann <gerd.moellmann <at> gmail.com> writes:
> What I meant is, for example, when I C-n down to an interesting line and
> press TAB or RET. I would have naively expected that to do something but
> it only complains "buffer is read-only".
Why not go to that line with TAB, instead of mixing C-n and TAB?
>> dependency on a new graph-representation library. Perhaps you could
>> lift the bespoke one that profiler.el uses into a new library? Call it
> Well, what can I say :-). I don't feel that's something for me, sorry.
What can _I_ say, except "it's your itch" :-)". Well if you don't want
to work on a better solution you can always bind keys to whatever you
like in eglot-hierarchy-mode-map.
>> Just a note that I've experimented with hierarchy.el (which uses
>> tree-widget.el) and found it brings no benefit at all over directly
>> calling tree-widget.el.
>
> Just looked at eglot-supplements - it's using its own tree
> implementation 'toggletree.el', AFAICT.
Haven't looked, but if it's good, ask the author to bring it into Emacs.
>> Anyway, please try the patch after my sig. It fixes the mis-navigations
>> you reported.
>
> Yes, that works. Thanks for the fix!
I'll push it as soon as savannah recovers (seems to be down now).
João
PS: if you use clangd on Emacs' repo, here's a patch to .clangd you
might like.
diff --git a/.clangd b/.clangd
index 469d33dfd03..5c7308d64ae 100644
--- a/.clangd
+++ b/.clangd
@@ -2,4 +2,5 @@
If:
PathMatch: "src/*.c"
CompileFlags:
- Add: [-Wno-unused-macros, -include=config.h]
+ Add: [-Wno-unused-macros, -include=config.h, -fstrict-flex-arrays=3]
+ Remove: [-fstrict-flex-arrays]
This bug report was last modified 10 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.