Subject: bug#78956: eglot/eldoc echo-area does not expand anymore

From: Peter Eisentraut <[email-masked]>
Date: Fri, 4 Jul 2025 18:31:04 +0200

Something has changed for the worse between emacs 29 and 30 when using 
eglot and eldoc about how quick help for symbols is shown in the echo area.

Consider this small test program test1.c:

```
static int x = 0;

static int foo()
{
     return x;
}
```

With emacs 29, if I start (in the terminal)

emacs -Q test1.c

then run

M-x eglot

then let it do its initialization, then put the cursor on the "x" in the 
function, the echo area shows

```
variable x

Type: int
Value = 0

static int x = 0
```

That's good.

With emacs 30, the same process just shows

```
variable x
```

without the rest.  This isn't useful.  C-h . still shows the rest of the 
info, so the info is there somewhere, but it's not being shown 
appropriately in the echo-area.

Changing eldoc-echo-area-use-multiline-p doesn't appear to make a 
difference.  In any case, the documentation indicates that it should 
behave by default like in emacs 29.

(This is using clangd for the language server.  I have tried it with 
different versions of clangd/llvm; that doesn't appear to make a 
difference.)

Here are some similar reports:

* 
https://www.reddit.com/r/emacs/comments/1ey307o/how_to_make_emacs_30_display_type_information_in/

* 
https://emacs.stackexchange.com/questions/83483/eglot-showing-types-of-variables-in-the-minibuffer

There are some workarounds mentioned there that involve deep eldoc 
surgery, but that doesn't seem like a real solution.

I have tried this on a number of different systems, but for 
completeness, here are some version numbers involved:

GNU Emacs 29.3
GNU Emacs 30.1

on Ubuntu 24.04 and 25.04 respectively.