From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#50244: 28.0.50; Support project-wide diagnostics reports in flymake.el Date: Mon, 13 Sep 2021 21:53:20 +0100 Message-ID: <874kao42pr.fsf@gmail.com> References: <87bl5hm5qj.fsf@gmail.com> <87y283536t.fsf@gmail.com> <41cd4854-d162-bc6c-900e-96a4245e2c59@yandex.ru> <7c6bb19d-24fa-0875-a25e-8b0739901e0f@yandex.ru> 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="8159"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 50244@debbugs.gnu.org, Philipp Stephani , Theodor Thornhill To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 13 22:54:53 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 1mPsya-0001vq-US for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 13 Sep 2021 22:54:53 +0200 Original-Received: from localhost ([::1]:54866 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mPsyZ-0000rg-TN for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 13 Sep 2021 16:54:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48746) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mPsxm-0000oh-Qt for bug-gnu-emacs@gnu.org; Mon, 13 Sep 2021 16:54:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35456) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mPsxm-00047V-J1 for bug-gnu-emacs@gnu.org; Mon, 13 Sep 2021 16:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mPsxm-0001Kl-Er for bug-gnu-emacs@gnu.org; Mon, 13 Sep 2021 16:54:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 13 Sep 2021 20:54:02 +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.16315664095088 (code B ref 50244); Mon, 13 Sep 2021 20:54:02 +0000 Original-Received: (at 50244) by debbugs.gnu.org; 13 Sep 2021 20:53:29 +0000 Original-Received: from localhost ([127.0.0.1]:47002 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mPsxF-0001Jz-52 for submit@debbugs.gnu.org; Mon, 13 Sep 2021 16:53:29 -0400 Original-Received: from mail-wr1-f54.google.com ([209.85.221.54]:43679) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mPsxD-0001JU-UK for 50244@debbugs.gnu.org; Mon, 13 Sep 2021 16:53:28 -0400 Original-Received: by mail-wr1-f54.google.com with SMTP id b6so16652069wrh.10 for <50244@debbugs.gnu.org>; Mon, 13 Sep 2021 13:53:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=5nqiPTUoqgct7Yv4fM/3tah7TQCuj1Hqdy7aq886vcQ=; b=DQv5pb3GEsGL3Rte2r7hUwjqE5QUJvAHNNzfT8bd+mqtycxAvnva8fhsE37c16wit9 HgAfTDL8pkgeaJc5EXWwwPIbjp0h5vljjez35BadpJMBkCsKAOtmhbZIzERAlo43poXR cN8Bgzc145Wzj5iL08CWJBx12EHEbwMAyUkqINHi0BszGDOpsLNNTjIDs+eGYnnfNInH viq0q+5cAKk5xhXYv8MSmxrDEONyx/qNwAA67AghlecGB6dkwpERJCXnAefnnS8Oyf+J q+XiyvJUBmMl28ASrPnPyaonpFzu0uOcIUczP3xPAKZM4kpxYqnCfuPfZc/45KSo/Hf3 UzVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=5nqiPTUoqgct7Yv4fM/3tah7TQCuj1Hqdy7aq886vcQ=; b=dLPcuvzDhxrA1cNjtb6ozvuLDN34LHcFrl1do5reDn9MHJ7r6z3/BjIaCh5FFo0uwR +uw6vOCPYMBKsCN0khaAeN4JgE2CdvVXw3C5PFRqGwZDp7SyOpNvE3bAWK915RFVaOhy DNCr4LJW21+NHHRM33d9kyf6YZUAUTUmSMdfpD4fPt26m6on6SddgmaXoFn8gTlbRHKH dT+wX0qNNmMcwc28Pz8uQEI/jQf8iloMbRGWgXWHBXuDw3uKHgtlnqsItADtWgcBRlRf yoRe+PoHdAMF0X+7pFAeRwS1A2MnVIzuw0o88Ytxkli8YDoQLB0hZkE4RvIktI1ucsmf v9TQ== X-Gm-Message-State: AOAM531r2sdqjpD3JKHFeW1me/raC/5rTy/zudIir27Iv/nnjegsGMwd GYft2+CNT2weOuX01AMiNDI= X-Google-Smtp-Source: ABdhPJxIpf8LmgnMLY/5LVjr7lqUQzYHjw+xblpxQdiYC6GpMx7nnu5Y+NwvfvKAhzvDbG+RLHHO2w== X-Received: by 2002:a5d:6a81:: with SMTP id s1mr9729973wru.274.1631566401780; Mon, 13 Sep 2021 13:53:21 -0700 (PDT) Original-Received: from nadja (a83-132-177-247.cpe.netcabo.pt. [83.132.177.247]) by smtp.gmail.com with ESMTPSA id z12sm3404408wro.75.2021.09.13.13.53.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Sep 2021 13:53:21 -0700 (PDT) In-Reply-To: <7c6bb19d-24fa-0875-a25e-8b0739901e0f@yandex.ru> (Dmitry Gutov's message of "Mon, 13 Sep 2021 23:26:06 +0300") 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:214266 Archived-At: Dmitry Gutov writes: > On 13.09.2021 09:48, Jo=C3=A3o T=C3=A1vora wrote: >> On Mon, Sep 13, 2021 at 1:08 AM Dmitry Gutov wrote: >>=20 >>> Or maybe you will have unique "show diagnostics" buffers for every >>> project, to be invoked manually? >> This. But it doesn't seem impossible to make a global diagnostics >> buffer for every project one has open. > > Anyway, I asked about this because because the use of global variable > (flymake-list-only-diagnostics) seems like it would make supporting > multiple projects at the same time more difficult. I can't guess what you are hinting at, sorry. You can call M-x flymake-show-project-diagnostics in two or more projects, of course, and you'll get separate listings. I don't know if that counts as "supporting multiple projects at the same time". > If global diagnostics are only reported to a particular buffer, > perhaps we could do without the global variable by tying refreshes to > a callback. I don't fully understand what you're suggesting, because I don't understand your working concepts. In the new manual section "Foreign and list-only diagnostics", you can read that the new API allows a form of reporting diagnostics for other buffers/files in a way that is tied to a callback. Maybe that that what you mean? Anyway, for the specific of case of Eglot/LSP -- which reports neighboring diagnostics _sporadically_ (i.e. not systematically) -- the "list only" diagnostics seem more suitable. For the purposes that I envisioned (only listing, as the name implies) a global variable also seems suitable. Again, I don't understand your suggestion, but if you can propose it in the form of code it would be much better, since there would be no ambiguity. A word of caution though: making these things work correctly in tandem with domestic diagnostics, new file visits and buffer killings was relatively hard. I tried many different approaches and settled on these two ("foreign" and "list-only"). Of course if you can clearly describe a use case where they are unsuitable, a third style may be invented. But I would first exhaust the possibilities in these two. In the meantime, please say if version-bumping project.el is OK. That is the only thing holding up the merge. Jo=C3=A3o