unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: "Rudolf Adamkovič" <salutis@me.com>
Cc: 51437@debbugs.gnu.org, "João Távora" <joaotavora@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	[thread overview]
Message-ID: <871r44ymw6.fsf@gnus.org> (raw)
In-Reply-To: <m235ompqp4.fsf@me.com> ("Rudolf Adamkovič"'s message of "Wed, 27 Oct 2021 15:01:11 +0200")

Rudolf Adamkovič <salutis@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





  reply	other threads:[~2021-10-29 13:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-27 13:01 bug#51437: 29.0.50; The annotated example of a complete working Flymake backend does not work with narrowed buffers Rudolf Adamkovič via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-10-29 13:35 ` Lars Ingebrigtsen [this message]
2021-10-29 18:07   ` João Távora
2021-10-30 21:15     ` Rudolf Adamkovič via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-10-31  9:26       ` João Távora
2021-11-04 22:41         ` Rudolf Adamkovič via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-09-10  4:53       ` Lars Ingebrigtsen

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=871r44ymw6.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=51437@debbugs.gnu.org \
    --cc=joaotavora@gmail.com \
    --cc=salutis@me.com \
    /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).