From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: feature request: public API to get new flymake's errors/warnings Date: Fri, 20 Oct 2017 09:53:37 +0300 Message-ID: <83zi8mcnta.fsf@gnu.org> References: <87inffhrzq.fsf@gmail.com> <87r2tzid3u.fsf@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1508482500 26998 195.159.176.226 (20 Oct 2017 06:55:00 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 20 Oct 2017 06:55:00 +0000 (UTC) Cc: sleepboy.zzz@gmail.com, emacs-devel@gnu.org To: joaotavora@gmail.com (=?utf-8?B?Sm/Do28gVMOhdm9yYQ==?=) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 20 08:54:55 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e5RCY-00046p-VS for ged-emacs-devel@m.gmane.org; Fri, 20 Oct 2017 08:54:39 +0200 Original-Received: from localhost ([::1]:52408 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5RCd-0008Lk-Ba for ged-emacs-devel@m.gmane.org; Fri, 20 Oct 2017 02:54:43 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56178) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5RBn-0008Kl-UG for emacs-devel@gnu.org; Fri, 20 Oct 2017 02:53:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e5RBk-0001fe-1A for emacs-devel@gnu.org; Fri, 20 Oct 2017 02:53:51 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:47769) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5RBj-0001fY-TL; Fri, 20 Oct 2017 02:53:47 -0400 Original-Received: from [176.228.60.248] (port=1817 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1e5RBj-0000yQ-8p; Fri, 20 Oct 2017 02:53:47 -0400 In-reply-to: <87r2tzid3u.fsf@gmail.com> (joaotavora@gmail.com) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:219635 Archived-At: > From: joaotavora@gmail.com (João Távora) > Date: Thu, 19 Oct 2017 12:36:05 +0100 > Cc: emacs-devel@gnu.org > > The attached patch augments the API for these purposes (and describes it > in the manual). A few comments to the documentation: > -Since overlays also support arbitrary keymaps, you can use this > -property @code{flymake-text} to create interactive annotations, such > -as in the following example of binding a @kbd{mouse-3} event (middle > -mouse button click) to an Internet search for the text of a > -@code{:warning} or @code{:error}. > +Since overlays also support arbitrary keymaps, you can this along with ^^^^^^^^^^^^ The "use" part is missing. > +the functions @code{flymake-diagnostics} and > +@code{flymake-diagnostic-text} (@pxref{Flymake utility functions}) to > +create interactive annotations, such as in the following example of > +binding a @kbd{mouse-3} event (middle mouse button click) to an ^^^^^^^^^^^^^ Since you are talking about an event, not something that the user does, @code is a better markup here. > +@deffn Function flymake-diagnostics beg end > +Get a list of Flymake diagnostics in the region comprised between > +@var{beg} and @var{end}. If neither @var{beg} or @var{end} is I'd say "in the region determined by @var{beg} and @var{end}". I think it's both more correct English and avoids misinterpretation of what exactly "between" means (is in exclusive or inclusive?). > +supplied, use the whole buffer, otherwise if @var{beg} is non-nil and > +@var{end} is nil, consider only diagnostics at @var{beg}. "nil" should have the @code markup (2 counts). > +(defun flymake-diagnostics (&optional beg end) > + "Get Flymake diagnostics in region comprised between BEG and END. Same comment here about the "comprised between" part. Thanks.