From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: Adding fix suggestions to Flymake diagnostics Date: Sun, 26 May 2024 21:24:52 +0100 Message-ID: References: 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="24266"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Spencer Baugh , emacs-devel@gnu.org To: Eshel Yaron Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun May 26 22:26:02 2024 Return-path: Envelope-to: ged-emacs-devel@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 1sBKRO-00063T-5z for ged-emacs-devel@m.gmane-mx.org; Sun, 26 May 2024 22:26:02 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sBKQd-0003TX-L8; Sun, 26 May 2024 16:25:15 -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 1sBKQW-0003Qq-SW for emacs-devel@gnu.org; Sun, 26 May 2024 16:25:08 -0400 Original-Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sBKQU-00086d-Ug for emacs-devel@gnu.org; Sun, 26 May 2024 16:25:08 -0400 Original-Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-5238fe0cfc9so4488352e87.0 for ; Sun, 26 May 2024 13:25:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716755104; x=1717359904; darn=gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=K8pfxsEAB5u8tJUkXLwo6bhYCJ41330IyFHEoxEStZU=; b=LfxmwmEtK/2tNqgtpHiduyEoqhseFqHuC+HpSE/40Drn27m5jcXfzfgjFoNcxGRJ7n od0bu2yAVZgJuDmbijaAbRmwqVE+GkPG1XGOo3Gq2dqiLpQGKDn1uoZ5JlsrvPdgVZSF mFIkiQHYWlLcnnDseBkPci+NopOhWnyC7t/yD/OskCGBRVNJO/dzSdRKW3zRMfiZBNpW Gx7HL6y8erSZrgagWctAawBga3xIf+2tF8W0s5pAk+n5jkVYcyciwNHhnUxjvQbpBgN9 RelAMejS9Ci8rpRzSvE+CRh15lzx3+K0IvD5IJbE1LzRP23M2wgnWRX5QdlMtZ26FOji Yocg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716755104; x=1717359904; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=K8pfxsEAB5u8tJUkXLwo6bhYCJ41330IyFHEoxEStZU=; b=IL4BnGIs/PXDzZmt5Igp6WFiBdaxPaDIkAy73AwJUxaMelhv1c5j8D5h6po5VbJioz g5D0OzWfZ2P9kir6O/tFfEpxE9npQpIOxX8AfL2PmrXhWHqaXMcFPCPNc2MXL5GwOxSV 5X5Cme7I+6GhefogFxlCLMYeUs/a21F0+F4YLXEeE2N+mI5LsdM069cDyhwE9302J9/t lwSyyfc2zf9HXnWhfBrin2nDuBrWE60Up9URG4GVGpg3NbYi4FqZvdVWOtXcXhkFhwx3 X9sFdraWxS9FxoWIwMuK9SqtUtWpMasq9j6Xs9oQSfMF1FMD24R46bCSIK0hgaBR4ADO NuHA== X-Forwarded-Encrypted: i=1; AJvYcCXfCwwAUDGGGtwjBVRbs9vUF+8vSSu3GgPRVBGpqLaFph44wPPO7QkyrbrN08UF1MlLihJve3Qd9dgW/X9RIURlTuP8 X-Gm-Message-State: AOJu0Yw/Tihg8XmqUJjjZmaaNqsTa4ELqZz5ZAziSUSlqmgcCeWfqHAK 8dqZ2ISpt3yJ18HOEZVdOxh+C57TMZfDJGGF/EYxDTqVQxfoxgwmNrHJIcLwT+9l0EKp2dfa3Wm JAjh53RePUWjxcHsjrL1iHLey/5ykqTr+ X-Google-Smtp-Source: AGHT+IE+3iw/qhNuhzfcZhNfX2TkAxbV2FRXke7Ml6PilNVJmvYz2XKtqfZkpTSwVAqZcx3iusfrHf3OaKVydF1Uh4M= X-Received: by 2002:a19:5f41:0:b0:51f:3e41:efd8 with SMTP id 2adb3069b0e04-529448ac1c4mr2154060e87.1.1716755104069; Sun, 26 May 2024 13:25:04 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::132; envelope-from=joaotavora@gmail.com; helo=mail-lf1-x132.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:319592 Archived-At: On Sun, May 26, 2024 at 4:56=E2=80=AFPM Eshel Yaron wro= te: ntext menu > > Yes, Flymake lets backends associate arbitrary overlay properties with > diagnostics, but that requires backends to worry about UI stuff. 100% Agree. And indeed Eglot would like not to worry about UI, but it has to on more than one occasion. So if you want to lift Eglot's diagnostic-fi= xing things out of there, I suggest lifting them into another library that is *n= ot* Flymake. That library would tend to be the new refactor.el, which would always need an "edit" concept of its own (with more or less similarities to LSP). Ideally refactor.el would give eglot.el a function (or more likely a macro) to simplify what is currently done ca. lines 2287 of eglot.el ("Flymake customization") and also a drop-in replacement (or near-drop-in) for eglot-code-actions-at-mouse. Flymake.el would remain ignorant of what an edit is, which is a good thing in my book. > I'm not suggesting to change anything about eglot-rename and friends. Well, I'm encouraging you to :-) I gave your refactor.el a *very* cursory read but it seems to be at least more or less the length and complexity I envisioned such a library having. It has its own concept of edit, seems to know how to present things as diffs, all good things. The tricky part if I remember was how to talk to the backend about the kinds of actions available. Maybe I'm misremembering. Anyway, refactor.el is definitely where I would put all this with an eye to slashing great as much Eglot UI code as possible. Jo=C3=A3o