From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#31270: 26.1; Emacs 26.1 RC1 -- flymake-err-info is no longer available Date: Thu, 26 Apr 2018 16:26:32 +0000 Message-ID: References: <51aff540-e37b-e590-a125-b9ce87366a14@gmail.com> <87muxq1fq9.fsf@gmail.com> <092a56e4-88c3-d87a-a44b-c1a9a452a757@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000005db2f1056ac2dae8" X-Trace: blaine.gmane.org 1524760785 1797 195.159.176.226 (26 Apr 2018 16:39:45 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 26 Apr 2018 16:39:45 +0000 (UTC) Cc: 31270-done@debbugs.gnu.org To: Da Zhang Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Apr 26 18:39:41 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1fBjvl-0000I3-1X for geb-bug-gnu-emacs@m.gmane.org; Thu, 26 Apr 2018 18:39:37 +0200 Original-Received: from localhost ([::1]:43436 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fBjxr-0004QB-Te for geb-bug-gnu-emacs@m.gmane.org; Thu, 26 Apr 2018 12:41:48 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45007) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fBjje-0000K1-6M for bug-gnu-emacs@gnu.org; Thu, 26 Apr 2018 12:27:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fBjja-0003C1-6k for bug-gnu-emacs@gnu.org; Thu, 26 Apr 2018 12:27:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:32781) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fBjja-0003Bt-1h for bug-gnu-emacs@gnu.org; Thu, 26 Apr 2018 12:27:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fBjjZ-0002ve-NH for bug-gnu-emacs@gnu.org; Thu, 26 Apr 2018 12:27:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 26 Apr 2018 16:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31270 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Original-Received: via spool by 31270-done@debbugs.gnu.org id=D31270.152476001011240 (code D ref 31270); Thu, 26 Apr 2018 16:27:01 +0000 Original-Received: (at 31270-done) by debbugs.gnu.org; 26 Apr 2018 16:26:50 +0000 Original-Received: from localhost ([127.0.0.1]:40678 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fBjjO-0002vE-3A for submit@debbugs.gnu.org; Thu, 26 Apr 2018 12:26:50 -0400 Original-Received: from mail-qt0-f172.google.com ([209.85.216.172]:39166) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fBjjM-0002uu-RG for 31270-done@debbugs.gnu.org; Thu, 26 Apr 2018 12:26:49 -0400 Original-Received: by mail-qt0-f172.google.com with SMTP id f1-v6so15105429qtj.6 for <31270-done@debbugs.gnu.org>; Thu, 26 Apr 2018 09:26:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+Xj5NFlmIW2VXDUygMs+54NRtSXHfrutohGVrBZ4y1Q=; b=bkiuSFkPEDoWk9+DIOKIKxryo3K/ERg+y5JX5lbZBzQ1b32qbIwuN1Ai56pUWZxzEm Ppkg49nO1HUm2xRQTUXEcFQO6n86RnNFqeTbckkBZ4uTrM9bzWxQaQp9ZLkmomLuhsN1 IydxIr4EH8ce8KfVOugbKU5b33dBxDnk5XpJHhLO5iYSMr9pC4Z/tMmMDpxxsj0k7boo phz9xAKaBO4nFn3K/9wzpnnDURizWyqjUYZm1B15/Bk3Dz2klSvlgvESW+DlEs4rcePK AXvBRkmglZQkIMo5Cr/+wc3YBwWsLySUy9Hkl2hihi1y03B+LJoQosjxDBYxRmmBj+lf zP7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+Xj5NFlmIW2VXDUygMs+54NRtSXHfrutohGVrBZ4y1Q=; b=BWM0sgEaILwEy/i/Bvs9MpSob37/JgfLQg2/l61hTHd7E+CseNYDlei7Z2JOpEgeoc e5pOBCouJDgnh4fzGKdnhhUXy5K0Q2rygUg0q7T3x7Yyo/DRCPRlkF8ulUn7UXU1fGZi JzvdBJdmugXzQK7MRHY2Wzzv/ZZGCWa3gJPonLrfG7BRZT4m2eA5eHXBcRvGC6wdEoqu FuJugJT1cY5McrOF4T5pBgSkuU4uADpHt129/lbGE/J7Dz0JD1jrxpbTIxGJk9sMrcIc LRR38tk0tcOwwgXRwcoHoafLB18+AVFtc9QAArWLrTXG0DTn5zDm2GaMF2fKmHw5hJ5C h88g== X-Gm-Message-State: ALQs6tAy9LOMc9gFC93mrW4IWV/hzbyzULNGHs4OUHn5axx4YRuenPyx GffA7its1mkArrctzVcWFGPiq9GEo719Y51bQgE= X-Google-Smtp-Source: AB8JxZqJHd1UT4X2Wjs+XFcu+PPnqAJUfxPEaQTp3syhplcJFDH86M0U0ADMBobrHIuQ4DY1mYUY72OgoyEc9UCW4KA= X-Received: by 2002:ac8:3487:: with SMTP id w7-v6mr14290817qtb.220.1524760003325; Thu, 26 Apr 2018 09:26:43 -0700 (PDT) In-Reply-To: <092a56e4-88c3-d87a-a44b-c1a9a452a757@gmail.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:145768 Archived-At: --0000000000005db2f1056ac2dae8 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable You're welcome! On Thu, Apr 26, 2018, 16:14 Da Zhang wrote: > Thank you very much!! > > Dave > > On 2018-04-26 5:25 AM, Jo=C3=A3o T=C3=A1vora wrote: > > Da Zhang writes: > > > Hello -- > > I am a long term Emacs user and I use flymake together with flymake-curso= r on a daily basis. > > Starting Emacs 26.1, I noticed that flyamke was redesigned and no > longer has the var flymake-err-info that contains the error info > reported by the backend syntax checker. > > This makes flymake-cursor and code like the following not work: > > (defun elpy-flymake-error-at-point () > "Return the flymake error at point, or nil if there is none." > (when (boundp 'flymake-err-info) > (let* ((lineno (line-number-at-pos)) > (err-info (car (flymake-find-err-info flymake-err-info > lineno)))) > (when err-info > (mapconcat #'flymake-ler-text > err-info > ", "))))) > > I believe this is a potential issue and wonder if someone could direct > me to any alternatives to flymake-err-info in the newly designed > flyamke. > > > Hi Da Zhang, > > I'm the responsible for the redesign. Although I tried to keep *some* > backward compatibility to old flymake.el's API, the truth is that *all* > of it was an API. > > The bad news is that this variable is gone: it couldn't be > backward-adapted. The good news is that it should be much easier to > write your function: > > (defun elpy-flymake-error-at-point () > "Return the flymake error at point, or nil if there is none." > (mapconcat #'flymake-diagnostic-text (flymake-diagnostics (point)) "\n"= )) > > Notice that, to keep with the protocol, this returns a concatenation of > the text strings of all the errors at point. You might be better served > by returning and manipulating the objects returned by > flymake-diagnostics instead. > > See section "2.2.1 Flymake utility functions" of the Flymake manual > bundled with Emacs for more information. > > I don't know what flymake-cursor does, but I suspect it can be fixed > accordingly. > > Hope this helps, > Jo=C3=A3o > > > > > > > > > > > --0000000000005db2f1056ac2dae8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
You're welcome!=C2=A0

