From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Theodor Thornhill via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#50244: 28.0.50; Support project-wide diagnostics reports in flymake.el Date: Mon, 13 Sep 2021 21:47:15 +0200 Message-ID: References: <87bl5hm5qj.fsf@gmail.com> <87y283536t.fsf@gmail.com> <41cd4854-d162-bc6c-900e-96a4245e2c59@yandex.ru> <87o88w4al4.fsf@gmail.com> Reply-To: Theodor Thornhill 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="37847"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 50244@debbugs.gnu.org, Philipp Stephani To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= , Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 13 21:48: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 1mPrw1-0009dK-EZ for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 13 Sep 2021 21:48:10 +0200 Original-Received: from localhost ([::1]:48202 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mPrvz-0008U9-HV for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 13 Sep 2021 15:48:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60888) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mPrvu-0008Ty-AH for bug-gnu-emacs@gnu.org; Mon, 13 Sep 2021 15:48:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35337) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mPrvu-0004GD-28 for bug-gnu-emacs@gnu.org; Mon, 13 Sep 2021 15:48:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mPrvt-00083j-Qm for bug-gnu-emacs@gnu.org; Mon, 13 Sep 2021 15:48:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Theodor Thornhill Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 13 Sep 2021 19:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50244 X-GNU-PR-Package: emacs Original-Received: via spool by 50244-submit@debbugs.gnu.org id=B50244.163156244330931 (code B ref 50244); Mon, 13 Sep 2021 19:48:01 +0000 Original-Received: (at 50244) by debbugs.gnu.org; 13 Sep 2021 19:47:23 +0000 Original-Received: from localhost ([127.0.0.1]:46883 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mPrvH-00082p-8G for submit@debbugs.gnu.org; Mon, 13 Sep 2021 15:47:23 -0400 Original-Received: from out2.migadu.com ([188.165.223.204]:35035) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mPrvD-00082d-6P for 50244@debbugs.gnu.org; Mon, 13 Sep 2021 15:47:21 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1631562437; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=opsfP5AecEXvKWqi8WtWdqYVJQun/4hRpW2wZlUit2Y=; b=gFzkp2bVj9BpF8RYf7JCQmQR7jKb9XPHzTEewnIvlBOIK4ANojtOvLnei+iDVDtrfWyYNz yidiP7C+MfFOu7XF3GaqnnTBGva1H8TgPDEOIJNW0Zt9XHEk/NtX+1ydDAg2ptapuYkCJJ IxFfoCsGWd7XhCYKE8NKfHJXmtgSAM9Wort8NXcsi3bnPLoTJcWFpVjVJ2mYwe+BjwQTIL UJ8E/FnOXGyoWB3RNHu1Rv0r583nhnznqGTY6LdMdUsVYHLRkhRgADHA9ca5toZf0PV2NJ PO04o9bVngwlRWt201uhXHfwaXhf4oWz1yBYC4p6HoPFH+85GBrA1Ovj1eob0A== In-Reply-To: <87o88w4al4.fsf@gmail.com> X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: theo@thornhill.no 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:214260 Archived-At: Jo=C3=A3o T=C3=A1vora writes: > > The main changes to flymake.el and its documentation are now ready to > push. There are some bugs regarding sorting in the diagnostics listing, > and the maybe order and length of columns needs rearranging, but these > can be sorted out later. > Very nice, great job! I've been looking through the code the last couple of days. I think it makes sense to treat the list-only diags the way you do here, in that we only need to be able to jump to it, in addition to know that the error is there. One thing I saw while reading and that might not be needed anymore is contained in the diff at the bottom. There might be reasons for this, but I _think_ this should be covered in the &aux variable? > > Another important aspect is that I haven't had a change to test this > with Eglot, which was one of the main motivators behind this change. > The reason is that I don't have easy access to a server which reports > diagnostics project wide (I thought clangd did, but I was mistaken). So > the only client of the new functionality is the flymake-cc non-LSP > backend, for now. > > Theodor, now would be a good time for you to step in with changes to > Eglot that use the new `flymake-list-only-diagnostics` experimental API > in flymake.el. Likely, some adjustments will have to be made to both > packages. > I will absolutely jump at this as quickly as possible. I'm not exactly sure how fast I'll be, since I'm on parental leave right now. How would you want to receive the changes to eglot? As part of this bug, or as a new issue over at GH? I'm fine with either. Considering both flymake and eglot may be affected, maybe this bug is a good place? Again, thanks - now I can soon stop maintaining a trash fork of eglot to get this functionality :) All the best, and I'll get back to you soon! Theo diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index 83c0b4dd99..543cfe64f4 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el @@ -815,8 +815,6 @@ calling convention described in to handle a report even if TOKEN was not expected. REGION is a (BEG . END) pair of buffer positions indicating that this report applies to that region." - (unless state - (error "Can't find state for %s in `flymake--state'" backend)) (cond ((null state) (flymake-error