Subject: Re: bug#43103: 28.0.50; Default ElDoc composition strategy in Elisp mode (eldoc-documentation-strategy)

From: Dmitry Gutov <[email-masked]>
Date: Mon, 31 Aug 2020 04:07:19 +0300

On 30.08.2020 18:15, João Távora wrote:

> Its default and original value is `truncate-sym-name-if-fit`, which (but
> for one detail) basically amounts to `t` or "yes, do use multiple
> lines".  So we could

It's true, but the curious reality is that AFAIK the built-in eldoc 
functions (foremost, the Elisp one) have always used the one-line 
display, even when they could show more.

These is definite wisdom in that.

> 1. greet these annoyed users with this fact and tell
> them to set eldoc-echo-area-use-multiline-p to nil or 1
> 
> 2. set it to such a value by default in emacs-lisp-mode

Change the default in eldoc.el. Why emacs-lisp-mode?

> 3. wait for the aforementioned overhaul to somehow give us better
> perspective before doing the work of this bug report (i.e. switch to
> eldoc-documentation-compose in emacs-lisp-mode).

Or that.

> At any rate, as I wrote earlier:
> 
> - the Flymake Eldoc source is last in the list, so it will be the one
> edited out if eldoc-echo-area-use-multiline-p is set to nil.  In
> practice this would amount to no immediately visible change in
> behaviour;

One would probably prefer to see the description of the compilation 
error rather than the function signature, if they had to choose.

> - even if eldoc-echo-area-use-multiline-p is set to nil, users can still
> get to all the info collecte by ElDoc with the new
> `eldoc-documentation-compose` strategy by pressing M-x eldoc-doc-buffer

Is that the only benefit?

This command is pretty odd in its design. But if its main purpose was to 
show multiple eldoc results together, it could always use the 'compose' 
strategy itself, regardless of the value of eldoc-documentation-strategy.