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: Rudolf Adamkovič <salutis <at> me.com>
To: João Távora <joaotavora <at> gmail.com>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 51437 <at> debbugs.gnu.org
Subject: bug#51437: 29.0.50; The annotated example of a complete working Flymake backend does not work with narrowed buffers
Date: Thu, 04 Nov 2021 23:41:08 +0100
João Távora <joaotavora <at> gmail.com> writes:

> This is starting to sound like a more generic Flymake limitation/bug
> than a documentation bug. I'll have a look when I get home.

True.

> Have you experimented with the 'region' arg when reporting back
> diagnostics? Also you can have a look at how the Elisp backend does
> it? I think, though I am not sure, that it works with narrowed
> buffers.

I did not dig that deep yet. :)

> By the way, Flymake for spell checking is a great idea. Is your
> backend available somewhere?

I use Vale to check on my writing (style and spelling) as follows:

┌────
│ (with-eval-after-load 'flymake
│   (my-define-flymake-backend
│    my-flymake-vale
│    (lambda (file) (list "vale" "--output" "line" "--ext" ".md" "--no-wrap"))
│    "^stdin.md:\\([0-9]+\\):\\([0-9]+\\):\\(.*\\)$"
│    (lambda (msg) t)))
└────

I dislike the idea of unnecessary "backend packages", and I think Flymake should empower the user to plug in any CLI tool in a couple of minutes. No packages, no complicated functions with `make-process', and so on. Instead, make simple asynchronous live buffer checking simple. Then, everyone will plug in their linters, unit test runners, style/spell-checkers, and the like. As of now, Flymake fights such a user. For instance, I use the same macro for everything else, including programming:

┌────
│ (with-eval-after-load 'flymake
│     (my-define-flymake-backend
│      my-flymake-swiftlint
│      'my-flymake-swiftlint-command
│      "^<nopath>:\\([0-9]+\\):\\([0-9]+\\): \\(.*\\)$"
│      (lambda (msg) (string-match "^warning" msg))))
└────

TL;DR Vanilla Flymake makes it unnecesserily hard to plug in a simple CLI utility for buffer checking.

Rudy
-- 
"I love deadlines. I love the whooshing noise they make as they go by." -- Douglas Adams, The Salmon of Doubt

Rudolf Adamkovič <salutis <at> me.com>
Studenohorská 25
84103 Bratislava
Slovakia

[he/him]




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

Previous Next


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