GNU bug report logs - #51437
29.0.50; The annotated example of a complete working Flymake backend does not work with narrowed buffers

Previous Next

Package: emacs;

Reported by: Rudolf Adamkovič <salutis <at> me.com>

Date: Wed, 27 Oct 2021 13:02:01 UTC

Severity: normal

Found in version 29.0.50

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Rudolf Adamkovič <salutis <at> me.com>
Cc: 51437 <at> debbugs.gnu.org, João Távora <joaotavora <at> gmail.com>
Subject: bug#51437: 29.0.50; The annotated example of a complete working Flymake backend does not work with narrowed buffers
Date: Fri, 29 Oct 2021 15:35:21 +0200
Rudolf Adamkovič <salutis <at> me.com> writes:

> When checking a narrowed buffer with errors outside of the narrowed region, I get:
>
> ┌────
> │ error in process sentinel: flymake--highlight-line: Wrong type argument: integer-or-marker-p, nil
> │ error in process sentinel: Wrong type argument: integer-or-marker-p, nil
> └────
>
> Looks like `flymake-diag-region' returns `(nil . nil)' and `flymake-make-diagnostic' does not like that.

Perhaps this is the correct fix?  (João added to the CCs.)

diff --git a/doc/misc/flymake.texi b/doc/misc/flymake.texi
index 309bed7760..1d99342060 100644
--- a/doc/misc/flymake.texi
+++ b/doc/misc/flymake.texi
@@ -798,6 +798,7 @@ An annotated example backend
                        for type = (if (string-match "^warning" msg)
                                       :warning
                                     :error)
+                       when (and beg end)
                        collect (flymake-make-diagnostic source
                                                         beg
                                                         end


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 2 years and 280 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.