On Thu, Apr 26, 2018, 16:14 Da Zhang <zhangda82@gmail.com> wrote:
=20 =20 =20

Thank you very much!!

Dave


On 2018-04-26 5:25= AM, Jo=C3=A3o T=C3=A1vora wrote:
Da Zhang =
<zhangda82@gmail.com> writes:

Hello --

I am a long term Emacs user and I use flymake together with flymake-cursor =
on a daily basis.

Starting Emacs 26.1, I noticed that flyamke was redesigned and no
longer has the var flymake-err-info that contains the error info
reported by the backend syntax checker.

This makes flymake-cursor and code like the following not work:

(defun elpy-flymake-error-at-point ()
=C2=A0 "Return the flymake error at point, or nil if there is none.&qu=
ot;
=C2=A0 (when (boundp 'flymake-err-info)
=C2=A0=C2=A0=C2=A0 (let* ((lineno (line-number-at-pos))
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (err-info (car=
 (flymake-find-err-info flymake-err-info
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 lineno))))
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (when err-info
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (mapconcat #'flymake-ler-tex=
t
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 err-info
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ", ")))))

I believe this is a potential issue and wonder if someone could direct
me to any alternatives to flymake-err-info in the newly designed
flyamke.
Hi Da Zhang,

I'm the responsible for the redesign. Although I tried to keep *some*
backward compatibility to old flymake.el's API, the truth is that *all*
of it was an API.

The bad news is that this variable is gone: it couldn't be
backward-adapted. The good news is that it should be much easier to
write your function:

(defun elpy-flymake-error-at-point ()
=C2=A0 "Return the flymake error at point, or nil if there is none.&qu=
ot;
  (mapconcat #'flymake-diagnostic-text (flymake-diagnostics (point)) &q=
uot;\n"))

Notice that, to keep with the protocol, this returns a concatenation of
the text strings of all the errors at point. You might be better served
by returning and manipulating the objects returned by
flymake-diagnostics instead.

See section "2.2.1 Flymake utility functions" of the Flymake manu=
al
bundled with Emacs for more information.

I don't know what flymake-cursor does, but I suspect it can be fixed
accordingly.

Hope this helps,
Jo=C3=A3o









--0000000000005db2f1056ac2dae8--