From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#73500: eglot: diagnostic location not always shown Date: Tue, 1 Oct 2024 19:08:08 +0300 Message-ID: <1f4a7412-4bbf-4d08-ab41-e92d0398b541@gutov.dev> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39886"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird To: Federico Beffa , 73500@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 01 18:09:26 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 1svfRE-000A92-PX for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 01 Oct 2024 18:09:25 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1svfQv-00052r-Vh; Tue, 01 Oct 2024 12:09:06 -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 1svfQt-00052E-KB for bug-gnu-emacs@gnu.org; Tue, 01 Oct 2024 12:09:04 -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 1svfQt-0002ey-BU for bug-gnu-emacs@gnu.org; Tue, 01 Oct 2024 12:09:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=In-Reply-To:From:References:MIME-Version:Date:To:Subject; bh=TnWyqGHGEdk+HoWZ14Qe42+jmLQuofs3wE6tYdDuxSk=; b=uSBs4i3l0krxf20xriI/kkZbO6D6B61ExYPNusGSdBe4/AYb1JobAfid5puT3Jcu/Q1aV95bsS7WhlE2bDy5WBcWocvxqLtGoWlbjaSxBvAqdFX1AT0FYShFR+SO6tO6z31QSn0Par10CibtjrR1QO95wstCNOeV7R4FcgNIk+jHUw2zW8l8/FwDo6fE0mHyfhvvhA5gag+I3TRlsi0OOTWnLSQ36/5QBImeF2iz+Rp6kr8yX3pBzE9Eg0plY74zFzQB1ndh3RVrzViR37gx5ZXoRjHgMHE3grJod5Tqp3G5SUXTewKdB4pe9zofbbRYXbfc86Qmk6WXtQn3HtV1uQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1svfQs-0006sW-8Q for bug-gnu-emacs@gnu.org; Tue, 01 Oct 2024 12:09:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 01 Oct 2024 16:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73500 X-GNU-PR-Package: emacs Original-Received: via spool by 73500-submit@debbugs.gnu.org id=B73500.172779890026417 (code B ref 73500); Tue, 01 Oct 2024 16:09:02 +0000 Original-Received: (at 73500) by debbugs.gnu.org; 1 Oct 2024 16:08:20 +0000 Original-Received: from localhost ([127.0.0.1]:52299 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svfQC-0006s1-5a for submit@debbugs.gnu.org; Tue, 01 Oct 2024 12:08:20 -0400 Original-Received: from fout-a5-smtp.messagingengine.com ([103.168.172.148]:49053) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svfQA-0006rv-G9 for 73500@debbugs.gnu.org; Tue, 01 Oct 2024 12:08:19 -0400 Original-Received: from phl-compute-05.internal (phl-compute-05.phl.internal [10.202.2.45]) by mailfout.phl.internal (Postfix) with ESMTP id B5A5F13818A9; Tue, 1 Oct 2024 12:08:13 -0400 (EDT) Original-Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-05.internal (MEProxy); Tue, 01 Oct 2024 12:08:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1727798893; x=1727885293; bh=TnWyqGHGEdk+HoWZ14Qe42+jmLQuofs3wE6tYdDuxSk=; b= QdJKC7TzkBaOHH1LR/zzpUTSATtkkBVNv1apRO+BXQez9PWZD04JSsaHMYZX6+AO utqgb2zqpV5MIjbkvlhDL+vlSXTMT5ooNJRIrLcQefwh4Lwvfd0Pep0xQGCqHkSz 5g8ZAwo2txhUs9z5eNRAFfmI7SGQHZ1unjcaEY56+TdXU9ymlCuL3eeVrsSeOj7m M3P+lytKIqMSRcRZPqsxQs740TUPMWAGqpOiOJU1WWivKphva0c+oUFPV8/kcKDu 14hpXBU0evah7iQv4Kaa7Cl+MtzdrDy7gxFz3zAI1LN0CfQ0wwAUs3Cg0InOIHzy KHZ53rKXiJLi28jdfbg9bQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1727798893; x= 1727885293; bh=TnWyqGHGEdk+HoWZ14Qe42+jmLQuofs3wE6tYdDuxSk=; b=P U+E1d0I1Mr2nB5RXlaKbKD78SY+RZtSY7fM+2izFZW8JlmfoSmW2ui6+0mgbO/CT EnER1GLv4ckP51qIeFxIv0Uf4SORn/NeqoHy2t3NLYRfFOHSto8mhGdW8l2ZzdNz g7fUQqoJwNBMbvUwxe/5r1YkThKm8EkQzROnLd6H0stA7MEjOQGqvzYJpeE9z6kC gNBLQ/qLZ8i1+IssyF4RKF7fmy003gPc59SwVe8etIs4QXlRG5odXnGOJ5dgwA9L oi9ZkPrHa24wr4VBFoFi2hJ69sdWpw/z6ISAJt9pBxUhchm93tIFSNNkaoO5BYEd fRVwYkvvYOgEotqxOYGEA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvddujedgleehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepkfffgggfuffvfhfhjggtgfesthekredttddvjeen ucfhrhhomhepffhmihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvg hvqeenucggtffrrghtthgvrhhnpeegueegteffuddvjeevvdelleeitdeftdduhfeffeff jedukeevjedvfeffgfevgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpegumhhithhrhiesghhuthhovhdruggvvhdpnhgspghrtghpthhtohep vddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepfhgvuggvrhhitghordgsvghffh grsehfsggvnhhgihhnvggvrhhinhhgrdgthhdprhgtphhtthhopeejfeehtddtseguvggs sghughhsrdhgnhhurdhorhhg X-ME-Proxy: Feedback-ID: i07de48aa:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 1 Oct 2024 12:08:11 -0400 (EDT) Content-Language: en-US In-Reply-To: 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:292772 Archived-At: Hi! I cannot comment on the whole previous discussion, but what I'm seeing here's is both diagnostics are rendered, but one of them (the first one) gets lost inside the second one visually. Is that the problem? On 26/09/2024 16:49, Federico Beffa via Bug reports for GNU Emacs, the Swiss army knife of text editors wrote: > The first diagnostics (corresponding to the above code) is shown in the > Emacs buffer only with an exclamation mark in the fringe. However, the > diagnostic message is not shown anywhere unless the cursor is placed on > the exact location in question (the 'x' in the square brakes). Without > any visual aid, it's very difficult to pinpoint the exact location of > the problem to see the message. That's a fair complaint, but we have a limited number of tools at our disposal. For warnings, we use underlines, and the color of the underline is set. When there are several diagnostics in the same place, they can get difficult to distinguish, true. > The other diagnostic in the same server message, on top of the > exclamation mark, it's properly highlighted with a blue wiggled > underline and easy to locate. I'd expect this to happen for all diagnostics. When you say "this", what exactly would you expect to happen, and when? Eglot prints diagnostics (through Flymake) at the positions that the language server reports them for. The second diagnostic spans the whole line; the first one is reported to be just 1 character long. One existing way to see the warnings separate from each other is invoke Flymake's diagnostics buffer: 'M-x flymake-show-buffer-diagnostics'. It shows this: 1 1 warning e-f-b typecheck [-Wmissing-signatures]: Top-level binding with no type signature: 1 1 warning e-f-b compile [-Wincomplete-patterns]: Pattern match(es) are non-exhaustive 1 14 warning e-f-b typecheck [-Wunused-matches]: Defined but not used: ‘x’