all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "João Távora" <joaotavora@gmail.com>
To: Frank Haun <fh@fhaun.de>
Cc: jorgen.schaefer@gmail.com, Eli Zaretskii <eliz@gnu.org>,
	Tassilo Horn <tsdh@gnu.org>, emacs-devel <emacs-devel@gnu.org>
Subject: Re: eldoc-docstring-format-sym-doc
Date: Mon, 27 Jul 2020 15:52:51 +0100	[thread overview]
Message-ID: <87o8o1rovw.fsf@gmail.com> (raw)
In-Reply-To: <86imeaczn0.fsf@m12000.fhaun.de> (Frank Haun's message of "Sun, 26 Jul 2020 12:57:23 +0200")

Frank Haun <fh@fhaun.de> writes:

> On Sun, 26 Jul 2020 11:16:31 +0100, João Távora wrote:
>
>> Here's a patch that should fix this, by bringing back the function to
>> eldoc and marking it obsolete.  I'd of course much prefer if Elpy starts
>> using the new features of eldoc-documentation-functions instead, if
>> indeed it must be made to work with Emacs 28.  The bits of that
>> variable's docstring concerning the `:THING` and `:FACE` keyword
>> arguments should, in principle, be enough to do the same as the defunct
>> eldoc-docstring-format-sym-doc.  If they're not, then it's something to
>> be iterated in eldoc.el.
>
> Someone made an elpy issue of the missing eldoc-docstring-format-sym-doc
> function:
>
>   https://github.com/jorgenschaefer/elpy/issues/1823

Thanks.  I've commented on the issue and drafted a patch for Elpy the
should make it work with the older and newer Eldoc versions.  I'm kind
of against applying the patch I provided earlier: it is true that I
advertised the enhancements to ElDoc as backward-compatible and it's
clearly they are not 100% so, even if eldoc-docstring-format-sym-doc
is an implementation detail.

But I'd like to see more evidence that this is breaking many more places
than Elpy, where the fix is easy.  After a quick GitHub code search,
that doesn't seem to be the case.

Also, after examining Elpy's uses of ElDoc, I noticed at least two
places where Elpy could take advantage of the new ElDoc:

- Elpy's elpy-eldoc-documentation is serving Flymake diagnostic info as
  ElDoc documentation.  If a diagnostic is at point, ElPy serves it and
  stops there.  There is no need to do that in the latest versions of
  Flymake and ElDoc, where this is the default behaviour;

- Beyond this, Elpy's elpy-eldoc-documentation is also serving multiple
  other kinds of Python documentation about the "thing at point".  If it
  were to be split in various functions, it would not be forced to
  choose among them using fixed rules.  It could provide "calltips",
  "oneline docs", simple strings, and "current function" info
  independently, then have the user (or ElPy) arrange some priority in
  the eldoc-documentation-functions hook, where asynchronous and
  synchronous sources can now be intermingled seamlessly.  The new
  variable eldoc-documentation-strategy decides how to compose those
  multiple sources of documentation.

João



      reply	other threads:[~2020-07-27 14:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-24 15:21 eldoc-docstring-format-sym-doc Frank Haun
2020-07-24 19:49 ` eldoc-docstring-format-sym-doc Tassilo Horn
2020-07-24 20:29   ` eldoc-docstring-format-sym-doc Frank Haun
2020-07-25  6:16   ` eldoc-docstring-format-sym-doc Eli Zaretskii
2020-07-25  9:26     ` eldoc-docstring-format-sym-doc João Távora
2020-07-26 10:16       ` eldoc-docstring-format-sym-doc João Távora
2020-07-26 10:57         ` eldoc-docstring-format-sym-doc Frank Haun
2020-07-27 14:52           ` João Távora [this message]

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

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

  git send-email \
    --in-reply-to=87o8o1rovw.fsf@gmail.com \
    --to=joaotavora@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=fh@fhaun.de \
    --cc=jorgen.schaefer@gmail.com \
    --cc=tsdh@gnu.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.