From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#40351: Flymake error count Date: Mon, 12 Dec 2022 00:50:42 -0800 Message-ID: References: <2ICKUTXGCUO0W.3GVX8GSQ0BRIC@handheld.hackware.cl> <87r1vpatvt.fsf@gmail.com> 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="36371"; mail-complaints-to="usenet@ciao.gmane.io" Cc: sir@hacktivista.com, 40351-done@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 Mon Dec 12 09:52:39 2022 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 1p4eYB-0009JU-LJ for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 12 Dec 2022 09:52:39 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p4eWg-0000ZP-Ou; Mon, 12 Dec 2022 03:51:06 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p4eWe-0000XW-6P for bug-gnu-emacs@gnu.org; Mon, 12 Dec 2022 03:51:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p4eWd-0001Xc-5Y for bug-gnu-emacs@gnu.org; Mon, 12 Dec 2022 03:51:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p4eWd-0004zk-0x for bug-gnu-emacs@gnu.org; Mon, 12 Dec 2022 03:51:03 -0500 Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Mon, 12 Dec 2022 08:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 40351 X-GNU-PR-Package: emacs Mail-Followup-To: 40351@debbugs.gnu.org, stefankangas@gmail.com, sir@hacktivista.com Original-Received: via spool by 40351-done@debbugs.gnu.org id=D40351.167083505019182 (code D ref 40351); Mon, 12 Dec 2022 08:51:02 +0000 Original-Received: (at 40351-done) by debbugs.gnu.org; 12 Dec 2022 08:50:50 +0000 Original-Received: from localhost ([127.0.0.1]:51545 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p4eWQ-0004zK-0D for submit@debbugs.gnu.org; Mon, 12 Dec 2022 03:50:50 -0500 Original-Received: from mail-ot1-f52.google.com ([209.85.210.52]:39855) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p4eWO-0004zB-FJ for 40351-done@debbugs.gnu.org; Mon, 12 Dec 2022 03:50:48 -0500 Original-Received: by mail-ot1-f52.google.com with SMTP id z14-20020a9d65ce000000b0067059c25facso6853810oth.6 for <40351-done@debbugs.gnu.org>; Mon, 12 Dec 2022 00:50:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:from:to:cc:subject:date :message-id:reply-to; bh=2G86XIG67Jht8YOKh17W+a02KyBBHgMh7uexYeW1q74=; b=IxcUZBKLMAYI9y0XPkG9KjOuf+bjtrKN4I1bjKbmMDRga4rj17JDobSSjxIuwIry4g TqxCS6aXLvJCCAWMRJ4EtAzfbnXzQ0EOxT4CwxxpfjlorgiOZbJChGc+tkXO2iKVrFUd V3SDPsjw9FcTYOCzyDCg6fb3ecpx1csANoChkYinjcXX4Nw4+V/nHg5cO/KCeraioMVi paIBvFUK2yH6zdNzfSzbUzA2uuHp6Ngx9ULjCNS1O+LGif8IRk1DuUtzpRyr5Ng3hHo1 4GzDAaPivfyAVpO1CdhwGM8+ZBkBZLXhiUWlg1jirj0m5jRZcMsKJ7NrkbjwXBRIjxHY YF8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=2G86XIG67Jht8YOKh17W+a02KyBBHgMh7uexYeW1q74=; b=X3Ifs8c+AAGI972YnCaJjcrgxwoOt/yd8zcFu7JL0usLrmBhc78nqe2mQsD0HsdqLu rW/H/ihzH/DswFpu2i9od4zYVloesj/MZ4hOJkjFFj09a5iy8Bvg1Mq2oAUtMXajk4Z4 Qa5H+8XuwtNHgBn+iSEgNcbXGiXYjpwvjcOsdjMcoEPjiSPOaDRw7dAL2pCnHaSuVFgG r0yJg7BaCKiivrFsDiORWiheknwpNNuvdPXpBtHW1SqpJYgBMVHUGY+OctZHFXtdWS6W 2BwAdP6jL5aPwmLJTn77X7GaloqgsaW2cDREYy/VWn68J+SWWOJH2r9toVdnzk9T7MJZ Z8CA== X-Gm-Message-State: ANoB5pm3pb0tT33egRih6jLuOhpImf3OSTQF1jWSDr2F/fRgSjYKyK6X ODDYl/Bstc33AZ57dtUQJU2dYRZqAFNGk0cSZBY= X-Google-Smtp-Source: AA0mqf4VAUq29qEF2u3Hp1Swih7Uk2orPKC8T4t2PkCBKp5rm71a8G0tiwWP4uPM1nxSWINDbykl+pLTxmMzuoPWC7w= X-Received: by 2002:a9d:6203:0:b0:66e:f6cb:cb4e with SMTP id g3-20020a9d6203000000b0066ef6cbcb4emr8229553otj.105.1670835042923; Mon, 12 Dec 2022 00:50:42 -0800 (PST) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Mon, 12 Dec 2022 00:50:42 -0800 In-Reply-To: <87r1vpatvt.fsf@gmail.com> ("=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?="'s message of "Tue, 12 May 2020 19:30:14 +0100") X-Hashcash: 1:20:221212:40351-done@debbugs.gnu.org::1V19krIR5rDh4FEw:4NUM 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:250688 Archived-At: Jo=C3=A3o T=C3=A1vora writes: > Hello, sir@hacktivista.com: > > I'm sorry for the very long delay in answering this. Next time you > report a bug for flymake, make sure you also forward me the message that > the bug reporting system sends back to you. (yes I know you had written > me separately). > > Anyway, to your problem: > > >> for (beg . end) =3D (flymake-diag-region source l= num) >> for type =3D (make-symbol (match-string 3)) > ^^^^^^^^^^^ > > I think the problem you experience is found here. TYPE cannot be a > different symbol for each error you find, otherwise Flymake will think > that each error has its unique type. If `(match-string 3)` is indeed > often enough the same string, you can try `intern` instead. > > Let's say (match-string 3) can only return "oops", "warn" or "info" I wou= ld write > that line like > > for type =3D (intern (format "flymake-phpcs--%s" (match-string 3))) > > Then separately I would write in a top-level-form > > (put 'flymake-phpcs--oops 'flymake-category 'flymake-error) > (put 'flymake-phpcs--warn 'flymake-category 'flymake-warning) > (put 'flymake-phpcs--info 'flymake-category 'flymake-note) > > Then the errors would be merged with the errors from Eglot, I think. > > See the manual section 2.1 Customizing Flymake error types > > I see the the docstring for `flymake-make-diagnostic` could see some > improvement. In particular, the phrase "TYPE is a key to symbol" > doesnt' make much sense. There have been no further replies here within 2.5 years, so I'm going to assume the above was enough to resolve this issue. I'm therefore closing this bug report. If this conclusion is incorrect and this is still an issue, please reply to this email (use "Reply to all" in your email client) and we can reopen the bug report.