emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: feature request: public API to get new flymake's errors/warnings


From: Yuta Yamada
Subject: Re: feature request: public API to get new flymake's errors/warnings
Date: Thu, 19 Oct 2017 05:31:14 -0700

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 <address@hidden> wrote:
Yuta Yamada <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]