From: Yuta Yamada <sleepboy.zzz@gmail.com>
To: "João Távora" <joaotavora@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: feature request: public API to get new flymake's errors/warnings
Date: Thu, 19 Oct 2017 05:31:14 -0700 [thread overview]
Message-ID: <CAK=dAsN4+5KzVYX=46pE8CTLjyZxW+PLJ8abwdX38pr8Wdo+KQ@mail.gmail.com> (raw)
In-Reply-To: <87r2tzid3u.fsf@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1709 bytes --]
>
> You should be able to just do:
>
> (defun flymake-tip-get-diag-text-on-line ()
> "Return list of string of error/warning info on the current line."
> (cl-loop for diag in (flymake-diagnostics (point-at-bol)
> (point-at-eol))
> collect (flymake-diagnostic-text diag)))
>
> If noone objects I shall push the patch to emacs-26 in a couple of days
> time.
>
Thanks Joao, there is no objection from me.
I'll try `flymake-diagnostic-XXX' stuff after you pushed.
Yuta Yamada
On Thu, Oct 19, 2017 at 4:36 AM, João Távora <joaotavora@gmail.com> wrote:
> Yuta Yamada <sleepboy.zzz@gmail.com> writes:
>
> > --- code:
> > (defun flymake-tip-get-diag-text-on-line ()
> > "Return list of string of error/warning info on the current line."
> > (cl-loop for ov in (flymake--overlays :beg (point-at-bol) :end
> (point-at-eol))
> > collect (flymake--diag-text (overlay-get ov
> 'flymake--diagnostic))))
> > ---
> >
> > As you can see, I used 1 (flymake--overlays), 2 (flymake--diag-text), 3
> (flymake--diagnostic).
> > So, I hope those functions/symbol become public API. (i mean "-"
> > instead of "--")
>
> Thanks,
>
> The attached patch augments the API for these purposes (and describes it
> in the manual).
>
> You should be able to just do:
>
> (defun flymake-tip-get-diag-text-on-line ()
> "Return list of string of error/warning info on the current line."
> (cl-loop for diag in (flymake-diagnostics (point-at-bol)
> (point-at-eol))
> collect (flymake-diagnostic-text diag)))
>
> If noone objects I shall push the patch to emacs-26 in a couple of days
> time.
>
> João
>
>
[-- Attachment #2: Type: text/html, Size: 2580 bytes --]
next prev parent reply other threads:[~2017-10-19 12:31 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
2017-10-17 14:32 ` Yuta Yamada
2017-10-19 11:36 ` João Távora
2017-10-19 12:31 ` Yuta Yamada [this message]
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='CAK=dAsN4+5KzVYX=46pE8CTLjyZxW+PLJ8abwdX38pr8Wdo+KQ@mail.gmail.com' \
--to=sleepboy.zzz@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=joaotavora@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.