From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Rudolf =?UTF-8?Q?Adamkovi=C4=8D?= via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs 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 Message-ID: References: <871r44ymw6.fsf@gnus.org> Reply-To: Rudolf =?UTF-8?Q?Adamkovi=C4=8D?= Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30519"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Lars Ingebrigtsen , 51437@debbugs.gnu.org To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 04 23:42:10 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1milQw-0007ht-JO for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 04 Nov 2021 23:42:10 +0100 Original-Received: from localhost ([::1]:57540 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1milQu-00032a-NR for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 04 Nov 2021 18:42:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47760) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1milQo-00032Q-C9 for bug-gnu-emacs@gnu.org; Thu, 04 Nov 2021 18:42:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60529) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1milQo-0006X2-49 for bug-gnu-emacs@gnu.org; Thu, 04 Nov 2021 18:42:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1milQo-0005YM-1R for bug-gnu-emacs@gnu.org; Thu, 04 Nov 2021 18:42:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Rudolf =?UTF-8?Q?Adamkovi=C4=8D?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 04 Nov 2021 22:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51437 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 51437-submit@debbugs.gnu.org id=B51437.163606568021294 (code B ref 51437); Thu, 04 Nov 2021 22:42:01 +0000 Original-Received: (at 51437) by debbugs.gnu.org; 4 Nov 2021 22:41:20 +0000 Original-Received: from localhost ([127.0.0.1]:43842 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1milQ8-0005XN-F4 for submit@debbugs.gnu.org; Thu, 04 Nov 2021 18:41:20 -0400 Original-Received: from mr85p00im-zteg06022001.me.com ([17.58.23.193]:59793) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1milQ6-0005XA-Rm for 51437@debbugs.gnu.org; Thu, 04 Nov 2021 18:41:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=1a1hai; t=1636065673; bh=9swoIVs/Th791zv92CKgtUX3av7s/KFqpsjNPK4zAVE=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=bXmxkqm7DDnVUGfPHe5wSQ8Gzcs7lFHOEe3XQRB/YjcnDK2p9dHs6nVopiRegHZVc rq1Tp4CFyCMuNxK+gJ9fyWItrsjk7sX7kHmSt8iIL59Bna0vwbDVwvFTQVjO83C4Vn aJc1V3VR8QsdQEhGXphp9nbMOEJ2+CL9Akgatw2dT4QQhxEcKV29+xPEqHutc8vBXf HYB5+CYl5ECDQqvYOsHegCxxkd+J7MPjILkRa/siNw8+fehr9e8ztiKnmUBVbjz9b3 eKN5WhJWe24i5FWqe3vy74RZPs8eq8iGM0bbUF+bydPeNFsw6O3dqEE5D4P4L2uafA 9AyDwjD5dgSmw== Original-Received: from Workstation.local (78-141-116-131.dynamic.orange.sk [78.141.116.131]) by mr85p00im-zteg06022001.me.com (Postfix) with ESMTPSA id 46B90380370; Thu, 4 Nov 2021 22:41:12 +0000 (UTC) In-Reply-To: X-Proofpoint-Virus-Version: vendor=fsecure engine=1.1.170-22c6f66c430a71ce266a39bfe25bc2903e8d5c8f:6.0.425, 18.0.790, 17.0.607.475.0000000 definitions=2021-11-04_07:2021-11-03_01, 2021-11-04_07, 2020-04-07_01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 adultscore=0 suspectscore=0 mlxlogscore=999 malwarescore=0 mlxscore=0 bulkscore=0 clxscore=1015 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2111040088 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:218950 Archived-At: Jo=C3=A3o T=C3=A1vora 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: =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80 =E2=94=82 (with-eval-after-load 'flymake =E2=94=82 (my-define-flymake-backend =E2=94=82 my-flymake-vale =E2=94=82 (lambda (file) (list "vale" "--output" "line" "--ext" ".md" "-= -no-wrap")) =E2=94=82 "^stdin.md:\\([0-9]+\\):\\([0-9]+\\):\\(.*\\)$" =E2=94=82 (lambda (msg) t))) =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80 I dislike the idea of unnecessary "backend packages", and I think Flymake s= hould empower the user to plug in any CLI tool in a couple of minutes. No p= ackages, no complicated functions with `make-process', and so on. Instead, = make simple asynchronous live buffer checking simple. Then, everyone will p= lug 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: =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80 =E2=94=82 (with-eval-after-load 'flymake =E2=94=82 (my-define-flymake-backend =E2=94=82 my-flymake-swiftlint =E2=94=82 'my-flymake-swiftlint-command =E2=94=82 "^:\\([0-9]+\\):\\([0-9]+\\): \\(.*\\)$" =E2=94=82 (lambda (msg) (string-match "^warning" msg)))) =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80 TL;DR Vanilla Flymake makes it unnecesserily hard to plug in a simple CLI u= tility for buffer checking. Rudy --=20 "I love deadlines. I love the whooshing noise they make as they go by." -- = Douglas Adams, The Salmon of Doubt Rudolf Adamkovi=C4=8D Studenohorsk=C3=A1 25 84103 Bratislava Slovakia [he/him]