From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#70036: a fix that Date: Fri, 19 Apr 2024 12:40:06 +0100 Message-ID: References: <4e670617-6483-4159-a5cf-27a921764c38@email.android.com> <864jbxden1.fsf@gnu.org> <86r0f1bopx.fsf@gnu.org> <87r0f1mvtx.fsf@thornhill.no> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9946"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 70036@debbugs.gnu.org, felician.nemeth@gmail.com To: Theodor Thornhill Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Apr 19 13:42:18 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 1rxmdF-0002PM-Vo for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 19 Apr 2024 13:42:17 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rxmcw-0004BO-He; Fri, 19 Apr 2024 07:42:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rxmcm-0004B1-N9 for bug-gnu-emacs@gnu.org; Fri, 19 Apr 2024 07:41:50 -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 1rxmcm-00086d-Ap for bug-gnu-emacs@gnu.org; Fri, 19 Apr 2024 07:41:48 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rxmd0-0004tL-9q for bug-gnu-emacs@gnu.org; Fri, 19 Apr 2024 07:42:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 19 Apr 2024 11:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70036 X-GNU-PR-Package: emacs Original-Received: via spool by 70036-submit@debbugs.gnu.org id=B70036.171352687818494 (code B ref 70036); Fri, 19 Apr 2024 11:42:02 +0000 Original-Received: (at 70036) by debbugs.gnu.org; 19 Apr 2024 11:41:18 +0000 Original-Received: from localhost ([127.0.0.1]:58132 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rxmcH-0004oE-Us for submit@debbugs.gnu.org; Fri, 19 Apr 2024 07:41:18 -0400 Original-Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]:51657) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rxmbe-0004gn-Bq for 70036@debbugs.gnu.org; Fri, 19 Apr 2024 07:40:40 -0400 Original-Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-51abf1a9332so731669e87.3 for <70036@debbugs.gnu.org>; Fri, 19 Apr 2024 04:40:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713526818; x=1714131618; 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=0Ec5KsJHsnWYs6nTAiVBtlK9Bq7KYs+GFnOmcxqTm1A=; b=nm7DNGtKG6eZW2bJrgEAt/uFchRdxwmk2tytle+vEs2wNoLPL0WW01qZtVB61q9eYI sBuIJSbUqBZsnuj++8XspIVhtvXKtlmvmEDnk5itjtXBd08o6Wsvf0vEh1PoB9HyX5Sx ujI/Ps5NhdNeWMoERiHjLe3Y60LlUitdOEXIC9/B5goRGqyz/tSK042+0ZHK1u8Pk6mD AtHM5+KbT8d83uDGLIqSKM0XTEjnWy12k6WtMtbSHaAHf/l9vjrO5Ae1H+hbIMy4GtJI r2s3WgPPZQ5K+7bZJPGb0YKyYQSo8v7GE72ITF670El4EWbuxz2RKelvZ0M5Wx4Adiz2 uZ+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713526818; x=1714131618; 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=0Ec5KsJHsnWYs6nTAiVBtlK9Bq7KYs+GFnOmcxqTm1A=; b=jasuiJ/4a0Y/g//vdnxeT32jA//2bMmAvWimOdLQZqSqM++KLuDpzxEKO+HaR9qg3n JttxKRpAk2u2ftlLLIyYm8Unu20kiOoVtScG3XhmdmRa0iIy4H2906vLZAv9mvQgn3mW wEWdc0Nfp5VTElfhyWys1Pukq6xYskV2wT+h85A0J3nFw7EJnoBOqXFuqBIv4qu4ciPs 9jWWEGMY/fqIAA5mo4GKeubngGprp3TP4/92m2qQ5ylKGBMJR51eHjXs1i10TZt4YqBC BPyalkSy0XyLHLBtTlLGZLmVBHaUc+z7kycw9STymzOz/ZqcjcwhYCC70+tADUGWp+re ENRA== X-Forwarded-Encrypted: i=1; AJvYcCXd6UNcO3agRTbUcvwqXW7oHp9dvTElov0c9jOYe0JCbUS3EUHZlrBfPSf8IrPqgODsF06rymPANUNHg8FLp75QE1nnaD8= X-Gm-Message-State: AOJu0YyU7tHGrjO2qZmgtkFfbJ6bBg8Z2aqnTAvNfQ+RcKddwNuSShNz 5LYb0ydJJ32TOgJCGimyBsIkMlCtsSg5QHFlC+fDU8HV1LGTOm9lQuPQ1o2EXIUzjW++SuDZ5fb cyQMpNusOLelSS43/WJ0urD8V/tJIxA== X-Google-Smtp-Source: AGHT+IHgUHzBouBShBj1tmVCrI2r0VFEBuGdVq+7H5iW8vpwYKjMleYTQitG24/mbRkG7aVcUGknKIC+Vr+QJG5heQQ= X-Received: by 2002:a05:6512:1595:b0:516:d692:5e0b with SMTP id bp21-20020a056512159500b00516d6925e0bmr1405906lfb.54.1713526818086; Fri, 19 Apr 2024 04:40:18 -0700 (PDT) In-Reply-To: <87r0f1mvtx.fsf@thornhill.no> 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:283670 Archived-At: On Fri, Apr 19, 2024 at 12:32=E2=80=AFPM Theodor Thornhill wrote: > I wonder - why can't we use just buffer-file-truename? > > In the below function, wouldn't buffer-file-truename let us avoid the > file-truename in eglot-path-to-uri? Never used, but try it out. It seems it's already a built-in cache of whatever the buffer's truename is (and the docstring says it does call the slow `file-truename`). But like in my patch, it's a one-time thing. So yeah, if it's available in old Emacsen as well, it could replace `eglot--cached-tdi`, but then the search in the publishDiagnostics handler would have to be adjusted accordingly to call uri-to-path again. Try it out, may be cleaner indeed. Beware though, Stefan has fixed the tests which is very good, but there still isn't a test for the symlink scenario, so you'd have to test it manually (or even better, craft that test yourself, with clangd). Jo=C3=A3o