unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: joaotavora@gmail.com (João Távora)
To: Lele Gaifax <lele@metapensiero.it>
Cc: emacs-devel@gnu.org
Subject: Re: Two issues with the new Flymake
Date: Fri, 03 Nov 2017 16:59:56 +0000	[thread overview]
Message-ID: <87mv43ti0j.fsf@gmail.com> (raw)
In-Reply-To: <87fu9va22c.fsf@metapensiero.it> (Lele Gaifax's message of "Fri,  03 Nov 2017 15:07:07 +0100")

Lele Gaifax <lele@metapensiero.it> writes:

> In a python-mode buffer I appended "def pippo(@):" at the end of the buffer,
> and quickly deleted the last three characters (that is, "@):"): the "@"
> triggered an error in the checker tool (I'm using flake8 at the moment, but I
> think that's irrelevant), and as soon as Flymake got that it emitted
>
>   error in process sentinel: flymake-error: [Flymake] Invalid region line=417 col=13
>   error in process sentinel: [Flymake] Invalid region line=417 col=13
>
> obviously because line 417 shrinked to 10 characters.
>

Thanks for explaining. I think flymake-diag-region is too alarmist in
this case, which is reasonably normal, so I demoted the handling of this
error to a warning to the *Flymake log* buffer.

diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index c2349d8c7c..e13d79770e 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -342,7 +342,7 @@ flymake-diag-region
                 (let* ((beg (fallback-bol))
                        (end (fallback-eol beg)))
                   (cons beg end)))))))
-    (error (flymake-error "Invalid region line=%s col=%s" line col))))
+    (error (flymake-log :warning "Invalid region line=%s col=%s" line col))))
 
 (defvar flymake-diagnostic-functions nil
   "Special hook of Flymake backends that check a buffer.

Regarding your pending contribution for this python backend I will post
separately very soon.

João





  reply	other threads:[~2017-11-03 16:59 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-03  9:50 Two issues with the new Flymake Lele Gaifax
2017-11-03 12:33 ` Stefan Monnier
2017-11-03 14:07   ` Lele Gaifax
2017-11-03 16:59     ` João Távora [this message]
2017-11-03 17:15       ` Stefan Monnier
2017-11-03 20:17 ` Three Flymake backends Was " João Távora
2017-11-04 15:30   ` Stefan Monnier
2017-11-04 23:17     ` João Távora
2017-11-05 12:50   ` Dmitry Gutov
2017-11-05 12:59     ` João Távora
2017-11-05 13:04       ` Dmitry Gutov
2017-11-05 13:22         ` João Távora
2017-11-05 20:14           ` Dmitry Gutov
2017-11-05 21:05             ` João Távora
2017-11-05 23:56               ` Dmitry Gutov
2017-11-06  9:48                 ` João Távora
2017-11-06 10:35                   ` Dmitry Gutov
2017-11-06 11:08                     ` João Távora
2017-11-13  0:23                       ` Dmitry Gutov

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mv43ti0j.fsf@gmail.com \
    --to=joaotavora@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=lele@metapensiero.it \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).