all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: joaotavora@gmail.com (João Távora)
To: Yuta Yamada <sleepboy.zzz@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: feature request: public API to get new flymake's errors/warnings
Date: Mon, 16 Oct 2017 19:23:05 +0100	[thread overview]
Message-ID: <87inffhrzq.fsf@gmail.com> (raw)
In-Reply-To: <CAK=dAsPchum1ZQiqY1rdk4Ydgx2RNjo8ar=m6Fcdvu4dGyyFkQ@mail.gmail.com> (Yuta Yamada's message of "Mon, 16 Oct 2017 09:41:16 -0700")

Yuta Yamada <sleepboy.zzz@gmail.com> writes:

> Hello Emacs devel.
>
> First of all, thank you to rewritten of flymake!
>
> I'm an emacs' package maintainer of flycheck-tip and
> flycheck-nimsuggest (nim language's flycheck backend) and I could
> convert to flycheck-nimsuggest.el for flymake very easy.
>
> But, as for flycheck-tip (which show flycheck/flymake's errors and
> warning on a tooltip), or other flymake related packages, could you
> support public API to get errors and warnings object? (I mean a public
> function for it)
>
I see. I think you could try to write it with the internal functions
that I mention in the rest of this message and then we can more easily
see which parts are currently "internal" that could be "external":

1) Most important you need an easy way to get the the "diagnostic"
object at point. This is held by the overlays within their
'flymake--diagnostic' property.

2) You'll probably need accessors for the flymake--diag object (text,
type, issuing backend function). I think this is a question of renameing
the existing flymake--diag-text, flymake--diag-type,
flymake--diag-backend.

3) Perhaps a way to get all the diagnostics in a region. There is
flymake--overlays for this.

4) Maybe check the properties (severity) of a given type? This is
currently done via flymake--lookup-type-property.

My only doubt is if 1 and 3 should work through the overlays API
(flymake--overlays and overlay-get for discrimination) i.e. If so the
API is smaller, but ties Flymake to an overlay overlay-based
implementation. Otherwise we can make flymake-diagnostics-at-point
etc...

> because I don't feel the fear of devel's change.

:-)

João



  reply	other threads:[~2017-10-16 18:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-16 16:41 feature request: public API to get new flymake's errors/warnings Yuta Yamada
2017-10-16 18:23 ` João Távora [this message]
2017-10-17 14:32   ` Yuta Yamada
2017-10-19 11:36     ` João Távora
2017-10-19 12:31       ` Yuta Yamada
2017-10-20  6:53       ` Eli Zaretskii
2017-10-20  9:10         ` João Távora
2017-10-20 12:47         ` Stefan Monnier
2017-10-20 13:40           ` Yuri Khan
2017-10-20 13:49           ` João Távora

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=87inffhrzq.fsf@gmail.com \
    --to=joaotavora@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=sleepboy.zzz@gmail.com \
    /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.