From unknown Tue Jun 17 20:20:26 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#77439 <77439@debbugs.gnu.org> To: bug#77439 <77439@debbugs.gnu.org> Subject: Status: [PATCH] Eglot: introduce eglot-show-diagnostics-source Reply-To: bug#77439 <77439@debbugs.gnu.org> Date: Wed, 18 Jun 2025 03:20:26 +0000 retitle 77439 [PATCH] Eglot: introduce eglot-show-diagnostics-source reassign 77439 emacs submitter 77439 Nicol=C3=A1s Ojeda B=C3=A4r severity 77439 normal tag 77439 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 01 16:58:54 2025 Received: (at submit) by debbugs.gnu.org; 1 Apr 2025 20:58:54 +0000 Received: from localhost ([127.0.0.1]:51677 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tzihB-00016Z-5x for submit@debbugs.gnu.org; Tue, 01 Apr 2025 16:58:54 -0400 Received: from lists.gnu.org ([2001:470:142::17]:41532) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tzih8-00015V-N2 for submit@debbugs.gnu.org; Tue, 01 Apr 2025 16:58:51 -0400 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 1tzih2-0006vf-E4 for bug-gnu-emacs@gnu.org; Tue, 01 Apr 2025 16:58:44 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tzih0-0008PU-0i for bug-gnu-emacs@gnu.org; Tue, 01 Apr 2025 16:58:44 -0400 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-39c2688619bso595839f8f.1 for ; Tue, 01 Apr 2025 13:58:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743541117; x=1744145917; darn=gnu.org; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=wouh8e11o7LXyLEf9Uz6hcswFxHGcjKabiAwtWDz/l4=; b=ExGjPaMonzX0EZjmMyno1eS6RyJYVSmcvRNak7CieoIaDM78vu0umAzI8O9JoVYpEd KcQrzMHaGMfob4EMpyyKlnav/11z8EvajkwT+nWPW3u/yFXuiffJaYHg0ncmyaH7YR66 60giSJVH+rWkS7JFIU0UL0bljT+H890q3zdP2m4q5RMEYIXi+gKqotv5vcr2/RHpk1kT E9EhpLk7vN3EPunnv3ArP06kCpaJ4XCrH/WHwSBBCHI3ibheSvV8vmW9Jzy+eS08T/p7 rrchXMRDYJKa4O7qjt5OcUfIx0wV+igcsB6+79+W76bzJyKDai36WstfKoFuIS+3QTgy oghQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743541117; x=1744145917; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=wouh8e11o7LXyLEf9Uz6hcswFxHGcjKabiAwtWDz/l4=; b=a37eYhDd3F4+TPB2kG4BRbKLBoftTQZtI1qNYkJW6h2QyVG84THjezVS3P7Lw26Hh9 c55DxEtLxl1BDaXqqM33B9BwN0Vc5NFyR4LBVpeX9D3WNKKjTCPrywkOnjxeDUV64OmH JjkpJF4G0efdIgOs8r5ZppnXkN3dhnwUQ/bCNBAb5EAeSXMXa/5gTy8Zjb6c+kpN8fRx MtBTcIbfLQhRIeSBuh3NNRaYsiTeqJyZ1KMSZby+ZFM6YqAJWE0Rxzitm5gbaHHCZ5uv gvBXS079XHadH6fodOFGZ2I654R2wL2x8y6lkJKdTPTEcIFlGCtJG4aRzSP4zkfW9Kdy kjxg== X-Gm-Message-State: AOJu0Yx29CKuJN6+AF83qWDQHGykLdW4N8Li1cAblrx3szcfEvIVff4m vjMRUcVnQ06RWwskHgf88wlqJEjoR5BhTi5XUh9ptvVBnumsgG7YMf4BNBPu X-Gm-Gg: ASbGncviHhfW28cDMzm+XFgljzKwm30hdKSsDjW8FHYmNkztirdUduAM8uPw2VqtlTi 4uOIGBgHDOarC9K/xaqa1BFKCkKNfa8ba9/YkC+N+KUshx1Y+RPFRVXPf2ILd1OvydPtfl+9H20 fxWHcm+NMO84feBD9VsZn6M09mJesBtBOtTWsdR5nShJ/0dujhshqrT3N2jlEJ/BdyzZ0B1hQ4k ectCBGPk9Ts2g8foXdqeeK2ks554LFcWZuWcOQ3DBfMHMvhkpk/13RdpL0MvIskJ2wyY1nXdQKm sU0hn//VmI36allYAzEhp8CSTxbI2NMfnQu4IWE69QYpxlboBH+EpbYZTXfvd9zO5uMflA== X-Google-Smtp-Source: AGHT+IFgH7JeDnrEdfCSEzJul2R8K/FradzECqxM50y1gYP0bcpIsm3dntSdqUVKbFzs9vUFZEZQ+Q== X-Received: by 2002:a05:6000:1ac8:b0:39c:cc7:3c5f with SMTP id ffacd0b85a97d-39c2366af22mr3698110f8f.45.1743541116667; Tue, 01 Apr 2025 13:58:36 -0700 (PDT) Received: from LEXIFI-L6 (89.91.65.81.rev.sfr.net. [81.65.91.89]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43ea8d16049sm22241925e9.0.2025.04.01.13.58.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Apr 2025 13:58:36 -0700 (PDT) From: =?utf-8?Q?Nicol=C3=A1s_Ojeda_B=C3=A4r?= To: bug-gnu-emacs@gnu.org Subject: [PATCH] Eglot: introduce eglot-show-diagnostics-source X-Debbugs-Cc: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Date: Tue, 01 Apr 2025 22:58:35 +0200 Message-ID: <877c434n0k.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=n.oje.bar@gmail.com; helo=mail-wr1-x42e.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 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Tags: patch Dear developers (Cc: Jo=C3=A3o T=C3=A1vora), This small patch introduces a new variable eglot-show-diagnostics-source which controls whether Eglot prefixes every diagnostic with the name of its source. When only one source is active, this information is not useful and its repetition for every diagnostic wastes screen real estate. This addition has already been discussed (and accepted in principle) in GitHub: https://github.com/joaotavora/eglot/issues/1501 I tried to follow the existing conventions for the patch and its documentation, but this is my first contribution to Emacs, so please do not hesitate to point out if I missed anything. I am looking forward to any feedback you may have on this patch. Thanks. Cheers, Nicolas --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Eglot-introduce-eglot-show-diagnostics-source.patch >From 14b3e3397d831c319ea865f4bfea81fe1d0dfb75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Ojeda=20B=C3=A4r?= Date: Tue, 1 Apr 2025 22:24:21 +0200 Subject: [PATCH] Eglot: introduce eglot-show-diagnostics-source Setting this variable to nil causes Eglot to stop prefixing every diagnostic with the name of the source of the diagnostic. This can be useful when only one source is active, to reduce the repetition of the same information in every diagnostic. * lisp/progmodes/eglot.el (eglot-handle-notification): Take new variable into account. * doc/misc/eglot.texi (Customizing Eglot): Mention new variable. * etc/EGLOT-NEWS: Mention new variable. --- doc/misc/eglot.texi | 7 +++++++ etc/EGLOT-NEWS | 7 +++++++ lisp/progmodes/eglot.el | 12 +++++++++++- 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/doc/misc/eglot.texi b/doc/misc/eglot.texi index fac90562f6b..f483611541a 100644 --- a/doc/misc/eglot.texi +++ b/doc/misc/eglot.texi @@ -1050,6 +1050,13 @@ Other Variables Note that you can still configure the excluded Emacs features manually to use Eglot in your @code{eglot-managed-mode-hook} or via some other mechanism. + +@item eglot-show-diagnostics-source +Typically Eglot prefixes each diagnostic with the name of the source of +the diagnostic. However, when only one source is active, the same +information is repeated in all diagnostics which may not be useful. In +that case, this variable can be set to nil to supress the addition of +this information to each diagnostic. @end table @node More Customization diff --git a/etc/EGLOT-NEWS b/etc/EGLOT-NEWS index 7b53d5943ba..125935c001e 100644 --- a/etc/EGLOT-NEWS +++ b/etc/EGLOT-NEWS @@ -20,6 +20,13 @@ https://github.com/joaotavora/eglot/issues/1234. * Changes in upcoming Eglot +** New 'eglot-show-diagnostics-source' variable + +Eglot typically includes the name of the source of each diagnostic +reported by the LSP server. Setting this variable to nil inhibits this +behaviour and can be useful when only one source is active to avoid +repeating the same information in every diagnostic. + ** Support for call and type hierarchies The new commands 'eglot-show-type-hierarchy' and diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index c937283122e..5a367787a8d 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -581,6 +581,12 @@ eglot-advertise-cancellation servers." :type 'boolean) +(defcustom eglot-show-diagnostics-source t + "If non-nil, Eglot advertises the source of each diagnostics by +prefixing the diagnostic with the source name. Set this to nil to +inhibit this behaviour." + :type 'boolean) + (defface eglot-code-action-indicator-face '((t (:inherit font-lock-escape-face :weight bold))) "Face used for code action suggestions.") @@ -2667,7 +2673,11 @@ eglot-handle-notification ((= sev 2) 'eglot-warning) (t 'eglot-note))) (mess (source code message) - (concat source (and code (format " [%s]" code)) ": " message)) + (let ((source (and eglot-show-diagnostics-source source))) + (cond ((and (null code) (null source)) message) + ((null code) (format "%s: %s" source message)) + ((null source) (format "[%s]: %s" code message)) + (t (format "%s [%s]: %s" source code message))))) (find-it (abspath) ;; `find-buffer-visiting' would be natural, but calls the ;; potentially slow `file-truename' (bug#70036). -- 2.48.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 01 17:46:48 2025 Received: (at 77439) by debbugs.gnu.org; 1 Apr 2025 21:46:48 +0000 Received: from localhost ([127.0.0.1]:51869 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tzjRY-0007aY-DS for submit@debbugs.gnu.org; Tue, 01 Apr 2025 17:46:48 -0400 Received: from mail-oa1-x35.google.com ([2001:4860:4864:20::35]:49258) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tzjRW-0007ZX-B1 for 77439@debbugs.gnu.org; Tue, 01 Apr 2025 17:46:46 -0400 Received: by mail-oa1-x35.google.com with SMTP id 586e51a60fabf-2c77a5747e0so3498403fac.2 for <77439@debbugs.gnu.org>; Tue, 01 Apr 2025 14:46:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743544000; x=1744148800; darn=debbugs.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=j98w4yObF6YOUPDhy2QlUAcVbeuocNDWcT9VtTxWiiM=; b=BB/oj2Sks2Fq/ycHuELOAxGZfCdncuUyhGRUqFW6Krknp9lArMZlDhiZXhOHXrAJYf cTgh+lhdNJO2QHlHftKQz/FK+i1LGyVZ8Sila5TVtD4NtBGofD1CLvmBf14KWa58QiRl btpEBt2iMLiNu8Tk28DhW1qS5BGcawm0tGXfUeeF7dbAFMG4MZ7UZA2VuptohcVUhoJu lJaVvihHm55+NLmLIJVq66Nczw8Qams0dvJiA1MY1UqC7dyxipHgPLUFNpys8PRd/DCB zoBO6TcdKwFjnQ4aKLS7BFTXW5lAcwvDRPmhSwQ4b41zGc0bNQrb2y7qPac5x4k9BEN3 AgGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743544000; x=1744148800; 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=j98w4yObF6YOUPDhy2QlUAcVbeuocNDWcT9VtTxWiiM=; b=BaTF6Nt1dJf13err3hxPYO9JgkperYZOJxPYpbhTe1N4m5SiH9mdUoxfEfuRiFsnOt 4cYsMdFpGwMvHLgeYQ1OT4EIK5UPjIuTzBFXyGEsiH53Z7+drsroWU7YIJCH5mlaWNI9 Zsqwfo22/mZxaNtamGFSpYJ0b8RH5s/Cpboe/s1frwZswAcNam2nzbtwiO91bBiYYUnH Q+MZ9oSSk7eHoXRUoL7iK/hxEPUDDODMSln7INz9BgR0vCbOjnp73Kgmx9XFPfCI1FCn zRgy4LWQ8UfcNZAmHliSoDBFad7QqkUKo4ihKA3YWFhEPgWtyK3Z9QzaI6Yr5GtsF907 seQw== X-Gm-Message-State: AOJu0YwSuCyzqMoc+JrkXKjWJ8QCv65qEaeiafMqERzspKJXOZci2x21 1MFHD9WahEUcmBtDcNCRTF4TdF1Z1KWUSoXo2wMSy3DJeNE2VgyoMW9mnoza8sW4GZQFDNXsmp6 ejeL7sq4VrkQCJrtnp9HGMXWlbMo= X-Gm-Gg: ASbGncsDa2LLjD27QhMf3QUTekwNkY3srtcZsrowjjecJmPAoKTnf39XrNUccpw7wYn AO+qdqLb5Z7oiQe2qYTOqzjEoSR/fs1kJCFYkEIjgUY6huIrLoXv+ERknuo9Q7RVxrwrpOhS9rE Q6w6k6ljqk6TwKnVfVUZTvVbkIAA== X-Google-Smtp-Source: AGHT+IFV4RNiRE4Q/E1u77j/8hCH3CI5FQ3stxhMcB6PsF67svbuqd71eimcSdUsalZ/zMBd8Ia0XaPk6Vd46HiwpfA= X-Received: by 2002:a05:6871:608c:b0:2c2:30ca:8da1 with SMTP id 586e51a60fabf-2cc60b81f6fmr86814fac.17.1743544000436; Tue, 01 Apr 2025 14:46:40 -0700 (PDT) MIME-Version: 1.0 References: <877c434n0k.fsf@gmail.com> In-Reply-To: <877c434n0k.fsf@gmail.com> From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Date: Tue, 1 Apr 2025 22:47:02 +0100 X-Gm-Features: AQ5f1Jr_iA6HNbZu8R_oj8k8voxgHQRIP_0vJIDDG-SHBimZTzwEjBB7761HVYg Message-ID: Subject: Re: bug#77439: [PATCH] Eglot: introduce eglot-show-diagnostics-source To: =?UTF-8?Q?Nicol=C3=A1s_Ojeda_B=C3=A4r?= , Eli Zaretskii Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 77439 Cc: 77439@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Tue, Apr 1, 2025 at 9:59=E2=80=AFPM Nicol=C3=A1s Ojeda B=C3=A4r wrote: > > Tags: patch > > Dear developers (Cc: Jo=C3=A3o T=C3=A1vora), > > This small patch introduces a new variable eglot-show-diagnostics-source > which controls whether Eglot prefixes every diagnostic with the name of Thanks. The patch looks good and ticks all the boxes. Well almost, there are some minor details I didn't tell you about and are easy to miss. * two spaces between sentences in documentation. * the first line of the docstring should be a complete sentence and fit in a line when the docstring is formatted with M-q * perhaps some other micro things I missed * the code used concat to handle the nilness of source/code, this one is more explicit. i can live with that though, maybe it's better like this= . The most important and boring thing will be to figure out if you need a copyright assignment for this contribution. Maybe not, if it counts as a "trivial" patch, but you should probably get one started regardless. Eli, please advise. Jo=C3=A3o From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 02 02:39:40 2025 Received: (at 77439) by debbugs.gnu.org; 2 Apr 2025 06:39:41 +0000 Received: from localhost ([127.0.0.1]:53947 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tzrlE-00076L-KL for submit@debbugs.gnu.org; Wed, 02 Apr 2025 02:39:40 -0400 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]:46103) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tzrlB-00075I-Ry for 77439@debbugs.gnu.org; Wed, 02 Apr 2025 02:39:38 -0400 Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-5e8be1bdb7bso10374354a12.0 for <77439@debbugs.gnu.org>; Tue, 01 Apr 2025 23:39:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743575972; x=1744180772; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=T/t4nWVgGuJTwzQvzbzZxIxqvdW8OLnixQ9H2sq0Mso=; b=EwXaTEZwZADItPUeaPzEXh1ow8kmuUQdNFKzzhU8L6eDnG/13sy9VFkaH4/Uf4Oqzp mSV4N4JtOJ33C6AO2YHy2iuVcuxTOPoIPSDREhh/VZ2v9JG40RWpIf9vZUv7dXsof93E vZxJ3uaZxC7IyAAQl0ZNShPzeAPSrh2pWb8fd+IRM5SyxQvMXA9GZstH/KaslkQulWMf eD0CIPY8jvRVFho/xEvmPY0hMcEKB12fEr3yMI90aOMx/gvh4dxUb+6PEhjEE/lafw7x zRIxFsgqkpbrtw1KRH1McBMInVRdwCLtxY8wt1bK5XguAUKFpUrGDaHr202MZnEzV3Vm TQTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743575972; x=1744180772; h=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=T/t4nWVgGuJTwzQvzbzZxIxqvdW8OLnixQ9H2sq0Mso=; b=Sl0g/wQ7mNlIKUdcPVs/dx1yd51T8dQdust6p2oI8uQWyfAcszy1AzviAwHPBGhlvW W0A5wp2/Mw1X0Jrj8n/TF4YMgAs0G+lqArkHqjZlcDWIMxWlEmMnt+D+jyvQ0T0dldBu VWH985qE36D4o64YJJsChgRNexKraPPD69QolWA7GiwMKC6cz4M9Y40pQwLU3d4OOvE7 EqBKZ1AHam5xOllCs1YXOEtXlk7NCIR8prRChzgSnb4drRGkJEgq5JMPA2b3YgAH6V8a sC4t3VwS+rkdWPUCYpXjwB+fc53k/nh2yvA5VzBIcHg//1q3D8wu2euiSdtFl4jELupS pdZg== X-Forwarded-Encrypted: i=1; AJvYcCUGC2IzTOk6pmcgbET0zFKQJeHSfLYpxzXMS4LnA8WsgXrFztiV6xebhfHczWisM4HFK5kAlA==@debbugs.gnu.org X-Gm-Message-State: AOJu0YwbEX+NNnZvwInjdMvxKcIGLXYitMCRdcKBTrolqWfFNA1j55Wr bVJjYq+W1NOHft/3kKkkXQ4tCWjlCvaJjYOzcgknNkkXU2QUuWRmgmtBXJJojrf/YrXqlNJVcf1 SuNZZvyAjja4hhtaEfxr3qo2+t/s= X-Gm-Gg: ASbGncuFBdpZKdWyA6/cFaB9CXW4v4j7AxJ9yHVZrS1lN62f9c688XF4chpeU9j+bc8 Ely17P4R3wvuR8gLRroqlswSqmy43qdnEhkvc0py9pBy/ZqCmLeKPwsTGXfc61oWXHTPR7LZIqC q0E+Ct2lOr719xmSashIq0OpSp5f2GzsbvJ2sKbpdiU+SdfjCKrGmXXIZIp28B3N5RnsZ2 X-Google-Smtp-Source: AGHT+IG2akzOzckyYroqvcjQpif/fSP0PNix4yF8rsuh5MJ+9QJYsC/8peU+1QO0sCvmNjtzrVHPSBpACduzxagomkU= X-Received: by 2002:a17:907:a08a:b0:ac7:7e2c:68e9 with SMTP id a640c23a62f3a-ac7a173099bmr88635266b.25.1743575971323; Tue, 01 Apr 2025 23:39:31 -0700 (PDT) MIME-Version: 1.0 References: <877c434n0k.fsf@gmail.com> In-Reply-To: From: =?UTF-8?Q?Nicol=C3=A1s_Ojeda_B=C3=A4r?= Date: Wed, 2 Apr 2025 08:39:04 +0200 X-Gm-Features: AQ5f1Jq5oP56a97CgZ7o94tRUAOE58NZ_poaS1JXGoezi6ZRn9TdPjYpLaSn7Jg Message-ID: Subject: Re: bug#77439: [PATCH] Eglot: introduce eglot-show-diagnostics-source To: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Content-Type: multipart/mixed; boundary="0000000000006933070631c5ea18" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 77439 Cc: 77439@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --0000000000006933070631c5ea18 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Dear Jo=C3=A3o, Thanks for the quick reply. I'm including here a revised version of the pat= ch. On Tue, Apr 1, 2025 at 11:46=E2=80=AFPM Jo=C3=A3o T=C3=A1vora wrote: > > Thanks. The patch looks good and ticks all the boxes. Well almost, > there are some minor details I didn't tell you about and are easy to mis= s. > > * two spaces between sentences in documentation. Fixed, thanks. > * the first line of the docstring should be a complete sentence and > fit in a line when the docstring is formatted with M-q Fixed, thanks. > * perhaps some other micro things I missed > * the code used concat to handle the nilness of source/code, this one > is more explicit. i can live with that though, maybe it's better like th= is. OK, I left this part of the code as it is. > The most important and boring thing will be to figure out if you need > a copyright assignment for this contribution. Maybe not, if it counts > as a "trivial" patch, but you should probably get one started > regardless. Eli, please advise. Actually, I believe I have a copyright assignment on file from long time ag= o. Otherwise, let me know and I'll submit the papers. Thanks! Cheers, Nicolas > Jo=C3=A3o --0000000000006933070631c5ea18 Content-Type: application/octet-stream; name="0001-Eglot-introduce-eglot-show-diagnostics-source.patch" Content-Disposition: attachment; filename="0001-Eglot-introduce-eglot-show-diagnostics-source.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_m8zk0os00 RnJvbSBhNTdlZWIzNzM2MThhYTliNTZjODk1YmMzYzg3M2VkYTJjNmU2NjcwIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiA9P1VURi04P3E/Tmljb2w9QzM9QTFzPTIwT2plZGE9MjBCPUMz PUE0cj89IDxuLm9qZS5iYXJAZ21haWwuY29tPgpEYXRlOiBUdWUsIDEgQXByIDIwMjUgMjI6MjQ6 MjEgKzAyMDAKU3ViamVjdDogW1BBVENIXSBFZ2xvdDogaW50cm9kdWNlIGVnbG90LXNob3ctZGlh Z25vc3RpY3Mtc291cmNlCgpTZXR0aW5nIHRoaXMgdmFyaWFibGUgdG8gbmlsIGNhdXNlcyBFZ2xv dCB0byBzdG9wIHByZWZpeGluZyBldmVyeQpkaWFnbm9zdGljIHdpdGggdGhlIG5hbWUgb2YgdGhl IHNvdXJjZSBvZiB0aGUgZGlhZ25vc3RpYy4gIFRoaXMgY2FuIGJlCnVzZWZ1bCB3aGVuIG9ubHkg b25lIHNvdXJjZSBpcyBhY3RpdmUsIHRvIHJlZHVjZSB0aGUgcmVwZXRpdGlvbiBvZiB0aGUKc2Ft ZSBpbmZvcm1hdGlvbiBpbiBldmVyeSBkaWFnbm9zdGljLgoKKiBsaXNwL3Byb2dtb2Rlcy9lZ2xv dC5lbCAoZWdsb3QtaGFuZGxlLW5vdGlmaWNhdGlvbik6IFRha2UgbmV3IHZhcmlhYmxlCiAgaW50 byBhY2NvdW50LgoKKiBkb2MvbWlzYy9lZ2xvdC50ZXhpIChDdXN0b21pemluZyBFZ2xvdCk6IE1l bnRpb24gbmV3IHZhcmlhYmxlLgoKKiBldGMvRUdMT1QtTkVXUzogTWVudGlvbiBuZXcgdmFyaWFi bGUuCi0tLQogZG9jL21pc2MvZWdsb3QudGV4aSAgICAgfCAgNyArKysrKysrCiBldGMvRUdMT1Qt TkVXUyAgICAgICAgICB8ICA3ICsrKysrKysKIGxpc3AvcHJvZ21vZGVzL2VnbG90LmVsIHwgMTMg KysrKysrKysrKysrLQogMyBmaWxlcyBjaGFuZ2VkLCAyNiBpbnNlcnRpb25zKCspLCAxIGRlbGV0 aW9uKC0pCgpkaWZmIC0tZ2l0IGEvZG9jL21pc2MvZWdsb3QudGV4aSBiL2RvYy9taXNjL2VnbG90 LnRleGkKaW5kZXggZmFjOTA1NjJmNmIuLjhkNzdiNjY1MGVmIDEwMDY0NAotLS0gYS9kb2MvbWlz Yy9lZ2xvdC50ZXhpCisrKyBiL2RvYy9taXNjL2VnbG90LnRleGkKQEAgLTEwNTAsNiArMTA1MCwx MyBAQCBPdGhlciBWYXJpYWJsZXMKIE5vdGUgdGhhdCB5b3UgY2FuIHN0aWxsIGNvbmZpZ3VyZSB0 aGUgZXhjbHVkZWQgRW1hY3MgZmVhdHVyZXMgbWFudWFsbHkKIHRvIHVzZSBFZ2xvdCBpbiB5b3Vy IEBjb2Rle2VnbG90LW1hbmFnZWQtbW9kZS1ob29rfSBvciB2aWEgc29tZSBvdGhlcgogbWVjaGFu aXNtLgorCitAaXRlbSBlZ2xvdC1zaG93LWRpYWdub3N0aWNzLXNvdXJjZQorVHlwaWNhbGx5IEVn bG90IHByZWZpeGVzIGVhY2ggZGlhZ25vc3RpYyB3aXRoIHRoZSBuYW1lIG9mIGl0cyBzb3VyY2Uu CitIb3dldmVyLCB3aGVuIG9ubHkgb25lIHNvdXJjZSBpcyBhY3RpdmUsIHRoZSBzYW1lIGluZm9y bWF0aW9uIGlzCityZXBlYXRlZCBpbiBhbGwgZGlhZ25vc3RpY3Mgd2hpY2ggbWF5IG5vdCBiZSB1 c2VmdWwuICBJbiB0aGF0IGNhc2UsIHRoaXMKK3ZhcmlhYmxlIGNhbiBiZSBzZXQgdG8gbmlsIHRv IHN1cHJlc3MgdGhlIGFkZGl0aW9uIG9mIHRoaXMgaW5mb3JtYXRpb24KK3RvIGVhY2ggZGlhZ25v c3RpYy4KIEBlbmQgdGFibGUKIAogQG5vZGUgTW9yZSBDdXN0b21pemF0aW9uCmRpZmYgLS1naXQg YS9ldGMvRUdMT1QtTkVXUyBiL2V0Yy9FR0xPVC1ORVdTCmluZGV4IDdiNTNkNTk0M2JhLi5jZDlj MDJhMmM1ZiAxMDA2NDQKLS0tIGEvZXRjL0VHTE9ULU5FV1MKKysrIGIvZXRjL0VHTE9ULU5FV1MK QEAgLTIwLDYgKzIwLDEzIEBAIGh0dHBzOi8vZ2l0aHViLmNvbS9qb2FvdGF2b3JhL2VnbG90L2lz c3Vlcy8xMjM0LgogDAogKiBDaGFuZ2VzIGluIHVwY29taW5nIEVnbG90CiAKKyoqIE5ldyAnZWds b3Qtc2hvdy1kaWFnbm9zdGljcy1zb3VyY2UnIHZhcmlhYmxlCisKK0VnbG90IHR5cGljYWxseSBp bmNsdWRlcyB0aGUgbmFtZSBvZiB0aGUgc291cmNlIG9mIGVhY2ggZGlhZ25vc3RpYworcmVwb3J0 ZWQgYnkgdGhlIExTUCBzZXJ2ZXIuICBTZXR0aW5nIHRoaXMgdmFyaWFibGUgdG8gbmlsIGluaGli aXRzIHRoaXMKK2JlaGF2aW91ciBhbmQgY2FuIGJlIHVzZWZ1bCB3aGVuIG9ubHkgb25lIHNvdXJj ZSBpcyBhY3RpdmUgdG8gYXZvaWQKK3JlcGVhdGluZyB0aGUgc2FtZSBpbmZvcm1hdGlvbiBpbiBl dmVyeSBkaWFnbm9zdGljLgorCiAqKiBTdXBwb3J0IGZvciBjYWxsIGFuZCB0eXBlIGhpZXJhcmNo aWVzCiAKIFRoZSBuZXcgY29tbWFuZHMgJ2VnbG90LXNob3ctdHlwZS1oaWVyYXJjaHknIGFuZApk aWZmIC0tZ2l0IGEvbGlzcC9wcm9nbW9kZXMvZWdsb3QuZWwgYi9saXNwL3Byb2dtb2Rlcy9lZ2xv dC5lbAppbmRleCBjOTM3MjgzMTIyZS4uNDQ0NWY0YTA5MDAgMTAwNjQ0Ci0tLSBhL2xpc3AvcHJv Z21vZGVzL2VnbG90LmVsCisrKyBiL2xpc3AvcHJvZ21vZGVzL2VnbG90LmVsCkBAIC01ODEsNiAr NTgxLDEzIEBAIGVnbG90LWFkdmVydGlzZS1jYW5jZWxsYXRpb24KIHNlcnZlcnMuIgogICA6dHlw ZSAnYm9vbGVhbikKIAorKGRlZmN1c3RvbSBlZ2xvdC1zaG93LWRpYWdub3N0aWNzLXNvdXJjZSB0 CisgICJJZiBub24tbmlsLCBFZ2xvdCBwcmVmaXhlcyBlYWNoIGRpYWdub3N0aWNzIHdpdGggdGhl IG5hbWUgb2YgaXRzIHNvdXJjZS4KK1NldCB0byBuaWwgdG8gaW5oaWJpdCB0aGlzIGJlaGF2aW91 ci4gIFRoaXMgbWF5IGJlIHVzZWZ1bCB3aGVuIG9ubHkgb25lCitzb3VyY2UgaXMgYWN0aXZlLCB0 byBhdm9pZCByZXBlYXRpbmcgdGhlIHNhbWUgaW5mb3JtYXRpb24gaW4gZXZlcnkKK2RpYWdub3N0 aWMuIgorICA6dHlwZSAnYm9vbGVhbikKKwogKGRlZmZhY2UgZWdsb3QtY29kZS1hY3Rpb24taW5k aWNhdG9yLWZhY2UKICAgJygodCAoOmluaGVyaXQgZm9udC1sb2NrLWVzY2FwZS1mYWNlIDp3ZWln aHQgYm9sZCkpKQogICAiRmFjZSB1c2VkIGZvciBjb2RlIGFjdGlvbiBzdWdnZXN0aW9ucy4iKQpA QCAtMjY2Nyw3ICsyNjc0LDExIEBAIGVnbG90LWhhbmRsZS1ub3RpZmljYXRpb24KICAgICAgICAg ICAgICAgICAgICAgKCg9IHNldiAyKSAgJ2VnbG90LXdhcm5pbmcpCiAgICAgICAgICAgICAgICAg ICAgICh0ICAgICAgICAgICdlZ2xvdC1ub3RlKSkpCiAgICAgICAgICAgICAobWVzcyAoc291cmNl IGNvZGUgbWVzc2FnZSkKLSAgICAgICAgICAgICAgKGNvbmNhdCBzb3VyY2UgKGFuZCBjb2RlIChm b3JtYXQgIiBbJXNdIiBjb2RlKSkgIjogIiBtZXNzYWdlKSkKKyAgICAgICAgICAgICAgKGxldCAo KHNvdXJjZSAoYW5kIGVnbG90LXNob3ctZGlhZ25vc3RpY3Mtc291cmNlIHNvdXJjZSkpKQorICAg ICAgICAgICAgICAgIChjb25kICgoYW5kIChudWxsIGNvZGUpIChudWxsIHNvdXJjZSkpIG1lc3Nh Z2UpCisgICAgICAgICAgICAgICAgICAgICAgKChudWxsIGNvZGUpIChmb3JtYXQgIiVzOiAlcyIg c291cmNlIG1lc3NhZ2UpKQorICAgICAgICAgICAgICAgICAgICAgICgobnVsbCBzb3VyY2UpIChm b3JtYXQgIlslc106ICVzIiBjb2RlIG1lc3NhZ2UpKQorICAgICAgICAgICAgICAgICAgICAgICh0 IChmb3JtYXQgIiVzIFslc106ICVzIiBzb3VyY2UgY29kZSBtZXNzYWdlKSkpKSkKICAgICAgICAg ICAgIChmaW5kLWl0IChhYnNwYXRoKQogICAgICAgICAgICAgICA7OyBgZmluZC1idWZmZXItdmlz aXRpbmcnIHdvdWxkIGJlIG5hdHVyYWwsIGJ1dCBjYWxscyB0aGUKICAgICAgICAgICAgICAgOzsg cG90ZW50aWFsbHkgc2xvdyBgZmlsZS10cnVlbmFtZScgKGJ1ZyM3MDAzNikuCi0tIAoyLjQ4LjEK Cg== --0000000000006933070631c5ea18-- From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 02 02:46:18 2025 Received: (at 77439) by debbugs.gnu.org; 2 Apr 2025 06:46:18 +0000 Received: from localhost ([127.0.0.1]:53982 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tzrrd-00084Z-Q8 for submit@debbugs.gnu.org; Wed, 02 Apr 2025 02:46:18 -0400 Received: from mail-ot1-x334.google.com ([2607:f8b0:4864:20::334]:51489) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tzrrb-00083S-Rz for 77439@debbugs.gnu.org; Wed, 02 Apr 2025 02:46:16 -0400 Received: by mail-ot1-x334.google.com with SMTP id 46e09a7af769-72c40235c34so1630636a34.3 for <77439@debbugs.gnu.org>; Tue, 01 Apr 2025 23:46:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743576370; x=1744181170; darn=debbugs.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=fYuvNjbM/K86F6ArRXOxI4w3qLZOr2UpHjlD/TMOJdQ=; b=C86qhEqzUIuoYXoL2pLU/Wc3xL+SOYbQbjxd1ZD9K1jbOzNRgL/Rft6Ww4DHMJcnvY MtWtPBc/ax7+e9dcJDiQsEwukBovfs7YBYfO4Y06gSwhlcREaM1tewRYfkp01eH3D7FD YRq9Qqkih9MU2/kpbkl4B09Vr96Mwyf0ZORCkCTdDrAM5MfNo6x1v4QUV9ZgQcTmWi6Y B52LnOB70w82L21f85GXvVpGBYtSTAS0qEihtH9k3hWCFSfMXVbkIk7np7uphJwI/pLF sFdAmMPy1FtmgisoBqluT7vGQUS/PoH0NxU6EH5SSE3YjtDES9TRi55nCNZIjbn5qsiH Z2nA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743576370; x=1744181170; 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=fYuvNjbM/K86F6ArRXOxI4w3qLZOr2UpHjlD/TMOJdQ=; b=OKqSx9rwLPtqHg1g7nQ9CaFUaa2oQHbSowfDCN3rIuOh/3xnKOTLaDJmH0uafLMEEU Mx0gWM50nUD4G/LYlWkEwTRPNMab6pUhXFMu+D0W7Z0vm4xOTpWnLYjQdkmyO6N7wRD4 /E0YtW+PiP8/wlPi5iac+YLz0aI1f7WA+PoIGq1JbBWibQansBHzLFKXo07HWo+dBRn8 kk19itzYrZWg1E0mooy2GHKitGjq0lw9fUw//vrFRb43qFdCDQ9T4XJxm56tZB9+QkYZ lQY8Z11NesuQaeQOZ8EpWxEGkFCz7ZIswGJrFlaEt3MhvvdlezeBb3fytT2heK7bAqmw tfMQ== X-Forwarded-Encrypted: i=1; AJvYcCWsgyRK951oxq6hxK9UvHui/ki9MqdzlQXXOic3VQmD6r2nSK+fb/SkI+vsHiK1+6REnTrzPw==@debbugs.gnu.org X-Gm-Message-State: AOJu0YxrHDhpxEcd0y+9hoBaTbMHdfAX+qGDOmtX4k3mi9f25MGGjQNU UFem/btpBvChUHwJw53Cg4gbnyTavzDTRFI/khhxHX7Qc+4HzIAb53pTi4UHNzE4WvcWTpwWrEl xXxCQBi+de/u6CSjQWkfICxRCnKc= X-Gm-Gg: ASbGncsi9fcaazkaty0j5ESTpCa5iC8A1rScraMxVJNYL8QLJL2VQe/abEEi9NT89YN m+aFc4RKJt7sEHD1cCOAkGxOIBwwg6mZWavRXhuOitnDBymjzucnfp9e7xfOH6CXbHXsuupytE1 DTrsPpITF8doXVjQfIo3u8J31PXHQMhMKakjk/ X-Google-Smtp-Source: AGHT+IGp0guzNGzErHfMd/hGyRLsdd6E3pJmUOhffiUXrqVZRG49NlBdssDXIw47AklHbvsFllKcpFcZB40qU6qEv9I= X-Received: by 2002:a05:6830:6101:b0:72b:9d5e:941c with SMTP id 46e09a7af769-72c637ace9emr10300093a34.13.1743576369906; Tue, 01 Apr 2025 23:46:09 -0700 (PDT) MIME-Version: 1.0 References: <877c434n0k.fsf@gmail.com> In-Reply-To: From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Date: Wed, 2 Apr 2025 07:46:30 +0100 X-Gm-Features: AQ5f1Jp-UbHvJVByUpEK2vlCud8WkjPua1NBKmi3d_beUw8wy70IjkODwFlXc9k Message-ID: Subject: Re: bug#77439: [PATCH] Eglot: introduce eglot-show-diagnostics-source To: =?UTF-8?Q?Nicol=C3=A1s_Ojeda_B=C3=A4r?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 77439 Cc: 77439@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Wed, Apr 2, 2025 at 7:39=E2=80=AFAM Nicol=C3=A1s Ojeda B=C3=A4r wrote: > > Dear Jo=C3=A3o, > > Thanks for the quick reply. I'm including here a revised version of the p= atch. I'll look into in more detail later and possibly push it. > Actually, I believe I have a copyright assignment on file from long time = ago. > Otherwise, let me know and I'll submit the papers. I see you in the copyright file indeed. Great! Jo=C3=A3o From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 03 04:51:17 2025 Received: (at 77439) by debbugs.gnu.org; 3 Apr 2025 08:51:17 +0000 Received: from localhost ([127.0.0.1]:32791 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u0GI8-0008QL-G9 for submit@debbugs.gnu.org; Thu, 03 Apr 2025 04:51:16 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]:50381) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1u0GI4-0008Q4-Tj for 77439@debbugs.gnu.org; Thu, 03 Apr 2025 04:51:13 -0400 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-39c31e4c3e5so140644f8f.0 for <77439@debbugs.gnu.org>; Thu, 03 Apr 2025 01:51:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743670266; x=1744275066; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=AwEZozb9VzGfEm+cfUCb/KmA4MqCI8qS9joACwJjAHM=; b=V+emju0DmRfr4o8fqJwOLjBsZS3W5fmXAQfUrHvufHxJYKefxlDvtLBsZKfjDbz+zo gxo2oiP0kvUnOmRNh/+mCw6/DcE5MYp2sVcUl1MdvuMnQRRpX1stGEGH72142818DUtF GxDd/rUkKqPNPR0RgVkLgNdA101qrxEehXphQU1z+tHNK3tfxEUD2fzouIZR83r0EZQm kygkHKalHwyhLDXx8y/TmY9cYpo9Du5DNeM9/86gZoE1dyzDZrGM1RpGwk3WM+JuP8zR r+SI8ekqCIjv7u3SV+TMx8w7ZVj/MUdGWWI18lMmJP48pFigeyhAzhg16Yp5IIQoJ5oA 7bLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743670266; x=1744275066; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=AwEZozb9VzGfEm+cfUCb/KmA4MqCI8qS9joACwJjAHM=; b=d5TbStRnyaJnh1I3CUNaGcZXLJ4oDD592mIpzOUDaVhqSFaXlPQmTuoYVOHlwHjB5j 41ZT3Zpva3cArP152bw6reW0KTXjdEAojXy0qUEdjraJL72p9Uv/ssqIjH1MokzBxKOM 34H6EJAJf9crZT56FjJFjN+MRb9f7kDp0E2Ye6N0SefkRz0tAoTxiwVmefxr4ls5HAeI WIUJDMP8BMjtG/6mVQ4qHeHIhDxN0Iw/+crxLbXT/JF05LgxJ8V00uyvOMtSmky0Co08 zkzohidaHuJT5CqesysoT8LZLnSsoF4QZHeThH3xoPlwHjCuV1Z9WnGYFxQO5HUN583P I5hg== X-Forwarded-Encrypted: i=1; AJvYcCXvrSVfYkSQ6vSemzTyVkpuUT1Nr0yF3If6ktTkQpteMh4tM8k9btrxgY7PEpNICuw7LewmMg==@debbugs.gnu.org X-Gm-Message-State: AOJu0YywG/v+DBdwdNMo0+54hNh4Qdq2ZJ1nWijY3akH0Ae+ySLCcR3+ 0pI/hE/IgR6Yz4G6iZBHpU6aLaeSQUMiQJwFbtnEpMjwHNbzWXOS X-Gm-Gg: ASbGnctqWns1Lj69hpS023CFwb9V+yuT1s3dCMNiObSWdTfd5i/JV0ZPRxCGJwSJMn2 1InZbQe8i5qe4pDa8suiKICP6NIat/xkkRA64a2YyJb81L6yWuQDluw6lIgR/VmzX4lnqXsSzpQ JYwLNUsAlamrQ1L1iN5K/8kAsh08j9AsRsYl0eL5vKl9kOqdFuoIYwn5zE8BB0LMORixcC8WRXE rie3aG10ESXPDfHg2A+BmmK4BNX3y4p4qK/YHGK7jtcY4ugf3/iYR2yyBWyK743HOVOyMtbFPWI CNR3gAgWa+tsLPX02np441HoXVw/RnTVwQ== X-Google-Smtp-Source: AGHT+IEM8PULPA/+eS1oSDUGIevYgySgFdGvjKfOdBu79odVAS0ImEwGlJ8dnTJZytMUK6pCfdn8FA== X-Received: by 2002:a5d:648d:0:b0:39c:2692:4259 with SMTP id ffacd0b85a97d-39c2f8d5407mr1464272f8f.21.1743670266321; Thu, 03 Apr 2025 01:51:06 -0700 (PDT) Received: from krug ([87.196.73.56]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-39c301a79aasm1201290f8f.35.2025.04.03.01.51.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Apr 2025 01:51:05 -0700 (PDT) From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= To: =?utf-8?Q?Nicol=C3=A1s?= Ojeda =?utf-8?Q?B=C3=A4r?= Subject: Re: bug#77439: [PATCH] Eglot: introduce eglot-show-diagnostics-source In-Reply-To: References: <877c434n0k.fsf@gmail.com> Date: Thu, 03 Apr 2025 09:51:36 +0100 Message-ID: <878qohocfb.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 77439 Cc: 77439@debbugs.gnu.org, Eli Zaretskii , Spencer Baugh X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Nicol=C3=A1s Ojeda B=C3=A4r writes: > Dear Jo=C3=A3o, > > Thanks for the quick reply. I'm including here a revised version of the p= atch. > > On Tue, Apr 1, 2025 at 11:46=E2=80=AFPM Jo=C3=A3o T=C3=A1vora wrote: >> >> Thanks. The patch looks good and ticks all the boxes. Well almost, >> there are some minor details I didn't tell you about and are easy to mi= ss. >> >> * two spaces between sentences in documentation. > > Fixed, thanks. > >> * the first line of the docstring should be a complete sentence and >> fit in a line when the docstring is formatted with M-q > > Fixed, thanks. > >> * perhaps some other micro things I missed >> * the code used concat to handle the nilness of source/code, this one >> is more explicit. i can live with that though, maybe it's better like t= his. > > OK, I left this part of the code as it is. > >> The most important and boring thing will be to figure out if you need >> a copyright assignment for this contribution. Maybe not, if it counts >> as a "trivial" patch, but you should probably get one started >> regardless. Eli, please advise. > > Actually, I believe I have a copyright assignment on file from long time = ago. Thanks for this patch, as I said, it looks great, exceptionally tidy, and done in record time. But I'm very sorry if I'm going to disappoint you. I've had a change of heart. I was thinking about this, and I don't think this customization belongs in Eglot. Instead, it belongs to Flymake. Applying your patch would violate the principle that Eglot as a medium between LSP and Emacs facilities should not withhold information from Emacs. Also, Flycheck store those things itself from the beginning, and it's a good idea we should copy. And I've been meaning to do it anyway for a long time, now is a good opportunity. So we have to change Flymake somehow so that it becomes aware that diagnostic messages may have three parts: - a source - a code - a message Can they have more than three? Can they have just 2? Are they to be named always "source/code/message" like LSP/Flycheck wants us to? This is where the under/overengineering antennae should stick up. If we accept that it's at most 3, and they have those names, the patch to present to flymake.el is somewhat straightforward: * change the public flymake-make-diagnostic interface to explicitly allow backends to pass in those things. Since it's sadly BOA function, I'd say the best is to overload its TEXT argument, renaming it INFO to allow it to be more a list of (SOURCE CODE MESSAGE) instead of just a string. * change the code around to account for the above. I recommend changing the private flymake--diag struct creating flymake--diag-accessor macros flymake-diagnostic-source and flymake-diagnostic-code. * Introduce a flymake-diagnostic-display-info customization option where the user can say whether what Flymake gives to its associated displaying outlets. Here I suppose your personal preference would be to set this variable to just `(:message). * The same variable could be repurposed for controlling the columns of the flymake-show-diagnostics-buffer tabular display (which would also have to tweak.) * Finally, change Eglot to pass those things in to Flymake. * Bump the Flymake version, change Eglot's Package-Requires to rely on the bumped version. * Update the flymake.texi manual. * Run Flymake unit tests. * Ideally add a new test or two (not neded, but nice) * Change Emacs's etc/NEWS to reflect the Flymake change. * Optionally change Emacs's etc/EGLOT-NEWS to call attention to Eglot making use of this new Flymake capability. Of course, if you think this solution is underengineered and we should have more flexibility, other solutions are possible via a protocol different from flymake-make-diagnostic. Jo=C3=A3o From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 04 02:52:10 2025 Received: (at 77439) by debbugs.gnu.org; 4 Apr 2025 06:52:10 +0000 Received: from localhost ([127.0.0.1]:36856 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u0auP-0006hU-Oe for submit@debbugs.gnu.org; Fri, 04 Apr 2025 02:52:10 -0400 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]:61725) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1u0auJ-0006gd-9N for 77439@debbugs.gnu.org; Fri, 04 Apr 2025 02:52:03 -0400 Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-5e5c9662131so2796621a12.3 for <77439@debbugs.gnu.org>; Thu, 03 Apr 2025 23:52:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743749517; x=1744354317; darn=debbugs.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=gxlmA38qBR5gcFP61uOKEkR0VGJcYYfVUuBwWx2UlMA=; b=a3VULFbW5CJIhCP2G4C+Gyvyh/HR7aVp1iHIWf6gSIpKh2TmjXoxBkU32gpMxJRmfI 8opS9z/22e1ZKWJWidpSYaTw9rJS/tpNtgaBpzCYgg1sUD/0+dpf3bpZMQy0slK1r8Ft OL4HXMESfQ5koI3pDR8V2z4vwLnArOYKvvQLLyRCn2n7zrCSZQ+0uptvi8CcPa/aEQX/ vjhDz35IWZSw+HlrjcYeZMqcY/UjS4B2CpyBLhlhuRPxnGOSchjb8u0t5s8ESut7lVf/ doy46xgcdm7j7kUBtRTCCXZH5E3ah5RH5IK7LSod59WF32GFa6B2AGqMkWwPUcKNsb2O e/Dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743749517; x=1744354317; 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=gxlmA38qBR5gcFP61uOKEkR0VGJcYYfVUuBwWx2UlMA=; b=YoekL1xzq789EEXjpbkRxO86jpZh75WjZE+2KONwn9TSgwhruH7PauAyBoLXGy7/VK 9H4La/TodYV7NI3hjaFSzNqxVJJdQiinmUDXYgfmwql6aHaY/2pujZ1wy86hoJiTGycI skcLMlNOJARME74O0XDvZwxoW5qAqt2sCc/kCqhvGlvaXWU8TvF+Abv0QSFnj2byoogY R1ZDwmN2jwgjgz0h8/3QjmshR+jxqYab3rwnCSXz6wXwD2Ttv+HnTNt5Mzaao4YKhnOw yWUNZ/tlaeUJt8S1uf7E2BA7KWYIcjEQJCrrJvyHnIu1R2zbLr79Qi8o91cihYn3gcG8 GTjw== X-Forwarded-Encrypted: i=1; AJvYcCXlmuToml3VyQfyyOAhsh5kTpswdVUHGwwPdcEJ2icfAh0jsX4wSZl2/HqayP59wa3VidFMDw==@debbugs.gnu.org X-Gm-Message-State: AOJu0YwWb6Q8b8cAmBVvzh9x9t+nYjQ0EH1n1IOeaxWGKQqRMjSgN2Vh gtbkDCsXn1V5RQMkQEKo5O+04/Bfaj4srUlCVee3hhBjHQP60cyZjwwerJiX/4FS5m7pOUY2Cbg D4R4TaT269NdxKSKwd2+sy30s9DM= X-Gm-Gg: ASbGncsxv7aAFf7pjgw6yp8rMViq8bQbX+LtKqrQALxaxs9UoMRKdUEWweqyOLmSUqE CG9Rl7tgL+knTSX/uj5JDnBPjclRLS8WA9YAUiy2ageHXJV5axKqmBQZ8/1YIn70XMUaAmykf5k uXxyTbSpgqXzOGMtkWm6fAT4IcerqGt09TIlM4SgGdC72+ouelO7hnNTPGKAA= X-Google-Smtp-Source: AGHT+IH2MsmMPWDHbgx0Ki/glfVnBIebcx6VRSiBbP2EA6A0dl0eTA317TsyaKjgSYAuzStg1DmPKVMxF6F6D00hubM= X-Received: by 2002:a17:907:9707:b0:ac7:3912:5ea6 with SMTP id a640c23a62f3a-ac7d6f1ea61mr91056866b.59.1743749516736; Thu, 03 Apr 2025 23:51:56 -0700 (PDT) MIME-Version: 1.0 References: <877c434n0k.fsf@gmail.com> <878qohocfb.fsf@gmail.com> In-Reply-To: <878qohocfb.fsf@gmail.com> From: =?UTF-8?Q?Nicol=C3=A1s_Ojeda_B=C3=A4r?= Date: Fri, 4 Apr 2025 08:51:31 +0200 X-Gm-Features: ATxdqUF8EsCUpLzcvLfKmeBjve7w9AU2uK5IV7151Vtz-YM1vuSKOa1Fa5gzDR8 Message-ID: Subject: Re: bug#77439: [PATCH] Eglot: introduce eglot-show-diagnostics-source To: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 77439 Cc: 77439@debbugs.gnu.org, Eli Zaretskii , Spencer Baugh X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Thu, Apr 3, 2025 at 10:51=E2=80=AFAM Jo=C3=A3o T=C3=A1vora wrote: > > But I'm very sorry if I'm going to disappoint you. I've had a change of > heart. I was thinking about this, and I don't think this customization > belongs in Eglot. Instead, it belongs to Flymake. > > Applying your patch would violate the principle that Eglot as a medium > between LSP and Emacs facilities should not withhold information from > Emacs. OK, makes sense. Give me a few days to chew on this and I'll get back here once I have something. Thanks. Cheers, Nicolas From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 18 15:03:24 2025 Received: (at 77439) by debbugs.gnu.org; 18 Apr 2025 19:03:24 +0000 Received: from localhost ([127.0.0.1]:52867 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u5qzb-0008WJ-Ko for submit@debbugs.gnu.org; Fri, 18 Apr 2025 15:03:23 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]:47374) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1u5qzT-0008Tw-GF for 77439@debbugs.gnu.org; Fri, 18 Apr 2025 15:03:13 -0400 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-43cf034d4abso14644825e9.3 for <77439@debbugs.gnu.org>; Fri, 18 Apr 2025 12:03:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1745002981; x=1745607781; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=zmNCuVF1cKkI4hsCSZcGhcwJ4N7ZHYW0Bhli3cIeOwg=; b=QA5T0ldlspn8dwMMOd4IK3jfDZh5uQpuM9wku1xJpyoJrKIwwNIuhQD0DufHacodWR 82cslWA5bgXGX7TgmaxF878znYwqs5cXVW4l5A4B9CHzSpG87TDz/7HZmrlkYo8o7Gts axWrnlUrcnoyYGyIAe+u6st4xYgAgkLcEYSvQ03Ib13zRh4X3womteT1cBfqUGJR30A8 R/KgWuyYrrzHWVmPk+BRvHUoQLxbvqX+ttUrQXP20lx5FIslLSA0cboCl7FR3v8XuJWA CEoBypqIOeO+l95tv2U0XlhkB7i1Kr/kn5FkHDM45HqNER+LNH3EHqySf+WpIvgNuoMz xqmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745002981; x=1745607781; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=zmNCuVF1cKkI4hsCSZcGhcwJ4N7ZHYW0Bhli3cIeOwg=; b=X5adJVi1FmrAq2VkAfIeSCndQbznBLy1ChDz0LqsXZFcVYF62zRlqZmesjPyEBWgyx GjjJLTbng1+O5b/NmPAOqjHzlfBFq+3THXj2jEyorEX9yNhfboxdBgATp0rS296EJ+KV HzQ/DAYnBPUQcqsaZuni9IHbn5AxIJN+akdLHD+mfN9FshIHFi6l++3hI6hafs+TNevC fB7tjLoXTWVms9H87+vEBqIa7S1ousoXHkQCaUbwduGwpkSQXE6lyXZnZlF0J831TiJ+ ++XkUYT/ZTh6GG1P9xwli1YTuDZia+rqJXSCxhGzUdSp7zV2AQuTUwkipsG4ty4/TK3W ydjg== X-Forwarded-Encrypted: i=1; AJvYcCU8TFciywClEuuIJ0EHI+72zKKB1KlZUKw3ry3CoOf5sJbgWWhpxAhHst7IAJgPa/Zg+5Ht9w==@debbugs.gnu.org X-Gm-Message-State: AOJu0YzVdR3a3/qT5d1aYvI82ooUdf9ZLUIcjVNoFaDOZfZuq/MmQXyZ IDj/z3zBVKGxsPYvBLXwCfL73XIVIyp+/z4++hpxYtzzxhOZ8Uilqu9gwQ== X-Gm-Gg: ASbGncvnmrluu5Ez+x8Cc8J3GTvUoPf8VSEMQbuLS1vqSggvN3gUCbZhppyL2k4ocut D8liOiBB5KvegMx2JOTuIKChzWQmnqswXUcTCpnQ5fGrBxoUH/yV93pS7+LjiUpxJ0TPNzm5AKO qyDMiNKu/qVEw0geDrPn+f97VlwZwZOgBPLUFXMp7pLfL6H4E5EIpQybAEDMEuH7x2qCCXL3gg+ TU9zimzxkR1iCKfdAJIb5PBYPcxbIlTLqyLGpyXdcpf8Z58foNwitFeGH07FH/U0+47PHl9sPGD /BOAdBnC0MWKaXftZ0PtCykNMVtSaT1yWPdaN1GRO8d4jSSkliZqVfo= X-Google-Smtp-Source: AGHT+IG3EkaMVVQrZDucPJlNBn88fP5EXVrDoSpQbxfMQZoQ5PRamCNdYTBqfS9KBV/hQO2Yh57pgg== X-Received: by 2002:a05:600c:4e4c:b0:43c:f470:7605 with SMTP id 5b1f17b1804b1-4406ab99615mr37201255e9.12.1745002980656; Fri, 18 Apr 2025 12:03:00 -0700 (PDT) Received: from krug (87-196-74-43.net.novis.pt. [87.196.74.43]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4406d5ccd38sm31609795e9.28.2025.04.18.12.02.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Apr 2025 12:03:00 -0700 (PDT) From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= To: =?utf-8?Q?Nicol=C3=A1s?= Ojeda =?utf-8?Q?B=C3=A4r?= Subject: Re: bug#77439: [PATCH] Eglot: introduce eglot-show-diagnostics-source In-Reply-To: References: <877c434n0k.fsf@gmail.com> <878qohocfb.fsf@gmail.com> Date: Fri, 18 Apr 2025 20:03:34 +0100 Message-ID: <878qnxuwah.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 3.6 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Nicolás Ojeda Bär writes: > > OK, makes sense. Give me a few days to chew on this and I'll get back here > once I have something. Thanks. Heads up, I've started working on this change and have it mostly finished (some details in'`flymake-show-diagnostics-buffer' and documentation are missing). Content analysis details: (3.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [87.196.74.43 listed in zen.spamhaus.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:32f listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (joaotavora[at]gmail.com) X-Debbugs-Envelope-To: 77439 Cc: 77439@debbugs.gnu.org, Eli Zaretskii , Spencer Baugh X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.6 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Nicolás Ojeda Bär writes: > > OK, makes sense. Give me a few days to chew on this and I'll get back here > once I have something. Thanks. Heads up, I've started working on this change and have it mostly finished (some details in'`flymake-show-diagnostics-buffer' and documentation are missing). Content analysis details: (2.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:32f listed in] [list.dnswl.org] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [87.196.74.43 listed in zen.spamhaus.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (joaotavora[at]gmail.com) -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager Nicol=C3=A1s Ojeda B=C3=A4r writes: > > OK, makes sense. Give me a few days to chew on this and I'll get back here > once I have something. Thanks. Heads up, I've started working on this change and have it mostly finished (some details in'`flymake-show-diagnostics-buffer' and documentation are missing). In the patch, the new Flymake version introduces a more powerful 'flymake-make-diagnostic'. In the same patch there is a change to Eglot to take advantage of this. The new proposed customization option is 'flymake-diagnostic-format-alist'. To omit the LSP diagnostic source and the code the entries :eldoc-echo and :help-echo in this variable can be modified. (setf (alist-get :eldoc-echo flymake-diagnostic-format-alist) '(oneliner) (alist-get :help-echo flymake-diagnostic-format-alist) '(oneliner)) Spencer, please say if you have any objections, else I will push in a few days time (after I address some minor shortcomings). The current patch is after my sig. Jo=C3=A3o diff --git a/doc/misc/flymake.texi b/doc/misc/flymake.texi index 668a72b4cd1..0e43df17aa2 100644 --- a/doc/misc/flymake.texi +++ b/doc/misc/flymake.texi @@ -62,7 +62,7 @@ Top When the Emacs LSP support mode Eglot is enabled, Flymake will use that as an additional back-end. @xref{Eglot Features,,, eglot, Eglot: The Emacs LSP Client}. Flymake is also designed to be easily extended to -support new backends via an Elisp interface. @xref{Extending Flymake}. +support new backends via an Elisp interface. @xref{Flymake API}. =20 @ifnottex @insertcopying @@ -70,7 +70,7 @@ Top =20 @menu * Using Flymake:: -* Extending Flymake:: +* Flymake API:: * The legacy Proc backend:: * GNU Free Documentation License:: * Index:: @@ -210,7 +210,7 @@ Mode line status @item @code{?} @tab There are no applicable Flymake backends for this buffer, thus Flymake cannot annotate it. To fix this, a user may look to extending Flymake -and add a new backend (@pxref{Extending Flymake}). +and add a new backend (@pxref{Flymake API}). =20 @end multitable =20 @@ -361,19 +361,23 @@ Customizable variables A custom face for summarizing diagnostic notes. @end vtable =20 -@node Extending Flymake -@chapter Extending Flymake +@node Flymake API, The legacy Proc backend, Using Flymake, Top +@chapter Flymake API @cindex extending flymake =20 -Flymake can primarily be extended in one of two ways: +Flymake's API supports the following use cases: =20 @enumerate @item -By changing the look and feel of the annotations produced by the +Changing the look and feel of the annotations produced by the different backends. @xref{Flymake error types}. =20 @item -By adding a new buffer-checking backend. @xref{Backend functions}. +Adding a new buffer-checking backend. @xref{Backend functions}. + +@item +Writing extension to and process Flymake's output. @xref{Inspecting +diagnostics}. @end enumerate =20 The following sections discuss each approach in detail. @@ -381,6 +385,7 @@ Extending Flymake @menu * Flymake error types:: * Backend functions:: +* Inspecting diagnostics:: @end menu =20 @node Flymake error types @@ -673,37 +678,19 @@ Flymake utility functions Before delivering them to Flymake, backends create diagnostic objects by calling the function @code{flymake-make-diagnostic}. =20 -@deffn Function flymake-make-diagnostic locus beg end type text &optional = data +@deffn Function flymake-make-diagnostic locus beg end type info &optional = data Make a Flymake diagnostic for the region of text in @var{locus}'s -delimited by @var{beg} and @var{end}. @var{type} is a diagnostic -symbol (@pxref{Flymake error types}), and @var{text} is a description -of the problem detected in this region. Most commonly @var{locus} is -the buffer object designating for the current buffer being -syntax-checked. However, it may be a string naming a file relative -to the current working directory. @xref{Foreign and list-only -diagnostics}, for when this may be useful. Depending on the type of -@var{locus}, @var{beg} and @var{end} are both either buffer positions -or conses (@var{line} . @var{col}) which specify the line and column -of the diagnostic's start and end positions, respectively. -@end deffn - -@cindex access diagnostic object -These objects' properties can be accessed with the functions -@code{flymake-diagnostic-backend}, @code{flymake-diagnostic-buffer}, -@code{flymake-diagnostic-text}, @code{flymake-diagnostic-beg}, -@code{flymake-diagnostic-end}, @code{flymake-diagnostic-type} and -@code{flymake-diagnostic-data}. - -Additionally, the function @code{flymake-diagnostics} will collect -such objects in the region you specify. - -@cindex collect diagnostic objects -@deffn Function flymake-diagnostics beg end -Get a list of Flymake diagnostics in the region determined by -@var{beg} and @var{end}. If neither @var{beg} or @var{end} is -supplied, use the whole buffer, otherwise if @var{beg} is -non-@code{nil} and @var{end} is @code{nil}, consider only diagnostics -at @var{beg}. +delimited by @var{beg} and @var{end}. @var{type} is a diagnostic symbol +(@pxref{Flymake error types}). @var{text} can be a string or a list +(@var{origin} @var{code} @var{message}) appropriately categorizing and +describing the diagnostic. Most commonly, @var{locus} is the buffer +object designating for the current buffer being syntax-checked. +However, it may be a string naming a file relative to the current +working directory. @xref{Foreign and list-only diagnostics}, for when +this may be useful. Depending on the type of @var{locus}, @var{beg} and +@var{end} are both either buffer positions or conses (@var{line} +. @var{col}) which specify the line and column of the diagnostic's start +and end positions, respectively. @end deffn =20 @cindex buffer position from line and column number @@ -900,6 +887,32 @@ An annotated example backend @end group @end example =20 +@node Inspecting diagnostics +@section Inspecting diagnostics + +When Flymake has called on the backend and collected its diagnostics, it +will annotate the buffer with it. After this happens, Elisp programs +may call @code{flymake-diagnostics} to collect such objects in a +specified region. + +@cindex collect diagnostic objects +@deffn Function flymake-diagnostics beg end +Get a list of Flymake diagnostics in the region determined by +@var{beg} and @var{end}. If neither @var{beg} or @var{end} is +supplied, use the whole buffer, otherwise if @var{beg} is +non-@code{nil} and @var{end} is @code{nil}, consider only diagnostics +at @var{beg}. +@end deffn + +@cindex access diagnostic object +A diagnostic object's properties can be accessed with the functions +@code{flymake-diagnostic-backend}, @code{flymake-diagnostic-buffer}, +@code{flymake-diagnostic-origin}, @code{flymake-diagnostic-code} +@code{flymake-diagnostic-message}, @code{flymake-diagnostic-beg}, +@code{flymake-diagnostic-end}, @code{flymake-diagnostic-type} and +@code{flymake-diagnostic-data}. @code{flymake-diagnostic-text} will +compose the diagnostic's origin, code and message in a single string. + @node The legacy Proc backend @chapter The legacy ``Proc'' backend @cindex legacy proc backend diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index b077f4a6207..216bcfc0d75 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -7,7 +7,7 @@ ;; Maintainer: Jo=C3=A3o T=C3=A1vora ;; URL: https://github.com/joaotavora/eglot ;; Keywords: convenience, languages -;; Package-Requires: ((emacs "26.3") (eldoc "1.14.0") (external-completion= "0.1") (flymake "1.2.1") (jsonrpc "1.0.24") (project "0.9.8") (seq "2.23")= (xref "1.6.2")) +;; Package-Requires: ((emacs "26.3") (eldoc "1.14.0") (external-completion= "0.1") (flymake "1.4.0") (jsonrpc "1.0.24") (project "0.9.8") (seq "2.23")= (xref "1.6.2")) =20 ;; This is a GNU ELPA :core package. Avoid adding functionality ;; that is not available in the version of Emacs recorded above or any @@ -2684,8 +2684,6 @@ eglot-handle-notification ((<=3D sev 1) 'eglot-error) ((=3D sev 2) 'eglot-warning) (t 'eglot-note))) - (mess (source code message) - (concat source (and code (format " [%s]" code)) ": " message= )) (find-it (abspath) ;; `find-buffer-visiting' would be natural, but calls the ;; potentially slow `file-truename' (bug#70036). @@ -2706,7 +2704,6 @@ eglot-handle-notification for diag-spec across diagnostics collect (eglot--dbind ((Diagnostic) range code message severity= source tags) diag-spec - (setq message (mess source code message)) (pcase-let ((`(,beg . ,end) (eglot-range-region range))) ;; Fallback to `flymake-diag-region' if server @@ -2729,8 +2726,9 @@ eglot-handle-notification (eglot--make-diag (current-buffer) beg end (eglot--diag-type severity) - message `((eglot-lsp-diag . ,diag-spec) - (eglot--doc-version . ,version)) + (list source code message) + `((eglot-lsp-diag . ,diag-spec) + (eglot--doc-version . ,version)) (when-let* ((faces (cl-loop for tag across tags when (alist-get tag eglot--t= ag-faces) diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index 7340fed9be4..c03dc55ecf2 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el @@ -4,7 +4,7 @@ =20 ;; Author: Pavel Kobyakov ;; Maintainer: Spencer Baugh -;; Version: 1.3.7 +;; Version: 1.4.0 ;; Keywords: c languages tools ;; Package-Requires: ((emacs "26.1") (eldoc "1.14.0") (project "0.7.1")) =20 @@ -371,7 +371,7 @@ flymake-error =20 (cl-defstruct (flymake--diag (:constructor flymake--diag-make)) - locus beg end type text backend data overlay-properties overlay + locus beg end type origin code message backend data overlay-properties o= verlay ;; FIXME: See usage of these two in `flymake--highlight-line'. ;; Ideally they wouldn't be needed. orig-beg orig-end) @@ -381,32 +381,39 @@ flymake-make-diagnostic beg end type - text + info &optional data overlay-properties) "Make a Flymake diagnostic for LOCUS's region from BEG to END. LOCUS is a buffer object or a string designating a file name. =20 -TYPE is a diagnostic symbol and TEXT is string describing the -problem detected in this region. DATA is any object that the -caller wishes to attach to the created diagnostic for later -retrieval with `flymake-diagnostic-data'. - -If LOCUS is a buffer BEG and END should be buffer positions -inside it. If LOCUS designates a file, BEG and END should be a -cons (LINE . COL) indicating a file position. In this second -case, END may be omitted in which case the region is computed -using `flymake-diag-region' if the diagnostic is appended to an -actual buffer. - -OVERLAY-PROPERTIES is an alist of properties attached to the -created diagnostic, overriding the default properties and any -properties listed in the `flymake-overlay-control' property of -the diagnostic's type symbol." +TYPE is a diagnostic symbol (see Info Node `(Flymake)Flymake error +types') + +INFO is a description of the problem detected. It may be a string, or +list of three strings (ORIGIN CODE MESSAGE) appropriately categorizing +and describing the diagnostic. + +DATA is any object that the caller wishes to attach to the created +diagnostic for later retrieval with `flymake-diagnostic-data'. + +If LOCUS is a buffer, BEG and END should be buffer positions inside it. +If LOCUS designates a file, BEG and END should be a cons (LINE . COL) +indicating a file position. In this second case, END may be omitted in +which case the region is computed using `flymake-diag-region' if the +diagnostic is appended to an actual buffer. + +OVERLAY-PROPERTIES is an alist of properties attached to the created +diagnostic, overriding the default properties and any properties listed +in the `flymake-overlay-control' property of the diagnostic's type +symbol." (when (stringp locus) (setq locus (expand-file-name locus))) + (when (stringp info) + (setq info (list nil nil info))) (flymake--diag-make :locus locus :beg beg :end end - :type type :text text :data data + :type type :origin (car info) :code (cadr info) + :message (caddr info) :data data :overlay-properties overlay-properties :orig-beg beg :orig-end end)) @@ -432,27 +439,90 @@ flymake--diag-accessor ,(format "Get Flymake diagnostic DIAG's %s." (symbol-name thing)) (,internal diag))) =20 -(flymake--diag-accessor flymake-diagnostic-text flymake--diag-text text) (flymake--diag-accessor flymake-diagnostic-type flymake--diag-type type) (flymake--diag-accessor flymake-diagnostic-backend flymake--diag-backend b= ackend) +(flymake--diag-accessor flymake-diagnostic-origin flymake--diag-origin bac= kend) +(flymake--diag-accessor flymake-diagnostic-code flymake--diag-code backend) +(flymake--diag-accessor flymake-diagnostic-message flymake--diag-message b= ackend) (flymake--diag-accessor flymake-diagnostic-data flymake--diag-data data) (flymake--diag-accessor flymake-diagnostic-beg flymake--diag-beg beg) (flymake--diag-accessor flymake-diagnostic-end flymake--diag-end end) (flymake--diag-accessor flymake-diagnostic-buffer flymake--diag-locus locu= s) =20 +(defcustom flymake-diagnostic-format-alist + '((:help-echo . (origin code oneliner)) + (:eol . (oneliner)) + (:eldoc . (origin code message)) + (:eldoc-echo . (origin code oneliner)) + (t . (origin code oneliner))) + "How to format diagnostics for different Flymake outlets. +Value is an alist where each element looks like (OUTLET . PARTS). +OUTLET is a symbol designating an outlet. One of: + +- `:help-echo', for the native Flymake echoing of diagnostics in the + echo area as used my `flymake-goto-next-error' and `flymake-goto-prev-e= rror'; +- `:eol', for use with `flymake-show-diagnostics-at-end-of-line'; +- `:eldoc', for use with Flymake's ElDoc backend; +- `:eldoc-echo', for use with Flymake's ElDoc backend, but for ElDoc's own + confined outlets; +- t for the default outlet. + +PARTS says which parts of the diagnostic to include. It is a list of +symbols where the following values are meaningful: + +- `origin': include diagnostic origin if it exists; +- `code': include diagnostics code if it exists; +- `message': include the full diagnostic's message text; +- `oneliner': include truncated diagnostic text;" + :package-version '(Flymake . "1.4.0") + :type 'alist) + +(cl-defun flymake-diagnostic-text (diag + &optional (parts '(origin code message)= )) + "Describe diagnostic DIAG's as a string. +PARTS says which parts of the diagnostic to include. It is a list of +symbols as described in `flymake-diagnostic-format-alist' (which see). +PARTS defaults to `(origin code message)'." + (let* ((w parts) + (a (and (memq 'origin w) (flymake--diag-origin diag))) + (b (and (memq 'code w) (flymake--diag-code diag))) + (c (cond ((memq 'message w) (flymake--diag-message diag)) + ((memq 'oneliner w) + (let* ((msg (flymake--diag-message diag))) + (substring msg 0 (cl-loop for i from 0 for a across m= sg + when (eq a ?\n) return i)))= )))) + (concat a + (when (and a b) " ") + (when b (concat "[" b "]")) + (when (or a b) ": ") + c))) + +(defun flymake--format-diagnostic (diag outlet face-prop) + (let ((txt (flymake-diagnostic-text + diag (alist-get outlet flymake-diagnostic-format-alist + (alist-get t flymake-diagnostic-format-alist + '(origin code message)))))) + (if face-prop + (propertize txt 'face + (flymake--lookup-type-property + (flymake-diagnostic-type diag) face-prop + 'flymake-error)) + txt))) + (defun flymake-diagnostic-oneliner (diag &optional nopaintp) "Get truncated one-line text string for diagnostic DIAG. This is useful for displaying the DIAG's text to the user in confined spaces, such as the echo are. Unless NOPAINTP is t, propertize returned text with the `echo-face' property of DIAG's type." - (let* ((txt (flymake-diagnostic-text diag)) - (txt (substring txt 0 (cl-loop for i from 0 for a across txt - when (eq a ?\n) return i)))) + (let* ((txt (flymake-diagnostic-text diag '(origin code oneliner)))) (if nopaintp txt (propertize txt 'face (flymake--lookup-type-property (flymake-diagnostic-type diag) 'echo-face 'flymake-erro= r))))) +(make-obsolete 'flymake-diagnostic-oneliner + "use `flymake-diagnostic-text' instead." + "Flymake package version 1.4.0") =20 (cl-defun flymake--really-all-overlays () "Get flymake-related overlays. @@ -813,7 +883,9 @@ flymake--equal-diagnostic-p flymake--diag-beg flymake-diagnostic-type flymake-diagnostic-backend - flymake-diagnostic-text) + flymake-diagnostic-origin + flymake-diagnostic-code + flymake-diagnostic-message) always (equal (funcall comp a) (funcall comp b))))) =20 (defun flymake--delete-overlay (ov) @@ -827,9 +899,7 @@ flymake--delete-overlay (defun flymake--eol-overlay-summary (src-ovs) "Helper function for `flymake--update-eol-overlays'." (cl-flet ((summarize (d) - (propertize (flymake-diagnostic-oneliner d t) 'face - (flymake--lookup-type-property (flymake--diag-ty= pe d) - 'eol-face)))) + (flymake--format-diagnostic d :eol 'eol-face))) (let* ((diags (cl-sort (mapcar (lambda (o) (overlay-get o 'flymake-diagnostic)) src-= ovs) @@ -956,7 +1026,8 @@ flymake--highlight-line (lambda (window _ov pos) (with-selected-window window (mapconcat - #'flymake-diagnostic-oneliner + (lambda (d) + (flymake--format-diagnostic d :help-echo 'echo-face)) (flymake-diagnostics pos) "\n")))) (default-maybe 'severity (warning-numeric-level :error)) @@ -1562,9 +1633,13 @@ flymake-eldoc-function Intended for `eldoc-documentation-functions' (which see)." (when-let* ((diags (flymake-diagnostics (point)))) (funcall report-doc - (mapconcat #'flymake-diagnostic-text diags "\n") - :echo (mapconcat #'flymake-diagnostic-oneliner - diags "\n")))) + (mapconcat (lambda (d) + (flymake--format-diagnostic d :eldoc 'echo-face)) + diags "\n") + :echo (mapconcat + (lambda (d) + (flymake--format-diagnostic d :eldoc-echo 'echo-face= )) + diags "\n")))) =20 (defun flymake-goto-next-error (&optional n filter interactive) "Go to Nth next Flymake diagnostic that matches FILTER. @@ -1922,6 +1997,16 @@ flymake-goto-diagnostic (pop-to-buffer (flymake-show-diagnostic (if (button-type pos) (button-start pos) pos))= )) =20 +(defun flymake--tabulated-diagnostic-origin (diag) + (or (flymake-diagnostic-origin diag) + (let* ((backend (flymake-diagnostic-backend diag)) + (bname (or (ignore-errors (symbol-name backend)) + "(anonymous function)"))) + (propertize + (replace-regexp-in-string "\\(.\\)[^-]+\\(-\\|$\\)" + "\\1\\2" bname) + 'help-echo (format "From `%s' backend" backend))))) + (defun flymake--tabulated-entries-1 (diags project-root) "Helper for `flymake--diagnostics-buffer-entries'. PROJECT-ROOT indicates that each entry should be preceded by the @@ -1951,9 +2036,7 @@ flymake--tabulated-entries-1 (;; somehow dead annotated diagnostic, ignore/give up t nil)) for type =3D (flymake-diagnostic-type diag) - for backend =3D (flymake-diagnostic-backend diag) - for bname =3D (or (ignore-errors (symbol-name backend)) - "(anonymous function)") + for origin =3D (flymake--tabulated-diagnostic-origin diag) for data-vec =3D `[,(format "%s" line) ,(format "%s" col) ,(propertize (format "%s" @@ -1961,13 +2044,8 @@ flymake--tabulated-entries-1 type 'flymake-type-name type)) 'face (flymake--lookup-type-property type 'mode-line-face 'flymake-erro= r)) - ,(propertize - (if bname - (replace-regexp-in-string "\\(.\\)[^-]+\\(-\\|$\= \)" - "\\1\\2" bname) - "(anon)") - 'help-echo (format "From `%s' backend" backend)) - (,(flymake-diagnostic-oneliner diag t) + ,origin + (,(flymake-diagnostic-text diag '(oneliner)) mouse-face highlight help-echo "mouse-2: visit this diagnostic" face nil @@ -2013,7 +2091,7 @@ flymake--diagnostics-base-tabulated-list-format ("Type" 8 ,(lambda (l1 l2) (< (plist-get (car l1) :severity) (plist-get (car l2) :severity)))) - ("Backend" 8 t) + ("Origin" 8 t) ("Message" 0 t)]) =20 (define-derived-mode flymake-diagnostics-buffer-mode tabulated-list-mode From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 19 02:13:57 2025 Received: (at 77439) by debbugs.gnu.org; 19 Apr 2025 06:13:57 +0000 Received: from localhost ([127.0.0.1]:56062 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u61Se-00055s-Qs for submit@debbugs.gnu.org; Sat, 19 Apr 2025 02:13:57 -0400 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]:61643) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1u61Sb-000559-Qw for 77439@debbugs.gnu.org; Sat, 19 Apr 2025 02:13:54 -0400 Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-acb415dd8faso389890766b.2 for <77439@debbugs.gnu.org>; Fri, 18 Apr 2025 23:13:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1745043227; x=1745648027; darn=debbugs.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=3WATu2+LoN4v5G4sKY+XnuD7DjAt5QvzqxQY9aVLNOk=; b=jI18HpW+7CklM+IZyJRmf19rlTdy15R2a5JTmhP5ZyJ7/P70IJRpyoz2gy6jORzDYK bJr8ATwgo5O2JmIctWKPzTaQIOpIcV1tV+YrW5XHNHdlI4SeNw1pVDD+AdPii1T1SK1G XIaMWjAoi83/9URenq/0GpSoOkkdIlwwNpqP2wDMxfIeCC35SnL2T5WPkwIvBf7Ogjmq 0SeasUz2aLRKUwHC8NpSQ0FjyKTeOVkMglaEgbQgszBd3XAbZak9Rx/lUE42jR6QeIbS e2RGXWV5Ti+/CGR/V6cSWL2sV3br0Nl4J3WLH/KTXZl3S5rty4HRNcst1NohnOu4c9DX affg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745043227; x=1745648027; 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=3WATu2+LoN4v5G4sKY+XnuD7DjAt5QvzqxQY9aVLNOk=; b=dtKA3hM5QnytNhzpn6amKd+SRaXCxnBGpMCORxrl60khCnOhRYC9NBwcomUxgq5904 1Rog93g3otZiyPUv4cP/OkzBU+v+5DXLbS5mZ7WTkAf0Zo/EZiAixxdDABcFH7tF8a7G nkDjQ0WuggAwvgEMJ9soRq7R1DEDYiOk2SM17LITZ6ktvSQ6ieN+pEqJidXlyw0r2pfM QV9dolp7pSMmJDOBvq3AKggE5t5hFg2r4GWkZv4boo1LDi1ZdM6w5tYJ5qSMI3qpFrmC DQVa7xjxtq3Czc468I0CO5UrnUwXVycXv85UGPiMXhaEcBYunZjLf9PsT4mrqbvy86jB vm6w== X-Forwarded-Encrypted: i=1; AJvYcCUxE39LkndRVjg2EWQdDPMWTM0fkMwRNF8sl/CogkjvjyIMpxIgCj8RYxgkmyPgBNYbk+X/IA==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yz4k6TMPeyj2Ka3mfnkG6Mmjz6obcM81iRvkiRCsrFGWxxMWB0c fC9MiurhDTBgKYHBDsV03IMQ4LaC+zF3WKHpiLr0d43dTyRMT3o9YTKX/h4fW08zBKhinutRlf9 74htACPG5JfwMOZr0y5D3liHLyyM= X-Gm-Gg: ASbGncuuPrchFn8ZQBLCo1d5GNMllvBSm+81mQVDgs7u8Bo6sMFmfBcnRndCzO43UK4 lTDOUZuIMmC5OLCRJyWjtgz1Jkl4ENPXKEl/8hObj8tEaP2VNwg9iKnjfWz4oSf/QJyyy40y+ro dOq84OygoPaEoXaieBXw9Mei3WRpxkFtxFcWaT2WXl4wiOHqh3gF4zTvc= X-Google-Smtp-Source: AGHT+IHuR/9E9j5A5rgdpE8m4j4JAPqmmOqiloP2WfgpvBtUyWLK48ca9MujlSORG4HxNdbh+WQ2NOWqS6jLrziwMwY= X-Received: by 2002:a17:907:1c10:b0:aca:cda9:3170 with SMTP id a640c23a62f3a-acb74d65bacmr494776166b.46.1745043227355; Fri, 18 Apr 2025 23:13:47 -0700 (PDT) MIME-Version: 1.0 References: <877c434n0k.fsf@gmail.com> <878qohocfb.fsf@gmail.com> <878qnxuwah.fsf@gmail.com> In-Reply-To: <878qnxuwah.fsf@gmail.com> From: =?UTF-8?Q?Nicol=C3=A1s_Ojeda_B=C3=A4r?= Date: Sat, 19 Apr 2025 08:13:22 +0200 X-Gm-Features: ATxdqUHNkMIDUkIW83aUd_N52RaN3If1Vw_hSZrYns3NwDztrHq0iVmhradxSP4 Message-ID: Subject: Re: bug#77439: [PATCH] Eglot: introduce eglot-show-diagnostics-source To: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 77439 Cc: 77439@debbugs.gnu.org, Eli Zaretskii , Spencer Baugh X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Fri, Apr 18, 2025 at 9:03=E2=80=AFPM Jo=C3=A3o T=C3=A1vora wrote: > > Heads up, I've started working on this change and have it mostly > finished (some details in'`flymake-show-diagnostics-buffer' and > documentation are missing). Thanks for the heads-up, and for your work on this. I looked over the code quickly, seems fine to me. Cheers, Nicolas From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 21 04:06:08 2025 Received: (at 77439) by debbugs.gnu.org; 21 Apr 2025 08:06:08 +0000 Received: from localhost ([127.0.0.1]:59962 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u6mAJ-0004r3-Mp for submit@debbugs.gnu.org; Mon, 21 Apr 2025 04:06:07 -0400 Received: from mail-oa1-x2c.google.com ([2001:4860:4864:20::2c]:48535) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1u6mAG-0004qV-Ti for 77439@debbugs.gnu.org; Mon, 21 Apr 2025 04:06:05 -0400 Received: by mail-oa1-x2c.google.com with SMTP id 586e51a60fabf-2d54b936ad9so905169fac.1 for <77439@debbugs.gnu.org>; Mon, 21 Apr 2025 01:06:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1745222759; x=1745827559; darn=debbugs.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=X7hfwySx5qweYVSm/ll7t7rcC0OXO+UAVlqXq16H6+4=; b=canEvkixFDXpbYop2+0JNmq7ZWze/FW7jfjM6LajYimGgmcKoLRG99/DVtUap2/Uvu nuFHNxU7G/xOJNk5KaG5I6CTQ34kSUr5UP9L2B22Ij2Iqj3QosK4GteROhVvixx+mp8U hiGhKXls85oDDrV27jdr2ekhK3H+oFm2WH1g+NHCpeuTqDik8IUUZpSSXl3yIsVr8Zj7 JMnflV1MdAboGCapCTuZp7O7/uMQDFEHTWajjexjPACEi+gER+TchoOQVV2TKTRBC8Ac cRmm/5GjzDzL9WKENBE0LurVUSulsIWz4ou6UjxJTfafj9TBxV33swrmd66HZqrr7d6q PNDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745222759; x=1745827559; 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=X7hfwySx5qweYVSm/ll7t7rcC0OXO+UAVlqXq16H6+4=; b=HW0fjvsDmUFa0GCAYnEgHMd9wjPAq3HEUX1OB7KF1h7M+frIJM5KnfABBM467IO0Ol 9Zk/oo3bnNgCezZEVHabfCBHMK30yWtfWYblpCuPqs03w/uHk5z6t4s1lao1DsmbmLJW K3AWWBSXY9lPMJWKzH+zsJR7ed0rC9zjM8Eq9R4cQTbEGYEqyO1+aBiQPzAz+V5ElI8k NTyuIKKMipo8KY5lklohjNp/pmFYocT1zKnaTXA5Phf0GrdpNCp7Z0Quo1LMjWumXAvh ElMSblzjAyV/d+D3UFmTKtfjESezq/eSq7gWRlC7IdyQg70EbFZXMts4mqaXh1ocz6cz R22w== X-Forwarded-Encrypted: i=1; AJvYcCV+tzoj3K6RGBSgsTX3WjKaPbRYpQyK4VrDFo1TvXqqcT5EiLZ4deRx+ln0kOJSA1/Gs4nKHA==@debbugs.gnu.org X-Gm-Message-State: AOJu0YyVDFAa6gDn4rJu2F7U6uJh4GlDz5s0JwADWsOUxrpzSP557ZdC bzoPemvFkzm+XI+X3b7OOs1YezbSRCyL7FcgwaRFvvXtJG7U+4mCEXpvmYNNaIFVxDpdPrRAf11 Wr7QO0397R3EUvtDqjebrRREWS88= X-Gm-Gg: ASbGncv9bPtCFg7llnY9gfoAAh4AvGKKbcq6XcOQBsQTurI+azEUoT7Y7HBzNtJk0br Ampv4o+bV7t6wyeX5pLiHZfE6D50G38S06awAdKOU6pPyl3eCj3kuvvCuB+gbaajnQP1yam3fyf n5y+bX3CCZNqcxvWdyQWhvhA== X-Google-Smtp-Source: AGHT+IEHxzhf42wSIHn+a1HKOtnbfLJB3/rznp0hWk5Q4kZd24tvtEEbP0vxQ3ImwBsyCbiZx7C/B0BfaD4b73h+TJI= X-Received: by 2002:a05:6870:b4a0:b0:2bc:9197:3508 with SMTP id 586e51a60fabf-2d5270a8266mr7038899fac.34.1745222758889; Mon, 21 Apr 2025 01:05:58 -0700 (PDT) MIME-Version: 1.0 References: <877c434n0k.fsf@gmail.com> <878qohocfb.fsf@gmail.com> <878qnxuwah.fsf@gmail.com> In-Reply-To: From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Date: Mon, 21 Apr 2025 09:06:24 +0100 X-Gm-Features: ATxdqUG84sUgXUhFTvP9YZw7kdzoppwk9vcqYhLwzIaY4mLjLxzpHv_-gtAHhKc Message-ID: Subject: Re: bug#77439: [PATCH] Eglot: introduce eglot-show-diagnostics-source To: =?UTF-8?Q?Nicol=C3=A1s_Ojeda_B=C3=A4r?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 77439 Cc: 77439@debbugs.gnu.org, Eli Zaretskii , Spencer Baugh X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) I've pushed these changes to master. They should also be available shortly in Flymake 1.4.0 from GNU ELPA. See the new variable `flymake-diagnostic-format-alist` The master version of Eglot now depends on Flymake 1.4.0 to separately report LSP code and source attributes when creating diagnostics. Older versions of Eglot work fine with the new Flymake, but they don't do this separate reporting and so you won't be able to solve your problem with them. Anyway, please test the solution and then this bug can be closed. Jo=C3=A3o On Sat, Apr 19, 2025 at 7:13=E2=80=AFAM Nicol=C3=A1s Ojeda B=C3=A4r wrote: > > On Fri, Apr 18, 2025 at 9:03=E2=80=AFPM Jo=C3=A3o T=C3=A1vora wrote: > > > > Heads up, I've started working on this change and have it mostly > > finished (some details in'`flymake-show-diagnostics-buffer' and > > documentation are missing). > > Thanks for the heads-up, and for your work on this. > I looked over the code quickly, seems fine to me. > > Cheers, > Nicolas --=20 Jo=C3=A3o T=C3=A1vora From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 24 03:59:17 2025 Received: (at 77439) by debbugs.gnu.org; 24 Apr 2025 07:59:17 +0000 Received: from localhost ([127.0.0.1]:35229 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u7rUL-0001Kg-4L for submit@debbugs.gnu.org; Thu, 24 Apr 2025 03:59:17 -0400 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]:51240) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1u7rUJ-0001KD-5H for 77439@debbugs.gnu.org; Thu, 24 Apr 2025 03:59:15 -0400 Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-ac2c663a3daso133946866b.2 for <77439@debbugs.gnu.org>; Thu, 24 Apr 2025 00:59:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1745481549; x=1746086349; darn=debbugs.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=VFCMzhjqE/LnL3qTz7cEAG0jEc2jHmm9JZW/3fuMUYA=; b=HlpbJFZ8nA4SZQl1/0SGD0UPJm/9R1NL7ednrR6tqMQx0K+QtWe4a6e2/h81vC2Fcl 0g0Cu13mRrDvnWL9T1HrlZ9NN6v8EVyA/eOS05n8s/WRAqaPmA0jIZh5f3ZbDUVrnMdC 71+VIOuINc7qnHCV+gDHZCXAgFHoVlT4Uy4IImPgSYF+Zlp2dXfNYXH8mz49/iuWb3ui pU8dIzQJnRDCuAOcMjt5e1X7RnpwLDPWoqfyjWbtKqveNSePJK+96iF24k5Yzd9jBIVB KQUarsIvJIQA31trgOTbAwoO2udwiTqdR+nzpVe2p2xoOR4hosrwctVzeIJqA9fVDlYe KyPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745481549; x=1746086349; 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=VFCMzhjqE/LnL3qTz7cEAG0jEc2jHmm9JZW/3fuMUYA=; b=WGiobw+fjuJICVoJA9L7KbyMqXwI0ZsY0OOMyv3t6PVrSPwDubbjpra6t+ckG/gyuB y1XxADq9+E2S1LMGnQYZm8wuKWF7bvG/NHtS6KeD8CLoF2QX7+FduLL1jDmgt41gVI9P RQqVpJZb5HYM5A8l9q68zMet41hSW8rXW0bWOQWGLWsEo7GoRFS5Art7l6+lfMERlspc sn8d5FW/DES7R0+A4NDyTPmSpF/Mlim3w/FC+dN99E6FP0wGtch8HZzIlcI+YHqZYWzQ ObReiN9WUcNbrv5o6vJfLMTe5wdo1/1yfAwHXF43UzwYhy6FX0OJ1EOyERaQXkoYhzZr OHXw== X-Forwarded-Encrypted: i=1; AJvYcCUprwz2AW+YJf4hRqOPxLH9tgH4S/MOCLf60/VXxlhjpUmQZ/l3pNzn+zNqzC+1ltGY76eXLQ==@debbugs.gnu.org X-Gm-Message-State: AOJu0YxP+efQxmV5Sy6U0ycvvYtInVm6Z4A8uQP6eiWao336uyBLQ/0g I3RQkNwhxsCUgqZdzqT47Y76ylrRI8vGM4UO+HmXaQpJVtM5kW0gnVNOXdRN9L5sAy5ie9lBp0V 5gsGTvsTxzBwd8ZwBgSSyd24rGeE= X-Gm-Gg: ASbGnct7VnxsPhgIRZcvpdc9lJmGyxYeMYWdIPJGWBQYKkF240vRwX0WWUhx5GZETJG ZfoYJE7X5OS67gNfZ+TE5Qitcy8KPRUY6rp9XSGfsgDCGIKUpCQRrgvh4FqpLVurUMZWK25iVB8 FhPohPMjY5cQUUmQ3obYRQcHBOTipvZrmkPYwB7lddl2YnfIYE9f4LPT4= X-Google-Smtp-Source: AGHT+IEYa+TefjehXJikV++Rkg96Y3seRDgcqjnsjNEEmc0B+ILJuJDhkHtVbf2dtW1TUMgyrhyi/WraGzQmjyNL1I0= X-Received: by 2002:a17:907:6d11:b0:aca:95c1:876 with SMTP id a640c23a62f3a-ace57279f44mr142963666b.20.1745481548895; Thu, 24 Apr 2025 00:59:08 -0700 (PDT) MIME-Version: 1.0 References: <877c434n0k.fsf@gmail.com> <878qohocfb.fsf@gmail.com> <878qnxuwah.fsf@gmail.com> In-Reply-To: From: =?UTF-8?Q?Nicol=C3=A1s_Ojeda_B=C3=A4r?= Date: Thu, 24 Apr 2025 09:58:45 +0200 X-Gm-Features: ATxdqUFtQr3k65X5QgYt7RucgHIrs-5lC46O6zC75SVBq_yfNtiJsUaluWCjaS8 Message-ID: Subject: Re: bug#77439: [PATCH] Eglot: introduce eglot-show-diagnostics-source To: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 77439 Cc: 77439@debbugs.gnu.org, Eli Zaretskii , Spencer Baugh X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, On Mon, Apr 21, 2025 at 10:05=E2=80=AFAM Jo=C3=A3o T=C3=A1vora wrote: > > Anyway, please test the solution and then this bug can be closed. I tested this and I confirm it fixes the bug. Thanks! Cheers, Nicolas > Jo=C3=A3o From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 24 04:08:38 2025 Received: (at 77439-done) by debbugs.gnu.org; 24 Apr 2025 08:08:39 +0000 Received: from localhost ([127.0.0.1]:35305 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u7rdN-00026T-Gw for submit@debbugs.gnu.org; Thu, 24 Apr 2025 04:08:38 -0400 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]:47469) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1u7rdH-00024n-Av for 77439-done@debbugs.gnu.org; Thu, 24 Apr 2025 04:08:31 -0400 Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-ac3fcf5ab0dso112846666b.3 for <77439-done@debbugs.gnu.org>; Thu, 24 Apr 2025 01:08:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1745482105; x=1746086905; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=yq5KtQRmx6QXigC0cZVXCnvCQDhew96tpW+J105mgqc=; b=FHjDkACoAdX85o8HfAhol3Y7YGDy73Jmc/ILOZOgwZg1e3jruFVxfUyhQcxGFILiyi MxJu1bWEPUQXuwArDFJwXOsqTcV1RVQ49LBuExq/uctE6WHWSUx3lTNVoRhek5v2RG+W ufa9FRVwglixhnJLQ3yeff7DpOq+VcJewXRFn0lwioi+JWBlb9DymwkDEb/yMurtcDP1 6ZrR62cItf7jyo3p5zW/hJ2S4k/zt0FRFxlunmhJIoiw9o0ZDSyi8mIbxECOZFzV+IET 42g7VEVYDxBX0jkJiulkx46wA/fwiVJwUASwWGaq4+juAmhU1t6zl/nbmlu02/QWUlss Ju/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745482105; x=1746086905; h=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=yq5KtQRmx6QXigC0cZVXCnvCQDhew96tpW+J105mgqc=; b=pua2ZQrpySAYlp1ll+Ft8FRpt0ucaSrs2mGae9nFTs9KQCKttEYb26JqTcFa44AMxE QgK/kXJ+b8Mm+sFV20d6dabtWnD+WTIAxtKiVMNhAsXNb4uL+pae1//wnZFduw25gLJn s1uyKKVNWGy7zayPrKS60jVrKsQNg3SCj8plyPLy20WyfSWu0L6Y2dSD1ELS5gkzFwNn dCxXJRa0hVO+VBZoRE2xV4T8kBoZeimbtJIekyqMMwWS4mf7yGvFIBQtLlgfRoKPRr0N D47wgqKidkBpQtllnICzP34vyfPJ4sFjjvpbcwrWRsT7kHHiZVkqKckPh15PifIMglPP lA4Q== X-Forwarded-Encrypted: i=1; AJvYcCUebzce+Cj5nkDlMxSxPpRemAcigCwGNPE6CwsLq0GQEE1r0fk1l1IiolY/cIg+OG1L9yRmrflMUhc/@debbugs.gnu.org X-Gm-Message-State: AOJu0YxW5852n4SXme/3or20ez0gWI94F1/WyJKvp+kPuc+YWMeIkFkk n5ok6lPOZwv1wRlFVFPFda/I0iZJU58/+hUzBeU4aeeH9R+S41WhbXpdvgD20QoltmuB1fUifUS vZcbOJ2Q+0GkM4bXLPiSLzbuYwxs= X-Gm-Gg: ASbGncsoQWFNZBx5dcDwjabk8JoM13Iw330bXsphf32zdtW9T0q1j8Q2utLZbMj3Xbt jam/kb7f/ZovrBoxPfLR3T2w9kTmZMu4o+UY5IdbL3XsuliHkm6MJ/yfgWtDvCt7GFeh56NJko+ BBLU+xUWtT+Sdg+bV8D2nGeq7XsFSK/MYY6FwKT13tx9JDCALLB9fEVnY= X-Google-Smtp-Source: AGHT+IET/8cYzODyXftlHOfoHmxEvZPFjenA3Pnp6GLLSS/flVZ1mHDSOM3L3EmOI5uD/zjLBU1qA9FBmbQ633kJd/w= X-Received: by 2002:a17:907:2cc4:b0:ab7:cfe7:116f with SMTP id a640c23a62f3a-ace57494cabmr168798166b.46.1745482104781; Thu, 24 Apr 2025 01:08:24 -0700 (PDT) MIME-Version: 1.0 References: <877c434n0k.fsf@gmail.com> <878qohocfb.fsf@gmail.com> <878qnxuwah.fsf@gmail.com> In-Reply-To: From: =?UTF-8?Q?Nicol=C3=A1s_Ojeda_B=C3=A4r?= Date: Thu, 24 Apr 2025 10:08:00 +0200 X-Gm-Features: ATxdqUGkDnNvJekCXGcGCU8gLij_tfefUFeghWZ9S5VcFnJvUHijWATXUHAmho0 Message-ID: Subject: Re: bug#77439: [PATCH] Eglot: introduce eglot-show-diagnostics-source To: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 77439-done Cc: Spencer Baugh , Eli Zaretskii , 77439-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Closing bug. Nicolas From unknown Tue Jun 17 20:20:26 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 22 May 2025 11:24:14 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator