unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "João Távora" <joaotavora@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 43103@debbugs.gnu.org, larsi@gnus.org, monnier@iro.umontreal.ca
Subject: bug#43103: 28.0.50; Default ElDoc composition strategy in Elisp mode (eldoc-documentation-strategy)
Date: Sat, 29 Aug 2020 21:13:31 +0100	[thread overview]
Message-ID: <87k0xhi51w.fsf@gmail.com> (raw)
In-Reply-To: <83tuwlxqow.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 29 Aug 2020 21:17:03 +0300")

Eli Zaretskii <eliz@gnu.org> writes:

>> From: João Távora <joaotavora@gmail.com>
>> Cc: 43103@debbugs.gnu.org,  larsi@gnus.org,  monnier@iro.umontreal.ca
>> Date: Sat, 29 Aug 2020 17:07:48 +0100
>> 
>> Eli Zaretskii <eliz@gnu.org> writes:
>> 
>> > How will the proposed change modify the behavior in the use case with
>> > which you started this message?
>> 
>> In the use case I started this message with, the user has enabled
>> Flymake.  Instead of seeing only the function signature in the echo area
>> -- and being denied the presumed Flymake diagnostic "beneath it" -- this
>> user would now see both items of information in two lines of said echo
>> area.
>
> So the user will see both the function's signature and the Flymake's
> error message because the call's syntax is not yet complete?  That
> sounds sub-optimal, doesn't it? why show an error message when the
> user is clearly still typing the code?

For me it's really not clear.  What if the user changed the function
signature elsewhere or the compilation the error check is based on might
is looking at a different version of the library that has another
protocol.  When point is on those invalid calls, it's quite useful to be
alerted to both the error and the signature.  Also note this happens in
any mode that uses Flymake and provide signatures, not just Elisp.

So, situations where the user is typing function calls from scratch do
happen, but they're not necessarily the majority -- it depends on the
editing work.  I will agree with you that displaying the transient error
on those situations is alarmist and not very useful, but it's better
fixed by adjusting 'flymake-no-changes-timeout' (or some other heuristic
that makes Flymake less eager) than asserting that the simultaneous
display of both pieces of information isn't useful _in general_.  It is.
In fact, I recall bug reports in Eglot that repeateadly state so.

>> A similar reasoning applies to other situations with two competing
>> different sources of context or "at point" documentation.  Currently,
>> even without Flymake there are function signatures and variable
>> docstrings, for example.
>
> I'm talking specifically about Flymake, because it reports errors,
> not just any information.

More precisely, it reports "diagnostics", which may be errors, warnings,
notes, or really any annotation about a region in your source.

Anyway, from your statement, it seems you'd be OK (or at least find less
problematic) that the two Flymake-unrelated lines:

    eldoc-idle-delay: Number of seconds of idle time to wait before printing.
    run-with-idle-timer: (SECS REPEAT FUNCTION &rest ARGS)  [SECS is boldface]

Being shown when point hovers on the second atom of the form

    (run-with-idle-timer eldoc-idle-delay nil ...)

?






  reply	other threads:[~2020-08-29 20:13 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-29 15:36 bug#43103: 28.0.50; Default ElDoc composition strategy in Elisp mode (eldoc-documentation-strategy) João Távora
2020-08-29 15:58 ` Eli Zaretskii
2020-08-29 16:07   ` João Távora
2020-08-29 18:17     ` Eli Zaretskii
2020-08-29 20:13       ` João Távora [this message]
2020-08-30 14:26         ` Eli Zaretskii
2020-08-30 15:15           ` João Távora
2020-08-31  1:07             ` Dmitry Gutov
2020-08-31  8:38               ` João Távora
2020-08-31 20:03                 ` Dmitry Gutov
2020-08-31 20:25                   ` João Távora
2020-08-31 20:48                     ` Dmitry Gutov
2020-08-31 21:12                       ` João Távora
2020-08-31 21:20                         ` Dmitry Gutov
2020-08-31 22:50                           ` João Távora
2020-09-01 10:52                             ` Dmitry Gutov
2020-09-01 11:11                               ` João Távora
2020-09-01 11:23                                 ` Dmitry Gutov
2020-08-31  0:47           ` Dmitry Gutov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k0xhi51w.fsf@gmail.com \
    --to=joaotavora@gmail.com \
    --cc=43103@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=larsi@gnus.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).