Subject: Re: bug#78250: 31.0.50; Eglot: eglot-show-call-hierarchy
From: João Távora <[email-masked]>
To: Gerd Möllmann <[email-masked]>
Cc: Eli Zaretskii <[email-masked]>, [email-masked]
Date: Thu, 08 May 2025 21:43:36 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Gerd Möllmann <[email-masked]> 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]