You should be able to just do:
(defun flymake-tip-get-diag-text-on-line () (cl-loop for diag in (flymake-diagnostics (point-at-bol) (point-at-eol))
"Return list of string of error/warning info on the current line."
collect (flymake-diagnostic-text diag)))
If noone objects I shall push the patch to emacs-26 in a couple of days time.
Yuta Yamada <sleepboy.zzz@gmail.com> writes:
> --- code:
> (defun flymake-tip-get-diag-text-on-line () Thanks,
> "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 "--")
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 () (cl-loop for diag in (flymake-diagnostics (point-at-bol) (point-at-eol))
"Return list of string of error/warning info on the current line."
collect (flymake-diagnostic-text diag)))
If noone objects I shall push the patch to emacs-26 in a couple of days time.
João