From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#71504: 30.0.50; FR: Fix suggestions ("quick fix") for Flymake diagnostics Date: Sun, 07 Jul 2024 17:28:12 +0300 Message-ID: <861q452s5f.fsf@gnu.org> References: <865xtu7seh.fsf@gnu.org> <868qyf5587.fsf@gnu.org> <868qyd32ih.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1932"; mail-complaints-to="usenet@ciao.gmane.io" Cc: sbaugh@janestreet.com, 71504@debbugs.gnu.org To: Eshel Yaron Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jul 07 16:31:16 2024 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 1sQSv5-0000FT-K9 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 07 Jul 2024 16:31:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sQSuq-0003cU-F0; Sun, 07 Jul 2024 10:31:00 -0400 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 1sQSup-0003cB-2I for bug-gnu-emacs@gnu.org; Sun, 07 Jul 2024 10:30:59 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sQSuo-0004XF-Q8 for bug-gnu-emacs@gnu.org; Sun, 07 Jul 2024 10:30:58 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sQSus-00011h-Kf for bug-gnu-emacs@gnu.org; Sun, 07 Jul 2024 10:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 07 Jul 2024 14:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71504 X-GNU-PR-Package: emacs Original-Received: via spool by 71504-submit@debbugs.gnu.org id=B71504.17203626363914 (code B ref 71504); Sun, 07 Jul 2024 14:31:02 +0000 Original-Received: (at 71504) by debbugs.gnu.org; 7 Jul 2024 14:30:36 +0000 Original-Received: from localhost ([127.0.0.1]:48917 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sQSuS-000113-7b for submit@debbugs.gnu.org; Sun, 07 Jul 2024 10:30:36 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:37750) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sQSuP-00010s-U8 for 71504@debbugs.gnu.org; Sun, 07 Jul 2024 10:30:34 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sQSsA-00044Z-IF; Sun, 07 Jul 2024 10:28:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Rma3EwuEbU5wfIfdTVdsB/KmD2lu+mEKBafW8OqYJGk=; b=L2DnBaHbkp2V mykRVdcTBLfIUOGV4nJJg4bUmzdlnwM7aKMteiF82ZMA+OFIAlCn1h3Jr8ggu3Jts9s9NJg5331TN jxNCl+V8gz1Cej/QI8CyJLx+EYmgbZ9xsm0I+9rDlnFph3zj9KopIWBZgMtanbc+fVXpolBUDcYLf LND7ED7amofmHTV8LznhpkQxNDmVvUlORVdwsZyM1qUXAWsjtkBbqT26Pb5NOQqDJlfJDUagYmoNy B4rM3r5xgJJGTBe6KW40YEO/qv28r9mpw3OffPDl+QeaKhNz7BTbZ+DFszG1gcOO2aPG/MDFLfsrw E9rVu5N3bYIvQ+bmNb1NEA==; In-Reply-To: (message from Eshel Yaron on Sun, 07 Jul 2024 13:50:35 +0200) 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:288560 Archived-At: > From: Eshel Yaron > Cc: sbaugh@janestreet.com, 71504@debbugs.gnu.org > Date: Sun, 07 Jul 2024 13:50:35 +0200 > > Eli Zaretskii writes: > > >> It'd be good to enhance compilation buffers as well, but this feature > >> request is about interaction with Flymake diagnostics, that are shown in > >> the diagnosed buffer: I'd like to have a standard way to act on (fix) > >> the diagnostic at point. > > > > I frankly don't understand what you are saying here. Several people > > opined that we should take a broader view on the fixes and how to > > handle them, but you insist that Flymake should have its own solution? > > No. I only insist that there should be a command for fixing the > Flymake diagnostic at point. If it's part of a "broader solution", > that's swell. > > > IOW, the "fixes" diagnostic shown by Flymake is not just diagnostic, > > it's a suggestion to make some change in the source code. > > I think there is a misunderstanding here: it's not about specific > diagnostics which represent fixes, this is about enriching > (potentially) all diagnostics with backend-provided fix suggestions, > and adding a command that applies such fixes. For example, with my > implementation I use the same command for fixing checkdoc, shellcheck > and LSP diagnostics. > > > So supporting that cannot be separated from the more general concept > > of making changes proposed by some external tool. Or what am I > > missing? > > IIUC, I think I agree. In my implementation, Flymake delegates the > application of the code changes to another library, that includes a > general purpose function for applying code changes. > > > Or maybe this is a simple misunderstanding: what do you mean by > > "acting on diagnostic at point" > > Applying a suggested code change that resolves the diagnostic. > > > , and how could such an act be indifferent to what and how is fixed? > > A single command should let you fix diagnostics from different sources > (backends). It doesn't need to be indifferent, just consistent. > > Does that make sense? It sounds like we all agree, but then what is the problem?