From unknown Sun Jun 22 08:10:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#72701: eglot crash when project-files-relative-names t Resent-From: Ship Mints Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 18 Aug 2024 15:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 72701 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 72701@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.17239959747859 (code B ref -1); Sun, 18 Aug 2024 15:47:02 +0000 Received: (at submit) by debbugs.gnu.org; 18 Aug 2024 15:46:14 +0000 Received: from localhost ([127.0.0.1]:56519 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sfi6g-00022g-2v for submit@debbugs.gnu.org; Sun, 18 Aug 2024 11:46:14 -0400 Received: from lists.gnu.org ([209.51.188.17]:34860) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sfi6d-00022Y-EW for submit@debbugs.gnu.org; Sun, 18 Aug 2024 11:46:11 -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 1sfi3r-0006nW-Oq for bug-gnu-emacs@gnu.org; Sun, 18 Aug 2024 11:43:20 -0400 Received: from mail-vs1-xe32.google.com ([2607:f8b0:4864:20::e32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sfi3l-0007mq-UZ for bug-gnu-emacs@gnu.org; Sun, 18 Aug 2024 11:43:16 -0400 Received: by mail-vs1-xe32.google.com with SMTP id ada2fe7eead31-49297fca3c2so1272392137.1 for ; Sun, 18 Aug 2024 08:43:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1723995792; x=1724600592; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=Ztsa3IUJu9CipLfEkZT/V63pl5TX4hicuK8SNU19kQk=; b=HAN71b75F2ZOTnkvT8rwkj1rEkTpTgL9b792p8QmmOMS8uAkp+kYcF9+gTGmxY0uto eo72be3HktPnIXKfKeBVhYrajjv9v9Zn4ueqcfEhWCDx85UzbSrf8YMzvDU2JgRd3kIS LUc2DPBo9TJSAKXXMjNevbDo0N8ehBAP2cS2geGPi1avZwuKcIX2X44pEdGkBp5wBDQ1 vEM+aN1Lty6RBiWqiRvmQaMbyL3/bQWOoh/EhKpNNgZfaLHLjvDjNTUMXhSwMXT1ZbxF lOkhb8/TA3raI0FsqtkCSjgeOpH2YHAdMi1bnEt2LzUucnVAzUMa9zkbbbxQf7scgbre ybuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723995792; x=1724600592; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Ztsa3IUJu9CipLfEkZT/V63pl5TX4hicuK8SNU19kQk=; b=F+Ywt3wRAZsQ2tVrwP+aK2AQj71GWYg1Dguw5KB1a2TE8G37oBkVQk5Jap+/uv2ept kyq4ezjdYFnnK8gM//1QVo5zjTo0OU1C1A+HQ0BdgMlTmWWXdiatlc0LfslkYQZS1BRu cNh/0U/WckKgG1pqIg3MA1UP27IHS8NMxJPBuXMfFijBQMt0wiBgLRtiwUMlMOzYqeE3 13vTEWpHSK32VaFlupGlyD6TQy8ehodLVdOrG/5UssszqV52ETlZQNAZERkYxQr5ogqn u7Goz0cHXtXR/yZ6cK8h9FzyeMcUrkj3I4z5iDvXuCcFSpmeR6FTM9XNSH0KK1tBhptQ haVg== X-Gm-Message-State: AOJu0YwZYJ+0kGlbumKm0DPQHFFPExRTfll3q5B2IY2KrGhfPtdMY7pJ MQaYrOolG9tmmvU5XcUy8AEMCUL2uJowk0MLicFNs1zoxxjJYgVlc86kH68Nm02eN2ULEZMc8R8 w2abrVaRldiWrjbn6QPp4QsNIiclG33DN X-Google-Smtp-Source: AGHT+IFRzOCDfm88HmVLMzBug0eDhBHPYqqLCe888RtS8MQAkxDaoqt9zDEkZKI/uGFfPQLw36KxP/LIYTd3iyvssM0= X-Received: by 2002:a67:e242:0:b0:498:9c0a:af1a with SMTP id ada2fe7eead31-4989c0abc0fmr3076286137.4.1723995792173; Sun, 18 Aug 2024 08:43:12 -0700 (PDT) MIME-Version: 1.0 From: Ship Mints Date: Sun, 18 Aug 2024 11:43:01 -0400 Message-ID: Content-Type: multipart/alternative; boundary="000000000000c97561061ff70cca" Received-SPF: pass client-ip=2607:f8b0:4864:20::e32; envelope-from=shipmints@gmail.com; helo=mail-vs1-xe32.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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) 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.3 (--) --000000000000c97561061ff70cca Content-Type: text/plain; charset="UTF-8" project-files-relative-names was introduced a few months ago, so it's no surprise that there are some side effects when set. This affects the handler for workspace/didChangeWatchedFiles. The result is that dirs-to-watch... (dirs-to-watch (delete-dups (mapcar #'file-name-directory (project-files (eglot--project server)))))) ...is nil when project-files-relative-names is t, due to file-name-directory failing to parse the directories it was expecting. This results in file-readable-p failing with a nil dir: (watch-dir (dir) (when-let ((probe (and (file-readable-p dir) One solution which I've tested is simply the defensive: (project-files-relative-names nil) ; add this (dirs-to-watch (delete-dups (mapcar #'file-name-directory (project-files (eglot--project server)))))) -Stephane --000000000000c97561061ff70cca Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
project-files-relative-names was introduced a few months=C2=A0ago, so it= 's no surprise that there are some side effects when set.

This affects the handler= for=C2=A0workspace/didChangeWatchedFiles. The result is that dirs-to-watch= ...

<= /div>
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0(dirs-to-watch
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 (delete-dups (mapcar #'file-name-directory
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0(project-files
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 (eglot--project server))))))

...is nil when=C2=A0project-files-relative-names is= t, due to file-name-directory failing to parse the directories it was expe= cting. This results in file-readable-p failing with a nil dir:

=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0(watch-dir (dir)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(whe= n-let ((probe
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0(and (file-readable-p dir)

One solution which I've = tested is simply the defensive:

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(project-files-relativ= e-names nil) ; add this
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0(dirs-to-watch
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (dele= te-dups (mapcar #'file-name-directory
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0(project-files
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (eglot--= project server))))))

-Stephane
--000000000000c97561061ff70cca-- From unknown Sun Jun 22 08:10:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#72701: eglot crash when project-files-relative-names t Resent-From: Ship Mints Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 22 Aug 2024 17:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72701 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 72701@debbugs.gnu.org Cc: Dmitry Gutov , =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Received: via spool by 72701-submit@debbugs.gnu.org id=B72701.17243463901201 (code B ref 72701); Thu, 22 Aug 2024 17:07:02 +0000 Received: (at 72701) by debbugs.gnu.org; 22 Aug 2024 17:06:30 +0000 Received: from localhost ([127.0.0.1]:38276 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1shBGX-0000JI-HJ for submit@debbugs.gnu.org; Thu, 22 Aug 2024 13:06:30 -0400 Received: from mail-oo1-f43.google.com ([209.85.161.43]:54650) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1shBGU-0000J6-LE for 72701@debbugs.gnu.org; Thu, 22 Aug 2024 13:06:28 -0400 Received: by mail-oo1-f43.google.com with SMTP id 006d021491bc7-5d59e491fefso676432eaf.1 for <72701@debbugs.gnu.org>; Thu, 22 Aug 2024 10:05:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724346274; x=1724951074; 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=NEmlNxut3bhJxdNU+h4Gv44ihOIM5dT7oZYNcenqxps=; b=ebGe0ue+DGarashlODnnIX/zPVSoI1vC2A8bvYRTUUTZvCIDaF6/xxUYIb1pJY7flo QVOkGC0eh622X3YyH/WmYdoqpLQQdoQL6saF8hZSTQAkLXyFhUL+r7YCdbrPENKARDGD JKN7i/DMigIe5uJI3sl4PEp92XjthQatiBxSnf3PMn2tICGicBaHR0GxDQ94zPHz45gV 20gqtcjs70AtEFVVe7Gk78anAmoNOtOEQCOEblu+uTx1/War/MiJNzIFneb+uqDHRoQ7 PJEkQyT4APdY2dl2glVjn/49wYnnkTxZj/gmoXe9RiYaY0greJhFlEVdEgMPlqCoTaNU BBCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724346274; x=1724951074; 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=NEmlNxut3bhJxdNU+h4Gv44ihOIM5dT7oZYNcenqxps=; b=u3qSn2XVzeDYcuOCGkgz5LaDmefRWPqaWfc/3SbsM1E1V489eArwmJwHE4hSkXv94D ej7y0Yuuvzdd7W/0jzFSE+/5PLQsKN8t/YlpZryz66VljdCJg5/E5Xh4Oza1R0qihfH4 4cvox1Y+w4l/J9I7qIkwCvgxpoL0oAUCA2Hsw5gzoVlzxF3d66o97NQbceY8+i5Y5hhi DWhXNgp1qhhyZqHDth1lM0jPaWbdHjQGoOlmM6hWLeJ9UyRYpko1bksiOyKqiqKPXtqS 9zFgXXtQmjuO3U9MJ3msuN4W68WImfUiEKzmgLIOsJnD4diOAhacXdY+NETFXP71NoB2 qkZg== X-Gm-Message-State: AOJu0YwhHNix4olmXXEmpGbyVfHflyv4WkOdCo7NaYm8YuuDizyCAgDJ DOVxvRyKvR7vKrjYcFE+atVpAsUNb4x1qj4fP9yawWvFP0lxlX67nSTaJ2ArjruATuO0wrgrQse Vz9TjIFasM5OXCy/xT+T5zW+KtSPw1t13 X-Google-Smtp-Source: AGHT+IEKnJXtGhAd9DvI7K5Ds0/YbTaMmzQ/edV6H5wSA91De4bQ6LoqHHv1McX0piKkydbpuLRIFBaYGuAM4yDboWU= X-Received: by 2002:a05:6358:705:b0:1aa:c8b7:4224 with SMTP id e5c5f4694b2df-1b5b37eb8b2mr307380355d.17.1724346274193; Thu, 22 Aug 2024 10:04:34 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Ship Mints Date: Thu, 22 Aug 2024 13:04:23 -0400 Message-ID: Content-Type: multipart/alternative; boundary="00000000000024a80f062048a7ca" X-Spam-Score: 0.0 (/) 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 (-) --00000000000024a80f062048a7ca Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Greetings, just want to make sure this fix doesn't get lost... -Stephane On Sun, Aug 18, 2024 at 11:46=E2=80=AFAM Ship Mints w= rote: > project-files-relative-names was introduced a few months ago, so it's no > surprise that there are some side effects when set. > > This affects the handler for workspace/didChangeWatchedFiles. The result > is that dirs-to-watch... > > (dirs-to-watch > (delete-dups (mapcar #'file-name-directory > (project-files > (eglot--project server)))))) > > ...is nil when project-files-relative-names is t, due to > file-name-directory failing to parse the directories it was expecting. Th= is > results in file-readable-p failing with a nil dir: > > (watch-dir (dir) > (when-let ((probe > (and (file-readable-p dir) > > One solution which I've tested is simply the defensive: > > (project-files-relative-names nil) ; add this > (dirs-to-watch > (delete-dups (mapcar #'file-name-directory > (project-files > (eglot--project server)))))) > > -Stephane > --00000000000024a80f062048a7ca Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Greetings, just want to make sure this fix doesn't get lost...
=

-Stephane

On = Sun, Aug 18, 2024 at 11:46=E2=80=AFAM Ship Mints <shipmints@gmail.com> wrote:
project-files-relative-names was int= roduced a few months=C2=A0ago, so it's no surprise that there are some = side effects when set.

This affects the handler for=C2=A0workspace/didChangeWatchedFiles= . The result is that dirs-to-watch...

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(dirs-to-watch=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (delete-dups (mapcar #'file-name= -directory
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(project-files
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (eglot--project server))))))

...is nil when=C2=A0= project-files-relative-names is t, due to file-name-directory failing to pa= rse the directories it was expecting. This results in file-readable-p faili= ng with a nil dir:

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(watch-dir (dir)
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0(when-let ((probe
=C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(and (file-readable= -p dir)

O= ne solution which I've tested is simply the defensive:

=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0(project-files-relative-names nil) ; add this
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(dirs-to-watch
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 (delete-dups (mapcar #'file-name-directory
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(project-files
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 (eglot--project server))))))

-Stephane
--00000000000024a80f062048a7ca-- From unknown Sun Jun 22 08:10:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#72701: eglot crash when project-files-relative-names t Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 22 Aug 2024 17:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72701 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Ship Mints Cc: dmitry@gutov.dev, 72701@debbugs.gnu.org, joaotavora@gmail.com Received: via spool by 72701-submit@debbugs.gnu.org id=B72701.17243491866015 (code B ref 72701); Thu, 22 Aug 2024 17:54:02 +0000 Received: (at 72701) by debbugs.gnu.org; 22 Aug 2024 17:53:06 +0000 Received: from localhost ([127.0.0.1]:38311 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1shBze-0001Yx-HS for submit@debbugs.gnu.org; Thu, 22 Aug 2024 13:53:06 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50796) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1shBzb-0001YQ-JL for 72701@debbugs.gnu.org; Thu, 22 Aug 2024 13:53:05 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1shByl-0003rf-Kd; Thu, 22 Aug 2024 13:52:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=DI8KxOJlOr+ddYjx6M6ytp9LlccrZrsxE2S08rFJIRo=; b=sHscUuJTbXf1JgFGEPS3 9Kkl1H55yQGOj3QuKhSVMPAryS9QkFKxpdwOVOAnE4Sp8i+ymjj8wyh3nZ9KOkXAgNXo84V7quRMi eTFmoJEnlg2Y/PwirQ7YeNDkKCijC6TkO07FaD0J3E6dmdRt/9WV+yp/WQT31b5IZDIvRZWHSPSEi XcN25UOOQ0Z/XttYtLT6ds1YAZD905+jPVU75QReGizT83qTFkjiIiMBylDhTop977FKjGfly3hmV NFeFOdPjDCr9RXhuftXY/Kp3m/yUz/d7vDmAIz43T45j8B5sgBVP9CLrsw+S0B7+AKj0GK4rIgy6k iZWwNng0URq8gA==; Date: Thu, 22 Aug 2024 20:52:08 +0300 Message-Id: <86bk1ksawn.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Ship Mints on Thu, 22 Aug 2024 13:04:23 -0400) References: MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) 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: -3.3 (---) > Cc: Dmitry Gutov , > João Távora > From: Ship Mints > Date: Thu, 22 Aug 2024 13:04:23 -0400 > > Greetings, just want to make sure this fix doesn't get lost... Fear not, patches don't get lost here. From unknown Sun Jun 22 08:10:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#72701: eglot crash when project-files-relative-names t Resent-From: Ship Mints Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 22 Aug 2024 17:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72701 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: dmitry@gutov.dev, 72701@debbugs.gnu.org, joaotavora@gmail.com Received: via spool by 72701-submit@debbugs.gnu.org id=B72701.17243493466303 (code B ref 72701); Thu, 22 Aug 2024 17:56:02 +0000 Received: (at 72701) by debbugs.gnu.org; 22 Aug 2024 17:55:46 +0000 Received: from localhost ([127.0.0.1]:38325 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1shC2E-0001db-0C for submit@debbugs.gnu.org; Thu, 22 Aug 2024 13:55:46 -0400 Received: from mail-vs1-f52.google.com ([209.85.217.52]:43246) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1shC2B-0001dK-8S for 72701@debbugs.gnu.org; Thu, 22 Aug 2024 13:55:44 -0400 Received: by mail-vs1-f52.google.com with SMTP id ada2fe7eead31-4989b18ee2aso1171609137.0 for <72701@debbugs.gnu.org>; Thu, 22 Aug 2024 10:54:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724349231; x=1724954031; 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=6C/PS1IInlS0eOZ21lwzCqmfdEJimKTucjGl/SKqDos=; b=nddLkB7LdDHlzfgbS4L0JNA8Jw1rwRzkW3xYEv0ESFuFnD+L/gDox7idxKSdh4Rx8k 9v3zDtOzYI00Ui080OmMubAXWKYURwONXWhtTeWZemrNNBGGLs7QsTWho94I/Y57BEYC rf5s8iX+m24pjfI7bBqbdbaPkhwwF7btGBg+qCbQUJUIjOh+8edIVe+uUp923z6lUgQu 4CVp/3dPX9QFJ543YOpU9rXTdisRlmHWjAuiiIgER9TQ2euTFIKpWkmJt88Zz3Bhu5mD KWaaRYeLhqDEhQ2RVx+lEZcwfvOs5+WYC3LJlxYxoGi7JsB13ejl5zI2oXnpH6ZTI8u2 qziQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724349231; x=1724954031; 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=6C/PS1IInlS0eOZ21lwzCqmfdEJimKTucjGl/SKqDos=; b=Awwcg3IYQ+wEiCfzUkC3Rfb6M/dpZIZOOcoNLfrA24PvHORe1PY6pgW519J039ZPgm NnDIQz3spjjWiTPskgJNGz9yjYvg6hCROE/YNlch0HwL8wL2kF9uFEKJbWd4aEUUJgkC SGWuEln//KrwJT6nDqSwibpJ21kekiVNbneP0SWGhs0iQuWPa6JJt9NKHGlMl3tHsS6Q CBw3O+vpTTQMTrxTUW3YaHiSpivsaBBCV06ar9VN+kOO7HovWvHEN6EktczxqDqDr6hp SVr2KeAt3D+3Gydu4/wEug85QwFeMRMWWF3ogbzBnlmOdRXWk8YEX/r3ey1PifLbtjcQ qT0A== X-Gm-Message-State: AOJu0YxOFsifT5b1ARBSMPsgQ0u2wv5eaR3jJnzGoUXnnU4H8Nso1bYo On2xBVjN1EmNKQ73g40OmiSt/xJp0BdluUke39y6zvNIZQfF72TFtxOLhIWOkL+WCPXUqlQs2hp wWaw0bi0OdhhpkmiaEo1DjVG9JeY= X-Google-Smtp-Source: AGHT+IHdZReGgozPbMxLVJaETkGpZdCBe6oPOOinZA10pXY7gTfpeQB5HuWNUiB7snNwps7avbKDn7LJXDfkxca52/4= X-Received: by 2002:a05:6102:f0e:b0:493:b3b5:cc29 with SMTP id ada2fe7eead31-498e2299178mr3502687137.12.1724349231162; Thu, 22 Aug 2024 10:53:51 -0700 (PDT) MIME-Version: 1.0 References: <86bk1ksawn.fsf@gnu.org> In-Reply-To: <86bk1ksawn.fsf@gnu.org> From: Ship Mints Date: Thu, 22 Aug 2024 13:53:40 -0400 Message-ID: Content-Type: multipart/alternative; boundary="000000000000646e210620495760" X-Spam-Score: 0.0 (/) 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 (-) --000000000000646e210620495760 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thank you. You're a machine! On Thu, Aug 22, 2024 at 1:52=E2=80=AFPM Eli Zaretskii wrote: > > Cc: Dmitry Gutov , > > Jo=C3=A3o T=C3=A1vora > > From: Ship Mints > > Date: Thu, 22 Aug 2024 13:04:23 -0400 > > > > Greetings, just want to make sure this fix doesn't get lost... > > Fear not, patches don't get lost here. > --000000000000646e210620495760 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thank you. You're a machine!

On Thu, Aug 22, 2024 at 1:52=E2=80= =AFPM Eli Zaretskii <eliz@gnu.org>= ; wrote:
> Cc= : Dmitry Gutov <dm= itry@gutov.dev>,
>=C2=A0 Jo=C3=A3o T=C3=A1vora <joaotavora@gmail.com>
> From: Ship Mints <shipmints@gmail.com>
> Date: Thu, 22 Aug 2024 13:04:23 -0400
>
> Greetings, just want to make sure this fix doesn't get lost...

Fear not, patches don't get lost here.
--000000000000646e210620495760-- From unknown Sun Jun 22 08:10:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#72701: eglot crash when project-files-relative-names t 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: Thu, 22 Aug 2024 20:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72701 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: dmitry@gutov.dev, 72701@debbugs.gnu.org, Ship Mints Received: via spool by 72701-submit@debbugs.gnu.org id=B72701.172435917123844 (code B ref 72701); Thu, 22 Aug 2024 20:40:02 +0000 Received: (at 72701) by debbugs.gnu.org; 22 Aug 2024 20:39:31 +0000 Received: from localhost ([127.0.0.1]:38419 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1shEag-0006CV-PW for submit@debbugs.gnu.org; Thu, 22 Aug 2024 16:39:31 -0400 Received: from mail-oo1-f41.google.com ([209.85.161.41]:52403) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1shEac-0006CE-FF for 72701@debbugs.gnu.org; Thu, 22 Aug 2024 16:39:30 -0400 Received: by mail-oo1-f41.google.com with SMTP id 006d021491bc7-5d5ed6f51cfso938372eaf.0 for <72701@debbugs.gnu.org>; Thu, 22 Aug 2024 13:38:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724359054; x=1724963854; 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=Wb9iT5vppBtwL/HlO9k8xiV0FbMQ13TlTupGx26RFKo=; b=OWnOkem+yJ4XLCWQbP94/WZFtLDGiJTET6vcGHnAV6ekJTA+R5cYbRgKYjLueIKEC6 4qdgf/6juhEpVHiiuW3CRy99otTeW4YyCPKbSyqMxQTTbXfDFmF5d6wGCkbFrYwv9bL4 3F5vKFSDqQintLwjh0Rmy49o1FG29ceJBIkJIntSlYo2aZkN3rfriAd6XnffauYz1I2x SN514RGYbpEGCdoqzFuAEh8h4Ghl958KAp40LH1TJxkayFshvcKwY8twCG35/zFgeUtP tawXc/o4HKRhVx3nJmCmKo4Mpw6XcbMKvMZxBA5ySDCmHjUAGxtlWR6TIsVtW32iaU7d dNPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724359054; x=1724963854; 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=Wb9iT5vppBtwL/HlO9k8xiV0FbMQ13TlTupGx26RFKo=; b=wiB8iiqAatq3EHiCLwbG5+r5hxxbNvz0+aXpnX4apNvJ3E9NGxPnP6zlM6HWZwwI5D A2dKrYKSfG5XcRoMcmgBviKQrixflQUYD/xbJvqq2gtf4BmTxGJ9i9afez+uhxu1JHfi YuvbHBDRyrpMH2W65m3PAw/GZEQTUI21tFZ+7GVyovec98twycPcPsgrvipCtz8nqqr2 Ydwq/z6Y6VDyM0RX8CyO4WiDZVJCMIHFDzhLnJJ2VZOf42PYF4dQiI9kU+k50qdAYZqH KN+Oc13FITCXkTTxNY8JfBQAtsfuKJ6GNz3ZN9VhJUUPvbBOM0PwarvNadq8O/ZtfRyy uCYg== X-Forwarded-Encrypted: i=1; AJvYcCUUxglZMM4Mn4WxRx7Ve32dw361BIy/Jzn5OPIy6qa5ffBxWLg249Ds0IDWYr3+WMrT0CjzXw==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yxy10ORt5CaRinIrbc3fLHb/dbAxypLN7K75WGv7N8e5Kl+pI7S xiWjAPjNd8GI7jjY8K2bxGUpFySI1kJ5bWG+LAW3hqF6A4200LlP7w1pONz9FyjltlLWY2KyAj4 +lMWvY0MLkdNxGsOwzbTap8E8Jk4= X-Google-Smtp-Source: AGHT+IGoHX7nK2PoGm8nLR0WrDstcP88U78M7PKrqA8j/PhMLHmwwFR+sVC7TLk4j75Wm/n1s/hcE5zfVUKTH0fzPO0= X-Received: by 2002:a05:6820:2221:b0:5ce:f75b:1755 with SMTP id 006d021491bc7-5dcb67f1267mr3862084eaf.4.1724359054283; Thu, 22 Aug 2024 13:37:34 -0700 (PDT) MIME-Version: 1.0 References: <86bk1ksawn.fsf@gnu.org> In-Reply-To: <86bk1ksawn.fsf@gnu.org> From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Date: Thu, 22 Aug 2024 21:38:49 +0100 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) 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 (-) If I understand the problem and the fix it's that `project-files` has its return value controlled by a global. Not sure that's a great API design (maybe it should change the end result some interactive commands instead). But adding the dynamic binding sounds fine, feel free to push, just add a good explanation in the commit message. Jo=C3=A3o On Thu, Aug 22, 2024 at 6:52=E2=80=AFPM Eli Zaretskii wrote: > > > Cc: Dmitry Gutov , > > Jo=C3=A3o T=C3=A1vora > > From: Ship Mints > > Date: Thu, 22 Aug 2024 13:04:23 -0400 > > > > Greetings, just want to make sure this fix doesn't get lost... > > Fear not, patches don't get lost here. --=20 Jo=C3=A3o T=C3=A1vora From unknown Sun Jun 22 08:10:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#72701: eglot crash when project-files-relative-names t Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 22 Aug 2024 23:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72701 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Ship Mints , 72701@debbugs.gnu.org, =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Received: via spool by 72701-submit@debbugs.gnu.org id=B72701.17243690308495 (code B ref 72701); Thu, 22 Aug 2024 23:24:02 +0000 Received: (at 72701) by debbugs.gnu.org; 22 Aug 2024 23:23:50 +0000 Received: from localhost ([127.0.0.1]:38553 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1shH9h-0002Cx-Jd for submit@debbugs.gnu.org; Thu, 22 Aug 2024 19:23:49 -0400 Received: from fout1-smtp.messagingengine.com ([103.168.172.144]:48757) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1shH9f-0002CQ-4b for 72701@debbugs.gnu.org; Thu, 22 Aug 2024 19:23:47 -0400 Received: from phl-compute-05.internal (phl-compute-05.nyi.internal [10.202.2.45]) by mailfout.nyi.internal (Postfix) with ESMTP id 9A3D113900FF; Thu, 22 Aug 2024 19:22:55 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Thu, 22 Aug 2024 19:22:55 -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=fm2; t=1724368975; x=1724455375; bh=9oYofAq1Yzz0AyK/eiB4ncyd7LnFmYb8h8uwJftGryE=; b= 0bQNUEa6LQqdKYDo7ljltoRwIh0ikcrXyB/QO57HodUM4Es5+yncWh43MmISrXSr LeHbluF49z/IiJ7TAG+kaXTpKUd3176j8Y+Bew00dKfYWo+DBeMC1Oz4j4pRp5on NruvxRDiXts3Q0lITKFq0obJa/Q4HKMCEy9SDWn25kAFCvdvjxH3Yb4HO77raOz1 6i1HmlLUWI3IyVDU4EnUSmQGp12L2PVi+n/DWX+I1ba2uZopMj85XaI2HdXEXtx7 c2IOrFOQOpzk7AMEnX+9kQOP9W4VRKwsVQiLlj66swUCmbzCkBruCfB9mtiMbUiq GGTUrn3X+lDE3ZwvJuGLTA== 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=fm1; t=1724368975; x= 1724455375; bh=9oYofAq1Yzz0AyK/eiB4ncyd7LnFmYb8h8uwJftGryE=; b=t XZF1WA5T7cH/bd8vyUrbobGwsLmVCQ/+EZ1m9/ZtYREu/sbe5jMVZRgqVOzFvEoj zUWoQlhD39ztd+wlK+fi9sURKfN3PITGDOp4poTm4bHvZVGXrwSZMNq0fR0Ytndu PX1mVElQXJSd0k1LYXsq1AUQr2DXwnAIz0Sbe+OA+GRy89FhB+zUc7ySrZYk/pkh DK8OAaSto0TlYP+SZ3wcwkBjnvWN1Ft43nNpE3eysctTUBumdRJpjgwkGdVN3aM4 mwK1jz3TGLPoKlusQfFiy2EuC7sPUmWSHYCUmS68Dj3wzncn9bjSoIDdl6FcmqNA 7f14RRzZkdZewRGk3eVDg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddruddvuddgvdduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepkfffgggfuffvfhfhjggtgfesthekredttddvjeen ucfhrhhomhepffhmihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvg hvqeenucggtffrrghtthgvrhhnpeegueegteffuddvjeevvdelleeitdeftdduhfeffeff jedukeevjedvfeffgfevgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpegumhhithhrhiesghhuthhovhdruggvvhdpnhgspghrtghpthhtohep fedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepshhhihhpmhhinhhtshesghhmrg hilhdrtghomhdprhgtphhtthhopeejvdejtdduseguvggssghughhsrdhgnhhurdhorhhg pdhrtghpthhtohepjhhorghothgrvhhorhgrsehgmhgrihhlrdgtohhm X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 22 Aug 2024 19:22:54 -0400 (EDT) Message-ID: Date: Fri, 23 Aug 2024 02:22:52 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird References: Content-Language: en-US From: Dmitry Gutov In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) 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.7 (-) Hi! On 18/08/2024 18:43, Ship Mints wrote: > project-files-relative-names was introduced a few months ago, so it's no > surprise that there are some side effects when set. > > This affects the handler for workspace/didChangeWatchedFiles. The result > is that dirs-to-watch... > >          (dirs-to-watch >           (delete-dups (mapcar #'file-name-directory >                                (project-files >                                 (eglot--project server)))))) > > ...is nil when project-files-relative-names is t, due to > file-name-directory failing to parse the directories it was expecting. > This results in file-readable-p failing with a nil dir: You're not really supposed to customize it as an end user (or at least not yet) - the caller code either sets it to t to indicate support for relative names, or not. >          (watch-dir (dir) >            (when-let ((probe >                        (and (file-readable-p dir) > > One solution which I've tested is simply the defensive: > >          (project-files-relative-names nil) ; add this >          (dirs-to-watch >           (delete-dups (mapcar #'file-name-directory >                                (project-files >                                 (eglot--project server)))))) ...that said, someday the default value of this var will be flipped, and some changes like that might be needed. The relative version is a bit faster, though, so maybe Eglot could switch to relative names too. If it makes sense. From unknown Sun Jun 22 08:10:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#72701: eglot crash when project-files-relative-names t Resent-From: Ship Mints Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 23 Aug 2024 15:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72701 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov Cc: 72701@debbugs.gnu.org, =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Received: via spool by 72701-submit@debbugs.gnu.org id=B72701.172442514710428 (code B ref 72701); Fri, 23 Aug 2024 15:00:02 +0000 Received: (at 72701) by debbugs.gnu.org; 23 Aug 2024 14:59:07 +0000 Received: from localhost ([127.0.0.1]:39973 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1shVkk-0002hz-VQ for submit@debbugs.gnu.org; Fri, 23 Aug 2024 10:59:06 -0400 Received: from mail-vk1-f179.google.com ([209.85.221.179]:58418) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1shVka-0002hG-4M for 72701@debbugs.gnu.org; Fri, 23 Aug 2024 10:59:01 -0400 Received: by mail-vk1-f179.google.com with SMTP id 71dfb90a1353d-4fd136aac40so443867e0c.0 for <72701@debbugs.gnu.org>; Fri, 23 Aug 2024 07:58:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724425019; x=1725029819; 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=mj3GHdpDUJLaNjqtFBx05HX4w567AABwNkQcevaxl18=; b=WKavM6t2KXxUPcoZNK8Ev0Gu9a0qb/2iuRuHYZZYLXtuaGUtVJnUqViEayInwqRhoJ mkcoYv65sIqrlHEogSaex1hBtyXy0rnxyp6PpW4wbILgnT1+fhstBpl5IhSj8gqY0oBa 8hRmK4GmBpdXQDFNAeynA72YnLBdfm0XVSd8RMRwsJZSwLGEm9c6ZgdfKRj8ryMJylxw pHNJMO44GGTcxtM0pnfE9NpIkU3BTCui4ywUycUwfVSKgdfDYYewj63tT0DdRD2iYj98 g/A0SY7j+uhoBbbpVVrTgyw8ns+bsxlzc5leAJ0zJiqKZjNESDzA1aTXfGp2BuPvqbXP iOuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724425019; x=1725029819; 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=mj3GHdpDUJLaNjqtFBx05HX4w567AABwNkQcevaxl18=; b=bZE1R4URTyTK0Vstg3e3FW85XsgVSfMtw8kNOQPG9UsHGZ0umBkE/3NsBkZ+3xPFcG DsF8lyBYBSDlRrd8RNRrcAChfYEeZcZ9Dz23YJVfHaf7RbzEW6c4as+4ud1VpL8sThqO W2qtV4KpzucEcujOllHO6uX85rkwKaIfigD1L/yeB2Rof5lRVvCOZ1DtqJDjROWN5hBD oL9dvTEgWERmr5W8ZnfgC9FkfXWc1iq3kge5wucWSIB16s2bWs8Tf2b+eZ+pHpzsYTIW 931jFia6XYequ+S0GfFJWkqFpwmu5ixrJdo9ITMOg0hUEd0028zam4aDVyQOEEGGmKOa UIJA== X-Gm-Message-State: AOJu0YzL8TbBhDW6F9tcg9Bu2KYz5aBEWq28eNs9ub2oqHi5RZb9kwn7 RVMuC8Touy0h10XHKBm4BIkPU6KsrGfRoykDaj4cztI0rs2OZV4mVp9iIeddDqeEWigu9Be2J/O pvqv63Htcn4BbfdIoS4VzHedPgvw= X-Google-Smtp-Source: AGHT+IGvKf86xz96tGMA3VBVSp5IxiVV8IFZ3J4JAY1jnSfUKtbz4TN50UcR+PNCEGOq42/QawK77HWxlaFVvqWaRjQ= X-Received: by 2002:a05:6122:1695:b0:4f6:aa3e:aa4c with SMTP id 71dfb90a1353d-4fd1a515ab7mr3175783e0c.3.1724425018694; Fri, 23 Aug 2024 07:56:58 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Ship Mints Date: Fri, 23 Aug 2024 10:56:47 -0400 Message-ID: Content-Type: multipart/alternative; boundary="000000000000ae630f06205afc7b" X-Spam-Score: 0.0 (/) 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 (-) --000000000000ae630f06205afc7b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Glad I set project-files-relative-names to t and have been testing. This side-effect in Eglot is sure to bite other people who are teased by the NEWS of this new option, despite not being a defcustom. If it is not intended to be set (yet? ever?), perhaps update the docstring to indicate this. I do tend to agree with Joao that the API to project-files probably could have an optional additional argument vs. a global, especially if the intention is merely to influence a specific call-site's expected results. WRT to Eglot using relative as default, in this context it is looking for directory components and relative names might need to be adorned at least with "./" so that file-name-directory doesn't fail. Perhaps project-files-relative-names could be set to a symbol such as 'retain-relative-directory-component. On Thu, Aug 22, 2024 at 7:22=E2=80=AFPM Dmitry Gutov wro= te: > Hi! > > On 18/08/2024 18:43, Ship Mints wrote: > > project-files-relative-names was introduced a few months ago, so it's n= o > > surprise that there are some side effects when set. > > > > This affects the handler for workspace/didChangeWatchedFiles. The resul= t > > is that dirs-to-watch... > > > > (dirs-to-watch > > (delete-dups (mapcar #'file-name-directory > > (project-files > > (eglot--project server)))))) > > > > ...is nil when project-files-relative-names is t, due to > > file-name-directory failing to parse the directories it was expecting. > > This results in file-readable-p failing with a nil dir: > > You're not really supposed to customize it as an end user (or at least > not yet) - the caller code either sets it to t to indicate support for > relative names, or not. > > > (watch-dir (dir) > > (when-let ((probe > > (and (file-readable-p dir) > > > > One solution which I've tested is simply the defensive: > > > > (project-files-relative-names nil) ; add this > > (dirs-to-watch > > (delete-dups (mapcar #'file-name-directory > > (project-files > > (eglot--project server)))))) > > ...that said, someday the default value of this var will be flipped, and > some changes like that might be needed. > > The relative version is a bit faster, though, so maybe Eglot could > switch to relative names too. If it makes sense. > --000000000000ae630f06205afc7b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Glad I set project-files-relative-names to t and have been testing. This= side-effect in Eglot is sure to bite other people who are teased by the NE= WS of this new option, despite not being a defcustom.

If it is not intended to be set (y= et? ever?), perhaps update the docstring to indicate this. I do tend to agr= ee with Joao that the API to project-files probably could have an optional = additional argument vs. a global, especially if the intention is merely to = influence a specific call-site's expected results.

WRT to Eglot using relative as de= fault, in this context it is looking for directory components and relative = names might need to be adorned at least with "./" so that file-na= me-directory doesn't fail. Perhaps project-files-relative-names could b= e set to a symbol such as 'retain-relative-directory-component.

On= Thu, Aug 22, 2024 at 7:22=E2=80=AFPM Dmitry Gutov <dmitry@gutov.dev> wrote:
Hi!

On 18/08/2024 18:43, Ship Mints wrote:
> project-files-relative-names was introduced a few months=C2=A0ago, so = it's no
> surprise that there are some side effects when set.
>
> This affects the handler for=C2=A0workspace/didChangeWatchedFiles. The= result
> is that dirs-to-watch...
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(dirs-to-watch
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (delete-dups (mapcar #'fi= le-name-directory
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(project-files
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (eglot--project server))))= ))
>
> ...is nil when=C2=A0project-files-relative-names is t, due to
> file-name-directory failing to parse the directories it was expecting.=
> This results in file-readable-p failing with a nil dir:

You're not really supposed to customize it as an end user (or at least =
not yet) - the caller code either sets it to t to indicate support for
relative names, or not.

>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(watch-dir (dir)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(when-let ((probe
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0(and (file-readable-p dir)
>
> One solution which I've tested is simply the defensive:
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(project-files-relative-names = nil) ; add this
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(dirs-to-watch
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (delete-dups (mapcar #'fi= le-name-directory
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(project-files
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (eglot--project server))))= ))

...that said, someday the default value of this var will be flipped, and some changes like that might be needed.

The relative version is a bit faster, though, so maybe Eglot could
switch to relative names too. If it makes sense.
--000000000000ae630f06205afc7b-- From unknown Sun Jun 22 08:10:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#72701: eglot crash when project-files-relative-names t 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, 23 Aug 2024 15:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72701 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Ship Mints Cc: Dmitry Gutov , 72701@debbugs.gnu.org Received: via spool by 72701-submit@debbugs.gnu.org id=B72701.172442573511935 (code B ref 72701); Fri, 23 Aug 2024 15:09:01 +0000 Received: (at 72701) by debbugs.gnu.org; 23 Aug 2024 15:08:55 +0000 Received: from localhost ([127.0.0.1]:39981 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1shVuJ-00036R-4t for submit@debbugs.gnu.org; Fri, 23 Aug 2024 11:08:55 -0400 Received: from mail-ot1-f49.google.com ([209.85.210.49]:54499) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1shVuG-00034z-CN for 72701@debbugs.gnu.org; Fri, 23 Aug 2024 11:08:54 -0400 Received: by mail-ot1-f49.google.com with SMTP id 46e09a7af769-7095bfd6346so1916501a34.0 for <72701@debbugs.gnu.org>; Fri, 23 Aug 2024 08:08:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724425619; x=1725030419; 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=y87nO0n5TZd0rdstJxGZRz5SitTsrnmJ+CyJJ+pY+Yg=; b=F47hGYRdGnyKKEV0wYZVFKqBoO0CD6W9ohafPsHH1FBmaf/Uti3RWs3Bf3uJEXPK5N SSLFyQlGn5KX8xYFMCik3HvDBP4oe9LJnRgu8uoMLq5dfZeI24g/5WRa3lncRhtOS8Fb nTJ+tfKOn77wcR5GCTBQgiU7lBhgpqQL7Q/xPbSsDNFVy9pQGESzi4+XEuWj1oLwbQJ3 Rfsa+RE44uY08wLQlJzN5GZBNOxAj0Z2tPfjzbSsRFVgjSx71DxIQwxd2HBLVVQC8yJU JDWogwS9TjH5/BJuQHPtuPS5r1ta8M8JtlyuEaTKbz4g4EmYfRbAReKJrC/HIUSmo0Bw 6TMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724425619; x=1725030419; 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=y87nO0n5TZd0rdstJxGZRz5SitTsrnmJ+CyJJ+pY+Yg=; b=vHakOaxqYDnglaXJRzhcnT5HQXJZ76VdyAFWYr1rSxULM0oPnTlMHu6O7XpkoSk2Ul t7Z6wOkAS7vuBqaz0SgqFjLcxwC1mFdExiprPHmAKRGlM48AkSGECBl/3Ur9wrUc+y5M zu+0yeZLcYHsxlVhzPqaOV5PcbVTbDr4lge5+CCjpR4L+Is8gNVaCVIhcWqwwy0xoABg BKnMiuDDhYKgHcuL/VWVyveFPgre9zYEUtJXjDcsxjhzdGoOZRVcyxBeL5nMostRHFXy P+LI+wgCQ+HB0cz5K8Z1bUT2jjcwb4UmmdHxomrOrYiYii2ZC46Y99jvfgHjebeQYZZq I56g== X-Forwarded-Encrypted: i=1; AJvYcCWUC7lPkilx8BhEIgtzU4Nb76bR5XGLR5hdcU6G/pqkuJbQawR8X5lxnC47gPfQfpUIUomQ6Q==@debbugs.gnu.org X-Gm-Message-State: AOJu0YzjADPFGXKI3WtA8z+alkOmO0nv/ugPU7u7Ri9gzk+v7KQMlXnY pfExIrnFe0aTQax47JbcDXUK7V9PpCZdNuS8bSEzd/va8f/VOyoJrpDG1bkicSD1pzrpIIQsFX7 XlqdnJcj/Y6DOTU8pRrI5qLr+wrA= X-Google-Smtp-Source: AGHT+IF3+R4NUDpte096c1yyGOxmFPIlXi8PIFuJN0Pg9qN0U/OTIGepIGiwNIh3FqCEDgxm2DSOkI6MzfWnpNi/5Ps= X-Received: by 2002:a05:6808:1914:b0:3d5:65d5:edae with SMTP id 5614622812f47-3de2a8a0828mr2963284b6e.27.1724425618966; Fri, 23 Aug 2024 08:06:58 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Date: Fri, 23 Aug 2024 16:08:15 +0100 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) 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, Aug 23, 2024 at 3:56=E2=80=AFPM Ship Mints wr= ote: > > Glad I set project-files-relative-names to t and have been testing. This = side-effect in Eglot is sure to bite other people who are teased by the NEW= S of this new option, despite not being a defcustom. If it's not a defcustom and, as Dmitry said, not meant to be set by the use= r, I suggest you _don't_ set it globally, but ask for it to be let-bound in whatever features you want to make use of it. Eglot could be one of those features if there's a performance advantage. But I doubt it, because server-supplied glob expressions may target the full file name (indeed likely the truename). Maybe it's worth it neverthel= ess, dunno. Anyway while let-binding p-f-r-names to nil in Eglot could work, I don't think it's the right solution, especially since it probably triggers = a compilation warning in older Emacsen which don't have this. Unrelated, there are other enhancements to Eglot's file-watching machinery. One of them is about excluding files from over-eager watching by the server which could eventually bump into OS limits for these OS objects. Jo=C3=A3o T=C3=A1vora From unknown Sun Jun 22 08:10:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#72701: eglot crash when project-files-relative-names t Resent-From: Ship Mints Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 23 Aug 2024 15:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72701 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Cc: dmitry@gutov.dev, Eli Zaretskii , 72701@debbugs.gnu.org Received: via spool by 72701-submit@debbugs.gnu.org id=B72701.172442579912215 (code B ref 72701); Fri, 23 Aug 2024 15:10:02 +0000 Received: (at 72701) by debbugs.gnu.org; 23 Aug 2024 15:09:59 +0000 Received: from localhost ([127.0.0.1]:39985 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1shVvK-0003Aw-I5 for submit@debbugs.gnu.org; Fri, 23 Aug 2024 11:09:58 -0400 Received: from mail-oo1-f43.google.com ([209.85.161.43]:53294) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1shVvH-0003Ac-SF for 72701@debbugs.gnu.org; Fri, 23 Aug 2024 11:09:57 -0400 Received: by mail-oo1-f43.google.com with SMTP id 006d021491bc7-5daa4f8f1c4so1598915eaf.2 for <72701@debbugs.gnu.org>; Fri, 23 Aug 2024 08:09:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724425683; x=1725030483; 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=qsLxKem+HXG/dwNN+Q0VzJp971/aY6+JyZhfbcU+hfg=; b=im+YtJPMeD43oZHv00kJR13cfOflGAx2HR4I3YBT1c/QTSSxwlsjIuYY0TSf6JLt+U leI3zfGVD6m3+foIVXCBhQtzMOYE5Oe3kYHBQ4luI5wNmaQZ3Ur0tIX80j798EHjjgo6 LvegUOmq8jHWrlF8nFZ7HSzPqgar6JCQNhWk63r7rFt5hFcxqm8mLLltnEbT57VLuzZn IcKdbMDYcYrsyQlDc6kkqM0S4ckZ8X+FNiG6gGVTuQMtJrm3EBdYJQ2sFRRRkUOBfynN 0ckJu0lDx4w3sNLACX87csmeorZF5h6fRVOzX5EqZ7HWnEqWLGwPhQdFvzcu18TZTxsF ZRSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724425683; x=1725030483; 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=qsLxKem+HXG/dwNN+Q0VzJp971/aY6+JyZhfbcU+hfg=; b=AgnZChWfVGouKqqnRxpcawpyfyQwW40trqpYxdIynWPa7e+tDKthARM7gdtiCbyV3n FenZzSRvn2zgXsdvdKi/9+yxZbbnOtMBDxSMJkRKfO0NzC4ali+1n/lQnAx8YbhS9Pv2 ZU0f4CpjwDl9ulUIkYdY7ujkdiw/w5rrfE3T/PfMpdJ296TPiIdXSOzZ2EN3a+a4oUeh N/4VCyxwLTNFSXQaoZ9DpJTrqpb+HSqPrbGjJpxH0Z7GFaD6cETTmQNvdcWoLa6YuMwV zrOEabJAugbWmnVwbxqbngp2XwlkypsKxz/G0mt8QrRMgGuWg2zDlWvcAJ23jKhKgyxs uU9A== X-Forwarded-Encrypted: i=1; AJvYcCUThd7ScLolxsPRgw6s7fLOH7SGYFd9nN2samHvj3YHnrbQy70OkZezDi7xEKV4RM61sVhyPA==@debbugs.gnu.org X-Gm-Message-State: AOJu0YyM0d7QkkS4Rh0M55RtFZhUA63eVb1XWvA08HsE5xNSLdvI4Qob NYnEJYvk5Tbq++7PFn4W/LKPOMXX1It/a3VwPMOViYQX6BX8DjxH44wPSwVOEohGyMpYUHoenyL OT7q+0aS8q3/OAQzf4i4t/4X2RyvtH41k X-Google-Smtp-Source: AGHT+IE3AOG67iVJheTjSYLtwb6hNLM12bPEVLcsM8CDmeO9Kzwc6i2GRX2U+9krKddEHsCgk+csslumoEUa/74otl4= X-Received: by 2002:a05:6358:2624:b0:1aa:b8ba:8e with SMTP id e5c5f4694b2df-1b5c3b30b5cmr255012855d.22.1724425682717; Fri, 23 Aug 2024 08:08:02 -0700 (PDT) MIME-Version: 1.0 References: <86bk1ksawn.fsf@gnu.org> In-Reply-To: From: Ship Mints Date: Fri, 23 Aug 2024 11:07:51 -0400 Message-ID: Content-Type: multipart/alternative; boundary="00000000000042975f06205b244b" X-Spam-Score: 0.0 (/) 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 (-) --00000000000042975f06205b244b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Jo=C3=A3o, I don't have Emacs git access so I'll write the equivalent comme= nt and commit message here. ----- (project-files-relative-names nil) ; override global to ensure directory components are retained (dirs-to-watch (delete-dups (mapcar #'file-name-directory (project-files (eglot--project server)))))) ----- "project.el has a global, project-files-relative-names, which influences project-files to return results without parent directory prefixes and this causes file-name-directory to fail to detect directories at the root of the parent. We disable project-files-relative-names to ensure complete results.= " On Thu, Aug 22, 2024 at 4:37=E2=80=AFPM Jo=C3=A3o T=C3=A1vora wrote: > If I understand the problem and the fix it's that `project-files` has > its return value controlled by a global. > > Not sure that's a great API design (maybe it should change the end > result some interactive commands instead). > But adding the dynamic binding sounds fine, feel free to push, just > add a good explanation in the commit message. > > Jo=C3=A3o > > On Thu, Aug 22, 2024 at 6:52=E2=80=AFPM Eli Zaretskii wrot= e: > > > > > Cc: Dmitry Gutov , > > > Jo=C3=A3o T=C3=A1vora > > > From: Ship Mints > > > Date: Thu, 22 Aug 2024 13:04:23 -0400 > > > > > > Greetings, just want to make sure this fix doesn't get lost... > > > > Fear not, patches don't get lost here. > > > > -- > Jo=C3=A3o T=C3=A1vora > --00000000000042975f06205b244b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Jo=C3=A3o, I don't have Emacs git access so I'l= l write the equivalent comment and commit message here.

-----
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(= project-files-relative-names nil) ; override global to ensure directory com= ponents are retained
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(dirs-to-watch=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (delete-dups (mapcar #'file-name-di= rectory
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(project-files
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (eglot--project server))))))
-----

"project.el has a g= lobal, project-files-relative-names, which influences project-files to retu= rn results without parent directory prefixes and this causes file-name-dire= ctory to fail to detect directories at the root of the parent. We disable p= roject-files-relative-names to ensure complete results."
On Thu, = Aug 22, 2024 at 4:37=E2=80=AFPM Jo=C3=A3o T=C3=A1vora <joaotavora@gmail.com> wrote:
If I understand the problem and = the fix it's that `project-files` has
its return value controlled by a global.

Not sure that's a great API design (maybe it should change the end
result some interactive commands instead).
But adding the dynamic binding sounds fine, feel free to push, just
add a good explanation in the commit message.

Jo=C3=A3o

On Thu, Aug 22, 2024 at 6:52=E2=80=AFPM Eli Zaretskii <eliz@gnu.org> wrote:
>
> > Cc: Dmitry Gutov <dmitry@gutov.dev>,
> >=C2=A0 Jo=C3=A3o T=C3=A1vora <joaotavora@gmail.com>
> > From: Ship Mints <shipmints@gmail.com>
> > Date: Thu, 22 Aug 2024 13:04:23 -0400
> >
> > Greetings, just want to make sure this fix doesn't get lost..= .
>
> Fear not, patches don't get lost here.



--
Jo=C3=A3o T=C3=A1vora
--00000000000042975f06205b244b-- From unknown Sun Jun 22 08:10:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#72701: eglot crash when project-files-relative-names t Resent-From: Ship Mints Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 23 Aug 2024 15:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72701 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Cc: Dmitry Gutov , 72701@debbugs.gnu.org Received: via spool by 72701-submit@debbugs.gnu.org id=B72701.172442592812507 (code B ref 72701); Fri, 23 Aug 2024 15:13:02 +0000 Received: (at 72701) by debbugs.gnu.org; 23 Aug 2024 15:12:08 +0000 Received: from localhost ([127.0.0.1]:39995 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1shVxP-0003Ff-Hn for submit@debbugs.gnu.org; Fri, 23 Aug 2024 11:12:07 -0400 Received: from mail-oo1-f50.google.com ([209.85.161.50]:58747) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1shVxO-0003F6-7W for 72701@debbugs.gnu.org; Fri, 23 Aug 2024 11:12:06 -0400 Received: by mail-oo1-f50.google.com with SMTP id 006d021491bc7-5dca990cf58so1630963eaf.1 for <72701@debbugs.gnu.org>; Fri, 23 Aug 2024 08:11:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724425813; x=1725030613; 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=Ll5yvz3I3RGKMtVEmya4RMdXYPG004nIYNwn/V6f0EI=; b=B5f/FD3yexijtPL0Af5dYh47YdkJLjwyrLPrYkxd5uLRFpPKtDV5ukg1InCIdGdD32 NQx678ta5GFVVru+d1jbD9RlTF7zCNoucaMixvrVcyyJvWcrmRmHVz5n2NJAYQQjb4TA vB7yjs0o7olGWXzG4sBss44DyNX00S166/At0XJMzyi+xYDO2unPhiqvZ8HK1j24rs9C PJcdEXDEyBRnfr4mCDOO2ADtNPpY1829ksye0mQ8VJK1WzSGxGUwLEEhekOa+O/LYE4F xOPvQbA3st1MpGQzPpWh0jgL4piDMipeXwuEmcG0V+Qp6Mkq8pxQtpm+S1BhvAaz1R1B okwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724425813; x=1725030613; 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=Ll5yvz3I3RGKMtVEmya4RMdXYPG004nIYNwn/V6f0EI=; b=dadAyP1cpg32oEEQ7+Ztq8calQyr7etTuwTTkTovDyKAI0wTBOTKxjiUQkIgThgqwA ze7NjYjgIvqM0kuOYprNhTVDgGvUYYVhfZTL7ohZnP3H2RibmTIlF+mcDp3uYrETKXa2 2DsrabguCpF0kT9UT3WzWFHRs2XKEloB9TVgufTJx4ic2h/XeEHeGGYrTqa89Mf5SdZ0 YvlJbsciZaVAMmqBt4pW+0IDBfSqu9vY9Zx7HZU/QJbRjAYHhL9p1iG+c0+Ts5RgzjTt YaoPscCOTTCFWwMxptDKidivmX23oxZoA4Kt7lkNiDUdWdinUcWjufkIwkFpgx28c7BL KfuA== X-Forwarded-Encrypted: i=1; AJvYcCW6//TVEBaaJ2/p6n+MOvK6xaBRN33sDFLoV2J7H181jlpXrX79+tjO6KtVA3HewIaUT/LjWw==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yy78VcqLEJttZbQa8L1tkeAo1dDsCwz51OY+rkw9Udi9/EBJQQg Yt8jD7xqrvD1KG+B1FvfHkmDBsv7fUfIdH3hU078k201mB2B7mVCEqgL1A7CT+ODZjKKQGTNSfr qhif1fJHCNH4ZG2MQzAKRSxaL+Yo= X-Google-Smtp-Source: AGHT+IFuLhJ52AkuNS2mbMI53z5mnYr1/+Z5JC/TO2vqTqXIVmVxtmwoetl2UejZxsLaZ2/vM6llxHaTL1ujqnQw/tY= X-Received: by 2002:a05:6358:4309:b0:1aa:bad6:2ba7 with SMTP id e5c5f4694b2df-1b5c22eaa75mr325703255d.25.1724425813247; Fri, 23 Aug 2024 08:10:13 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Ship Mints Date: Fri, 23 Aug 2024 11:10:02 -0400 Message-ID: Content-Type: multipart/alternative; boundary="0000000000000a512506205b2cf5" X-Spam-Score: 0.0 (/) 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 (-) --0000000000000a512506205b2cf5 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Already disabled. But still glad I experimented. On Fri, Aug 23, 2024 at 11:06=E2=80=AFAM Jo=C3=A3o T=C3=A1vora wrote: > On Fri, Aug 23, 2024 at 3:56=E2=80=AFPM Ship Mints = wrote: > > > > Glad I set project-files-relative-names to t and have been testing. Thi= s > side-effect in Eglot is sure to bite other people who are teased by the > NEWS of this new option, despite not being a defcustom. > > If it's not a defcustom and, as Dmitry said, not meant to be set by the > user, > I suggest you _don't_ set it globally, but ask for it to be let-bound > in whatever > features you want to make use of it. > > Eglot could be one of those features if there's a performance advantage. > But I doubt it, because server-supplied glob expressions may target the > full file name (indeed likely the truename). Maybe it's worth it > nevertheless, > dunno. Anyway while let-binding p-f-r-names to nil in Eglot could work, = I > don't think it's the right solution, especially since it probably trigger= s > a > compilation warning in older Emacsen which don't have this. > > Unrelated, there are other enhancements to Eglot's file-watching > machinery. One of them is about excluding files from over-eager watching > by the server which could eventually bump into OS limits for these > OS objects. > > Jo=C3=A3o T=C3=A1vora > --0000000000000a512506205b2cf5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Already disabled. But still glad I experimented.

On Fri, Aug 23, 20= 24 at 11:06=E2=80=AFAM Jo=C3=A3o T=C3=A1vora <joaotavora@gmail.com> wrote:
On Fri, Aug 23, 2024 at 3:56=E2=80=AFPM S= hip Mints <ship= mints@gmail.com> wrote:
>
> Glad I set project-files-relative-names to t and have been testing. Th= is side-effect in Eglot is sure to bite other people who are teased by the = NEWS of this new option, despite not being a defcustom.

If it's not a defcustom and, as Dmitry said, not meant to be set by the= user,
I suggest you _don't_ set it globally, but ask for it to be let-bound in whatever
features you want to make use of it.

Eglot could be one of those features if there's a performance advantage= .
But I doubt it, because server-supplied glob expressions may target the
full file name (indeed likely the truename).=C2=A0 Maybe it's worth it = nevertheless,
dunno.=C2=A0 Anyway while let-binding p-f-r-names to nil in Eglot could wor= k, I
don't think it's the right solution, especially since it probably t= riggers a
compilation warning in older Emacsen which don't have this.

Unrelated, there are other enhancements to Eglot's file-watching
machinery.=C2=A0 One of them is about excluding files from over-eager watch= ing
by the server which could eventually bump into OS limits for these
OS objects.

Jo=C3=A3o T=C3=A1vora
--0000000000000a512506205b2cf5-- From unknown Sun Jun 22 08:10:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#72701: eglot crash when project-files-relative-names t 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, 23 Aug 2024 22:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72701 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Ship Mints Cc: dmitry@gutov.dev, Eli Zaretskii , 72701@debbugs.gnu.org Received: via spool by 72701-submit@debbugs.gnu.org id=B72701.172445338929501 (code B ref 72701); Fri, 23 Aug 2024 22:50:02 +0000 Received: (at 72701) by debbugs.gnu.org; 23 Aug 2024 22:49:49 +0000 Received: from localhost ([127.0.0.1]:40206 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1shd6L-0007fl-Eg for submit@debbugs.gnu.org; Fri, 23 Aug 2024 18:49:49 -0400 Received: from mail-oo1-f44.google.com ([209.85.161.44]:43120) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1shd6G-0007fP-MA for 72701@debbugs.gnu.org; Fri, 23 Aug 2024 18:49:47 -0400 Received: by mail-oo1-f44.google.com with SMTP id 006d021491bc7-5d5af7ae388so1937272eaf.0 for <72701@debbugs.gnu.org>; Fri, 23 Aug 2024 15:48:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724453271; x=1725058071; 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=/r2JcjaPw8apUr2a9Z9kRCD/gBlMlHcr0+8bzjMppB0=; b=a9a7S5oYbZYDYdxSHb1rjVH1CAxGdgbaQM8h33B3rtH6vH+6LsTmJMYrDDxRvFnRUJ JrG1b7PTQvaVb59wrejy1nYswP4StIwDLq8mreHTjrM364U/SnsWuFimrmO/VB508X6g yLhwc9JTv1uue5taRNMzNsdHWkTzB7awBGrJ8DpnIF+a6rlN/jJZc6eQ4ksMGgh2NzR8 Aq5+XJVf+cyuRdRanXz23vslLP/eQF3/DT+/HZy7FWV7D2p8HCAhv42R/VsnrXJGm8BJ cQ4ioZo5s0CC6luZPr2T/lKVbExnBhFjvcq2crejoEAor29tAlS+DPoRAehBkaq57KvE Yyvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724453271; x=1725058071; 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=/r2JcjaPw8apUr2a9Z9kRCD/gBlMlHcr0+8bzjMppB0=; b=oY7yMR9DGiPe1/RY/6lM/QF3ubZoTxCfdOzolAgWLIsB7+NSr58eD4NcdijhXiod5R HfO1dh2VHD4SGTaLDhp588v4h4C4G6aAIxFfxtGIKPIFa/3tHcVA1RyCMtewGijnVzQQ fcFRgYSqupGquh/lNOgvnZVhKPzsAcFqcAYXoIdst+ghf0wk7FpnmC8yvRv2jagM3+4M HC2ouo1S3PpHJd3yneVuMnJapC52QEnSalqGyUOYP9AQwlftlWNvd2e0ZyNZelzrlAsT BuQHhTt/tXKsTTEIy+FFIjIa4Wg7c56k5DJ0SmxbhAmxkIeV9sZvqcmn7LFvUDSjrZzn c2/Q== X-Forwarded-Encrypted: i=1; AJvYcCUjvMmji38SJt4lVnAWgdCCWK4yERWSYUqEg7tQVWaFpfooBTKffac9LP+0Ljx01uDiCa+kZw==@debbugs.gnu.org X-Gm-Message-State: AOJu0YxsblP/wOaNPWY6pMl1olliFV72R6c0EStOK37ml8wJ5QdzsY4/ iPXdFJta2QhnE6tb4IhztqEfXzb7mh7r4sBpyE6EvyLT/42VAVQIDG8OabEN/mCZJfMyTCeGRmM 5f9U4YY4CI5OC/eQsv2jgzMhNTDo= X-Google-Smtp-Source: AGHT+IFdGsrGk+WKtaIOqruCkuw9xW2U5OQ7M0o/qVtnWJXfsTPLLMfQyde2+SS0eu8G95+08h21QV11T8LWUo7qVjI= X-Received: by 2002:a05:6870:e310:b0:260:286c:ca07 with SMTP id 586e51a60fabf-273e45eb0a0mr1566541fac.12.1724453271127; Fri, 23 Aug 2024 15:47:51 -0700 (PDT) MIME-Version: 1.0 References: <86bk1ksawn.fsf@gnu.org> In-Reply-To: From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Date: Fri, 23 Aug 2024 23:49:07 +0100 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) 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 (-) Even without git access you can still submit a full patch prepared with something like 'git format-patch'. But this is enough, I think. Thanks. I think I'll leave it to Dmitry to decide what to do here. Jo=C3=A3o On Fri, Aug 23, 2024 at 4:08=E2=80=AFPM Ship Mints wr= ote: > > Jo=C3=A3o, I don't have Emacs git access so I'll write the equivalent com= ment and commit message here. > > ----- > (project-files-relative-names nil) ; override global to ensure d= irectory components are retained > (dirs-to-watch > (delete-dups (mapcar #'file-name-directory > (project-files > (eglot--project server)))))) > ----- > > "project.el has a global, project-files-relative-names, which influences = project-files to return results without parent directory prefixes and this = causes file-name-directory to fail to detect directories at the root of the= parent. We disable project-files-relative-names to ensure complete results= ." > > On Thu, Aug 22, 2024 at 4:37=E2=80=AFPM Jo=C3=A3o T=C3=A1vora wrote: >> >> If I understand the problem and the fix it's that `project-files` has >> its return value controlled by a global. >> >> Not sure that's a great API design (maybe it should change the end >> result some interactive commands instead). >> But adding the dynamic binding sounds fine, feel free to push, just >> add a good explanation in the commit message. >> >> Jo=C3=A3o >> >> On Thu, Aug 22, 2024 at 6:52=E2=80=AFPM Eli Zaretskii wro= te: >> > >> > > Cc: Dmitry Gutov , >> > > Jo=C3=A3o T=C3=A1vora >> > > From: Ship Mints >> > > Date: Thu, 22 Aug 2024 13:04:23 -0400 >> > > >> > > Greetings, just want to make sure this fix doesn't get lost... >> > >> > Fear not, patches don't get lost here. >> >> >> >> -- >> Jo=C3=A3o T=C3=A1vora --=20 Jo=C3=A3o T=C3=A1vora From unknown Sun Jun 22 08:10:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#72701: eglot crash when project-files-relative-names t Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 23 Aug 2024 23:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72701 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= , Ship Mints Cc: 72701@debbugs.gnu.org Received: via spool by 72701-submit@debbugs.gnu.org id=B72701.17244571364024 (code B ref 72701); Fri, 23 Aug 2024 23:53:01 +0000 Received: (at 72701) by debbugs.gnu.org; 23 Aug 2024 23:52:16 +0000 Received: from localhost ([127.0.0.1]:40220 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1she4m-00012o-Da for submit@debbugs.gnu.org; Fri, 23 Aug 2024 19:52:16 -0400 Received: from fout8-smtp.messagingengine.com ([103.168.172.151]:57423) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1she4j-00012X-MK for 72701@debbugs.gnu.org; Fri, 23 Aug 2024 19:52:14 -0400 Received: from phl-compute-06.internal (phl-compute-06.nyi.internal [10.202.2.46]) by mailfout.nyi.internal (Postfix) with ESMTP id 49BE013904D0; Fri, 23 Aug 2024 19:51:20 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-06.internal (MEProxy); Fri, 23 Aug 2024 19:51:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :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=fm2; t=1724457080; x=1724543480; bh=MQ1hCZsEBFRoZeNXy/STjXqez4ElktaYE4+khuDE/6A=; b= j+VOR9zuCPbiNRNBK3H01dK8zVWmoJnT5Gb2LyABbbyqx8MQiNvbGoHl9AsYr51q zVMqsZaCszwLk0oHySH9P+vxvvBmCRUxtHFUYRa2RLLaLWzI8UpL3pS9BcZZ5Fhl 5HVOH4kLwXiZr7vDU0oNqptS8qnUudfiHLQmvTjYeZ7LSckALHwCvr0cKeVzTPT8 IluHAkbomrOB9CZ6zwwjnkRmJMtNEHnQAwyJT/6HS0tJRUczlv+KucYy0F53hUSF cU6oHP5JOM+Ro/TEGozon3AFSc2XWjYkttUrQG1bGgpl7gH18AGYsD3p+jApMI1G J9+/1K6QcIjb+ZjphCnrsw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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=fm1; t=1724457080; x= 1724543480; bh=MQ1hCZsEBFRoZeNXy/STjXqez4ElktaYE4+khuDE/6A=; b=R FeT/Hi1Dx2JLhbw6l7/8H4njCmxv6sK2Tuo5NhFo8dWhNJKjPYG69VvDumXE71IN WgJqf1HIfLHFlxBCTsC0It0UaZgsiK7hP1qk7UHKcpMp0yuioGwvHkzoELhR5opb co7AtsrUBubAmjO7tYSnMU7jaLvo25ScmI1cw7xXc0MAaTU3jmWKfvHhI+Z3IYld hbnFHGF6Xh1/3e3QNPbb5wBdw7epXKlyoXAMB/hXhVv3Ooqg0IyG4lsFcjMf/Lvp YXyRmPNYZmdTy/nsYBR1DR8RVrPYhCxFvYwQfe8o+7dOEWlJJrvAVxa3AGnrfV0C VynyYrfL9jtofW8+z7/zg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddruddvfedgvdejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtvdej necuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdrug gvvheqnecuggftrfgrthhtvghrnhepgeelfeetkefghfdvhfdtgeevveevteetgeetveeg tedthefhudekteehffeukeeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghvpdhnsggprhgtphhtthho peefpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehjohgrohhtrghvohhrrgesgh hmrghilhdrtghomhdprhgtphhtthhopehshhhiphhmihhnthhssehgmhgrihhlrdgtohhm pdhrtghpthhtohepjedvjedtudesuggvsggsuhhgshdrghhnuhdrohhrgh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 23 Aug 2024 19:51:19 -0400 (EDT) Message-ID: <7ddfb028-a182-486d-bb72-aeb26e0d1d4d@gutov.dev> Date: Sat, 24 Aug 2024 02:51:16 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird References: Content-Language: en-US From: Dmitry Gutov In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) 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.7 (-) On 23/08/2024 18:08, João Távora wrote: > Eglot could be one of those features if there's a performance advantage. > But I doubt it, because server-supplied glob expressions may target the > full file name (indeed likely the truename). If the glob can match the full name, and it's hard to separate it into two matchers, I suppose there's not much that could be done. The binding is probably and an improvement for some off-in-the-future scenario where somebody has Emacs 30 installed, but upgrades project.el to some yet-unreleased version where the variable's default is flipped. > Maybe it's worth it nevertheless, > dunno. Anyway while let-binding p-f-r-names to nil in Eglot could work, I > don't think it's the right solution, especially since it probably triggers a > compilation warning in older Emacsen which don't have this. A (defvar ...) at the top of the function's body would help. From unknown Sun Jun 22 08:10:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#72701: eglot crash when project-files-relative-names t Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 07 Sep 2024 07:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72701 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: joaotavora@gmail.com, Dmitry Gutov Cc: 72701@debbugs.gnu.org, shipmints@gmail.com Received: via spool by 72701-submit@debbugs.gnu.org id=B72701.17256936432104 (code B ref 72701); Sat, 07 Sep 2024 07:21:01 +0000 Received: (at 72701) by debbugs.gnu.org; 7 Sep 2024 07:20:43 +0000 Received: from localhost ([127.0.0.1]:54655 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1smpkR-0000Xs-Bs for submit@debbugs.gnu.org; Sat, 07 Sep 2024 03:20:43 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59996) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1smpkP-0000Xg-Vj for 72701@debbugs.gnu.org; Sat, 07 Sep 2024 03:20:42 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1smpkK-0005V5-6x; Sat, 07 Sep 2024 03:20:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=zjPQDQ4ZzulXUb/1r9FGU0yriDBKrpRX/604oAjq6Sc=; b=dP0w3rlR9WNucAC0d8RW gvHQAMcIxIm0mrHafBkGOlayXAwzEr/Db6Vefn2aCaRDpWwNJ920gU1LysAt74gmTYiAJpxnv5AH+ JtxnnOmw5nDGyjO0kNL6+/gvFs/IyRarpI/6zWF4yrZfmAQt7hMfcQ1YwIv/FL0po57g3OgVJu0Nr qUVAINXREKfvHBuCaR7qyXy+KXeM04rZxD0wwJubi1iAuXpMnbwclSUNzQ5YVleX798t0pdwPhYmf tcZxh1ZfVSSBkREjRvacODhZ4zRivaNwOb6FLaGqQt+teUvpZgeIkIbyIY31ZQr5lfEVUM5IBiRgK oPG3GAHv1L79Zw==; Date: Sat, 07 Sep 2024 10:20:34 +0300 Message-Id: <86mskkylod.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <7ddfb028-a182-486d-bb72-aeb26e0d1d4d@gutov.dev> (message from Dmitry Gutov on Sat, 24 Aug 2024 02:51:16 +0300) References: <7ddfb028-a182-486d-bb72-aeb26e0d1d4d@gutov.dev> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) 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: -3.3 (---) Ping! Is this issue resolved and can be closed, or do we need to do anything else here? > Cc: 72701@debbugs.gnu.org > Date: Sat, 24 Aug 2024 02:51:16 +0300 > From: Dmitry Gutov > > On 23/08/2024 18:08, João Távora wrote: > > > Eglot could be one of those features if there's a performance advantage. > > But I doubt it, because server-supplied glob expressions may target the > > full file name (indeed likely the truename). > > If the glob can match the full name, and it's hard to separate it into > two matchers, I suppose there's not much that could be done. > > The binding is probably and an improvement for some off-in-the-future > scenario where somebody has Emacs 30 installed, but upgrades project.el > to some yet-unreleased version where the variable's default is flipped. > > > Maybe it's worth it nevertheless, > > dunno. Anyway while let-binding p-f-r-names to nil in Eglot could work, I > > don't think it's the right solution, especially since it probably triggers a > > compilation warning in older Emacsen which don't have this. > > A (defvar ...) at the top of the function's body would help. > > > > From unknown Sun Jun 22 08:10:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#72701: eglot crash when project-files-relative-names t Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 08 Sep 2024 02:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72701 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii , joaotavora@gmail.com Cc: 72701@debbugs.gnu.org, shipmints@gmail.com Received: via spool by 72701-submit@debbugs.gnu.org id=B72701.172576226914602 (code B ref 72701); Sun, 08 Sep 2024 02:25:02 +0000 Received: (at 72701) by debbugs.gnu.org; 8 Sep 2024 02:24:29 +0000 Received: from localhost ([127.0.0.1]:57821 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sn7bI-0003nS-Ji for submit@debbugs.gnu.org; Sat, 07 Sep 2024 22:24:28 -0400 Received: from fout1-smtp.messagingengine.com ([103.168.172.144]:52549) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sn7bH-0003n8-8K for 72701@debbugs.gnu.org; Sat, 07 Sep 2024 22:24:27 -0400 Received: from phl-compute-10.internal (phl-compute-10.phl.internal [10.202.2.50]) by mailfout.phl.internal (Postfix) with ESMTP id 8A6151380278; Sat, 7 Sep 2024 22:24:20 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-10.internal (MEProxy); Sat, 07 Sep 2024 22:24:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :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=fm3; t=1725762260; x=1725848660; bh=l6YcPJfNRWOgS+N+Kn1KVRNDto68sBrzgJT0Bvmtx5M=; b= M5Sveg9TmIMoIu+5tEsYSSejflkh0XS6n4nfMIJ6qH6ZxWELaNN2MOtaDDoq1aKt LnON6XIPsQAv8UKTRMuO8F7LsQv83smfHF/flTlbC2TdvaFPQ1T+cs73yPB3urXZ HpC++JnBntMBhDY3ELbkogtj05JUICRYB/lCwUeu3I9bP2YQyqdqAE1tgi98lyuo SIKb3rPO6mAG5ovc+DlFgk+UWqSGr2yQN5iHVJq5qxm1j9CRZlZuDcaqBXTibj/V DK0BxlLwuOUq7vrKb3Dyygc8gxZ1dGY/QlL3fsuK/ztf9jHoaa6wFp4dRJbnic9C ToHfySiil90KGwt80Bf2ew== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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=fm1; t=1725762260; x= 1725848660; bh=l6YcPJfNRWOgS+N+Kn1KVRNDto68sBrzgJT0Bvmtx5M=; b=p 6bHk999UwVF2J7EhAYFv3sUhErhJGWVzJaIjdG6VPwfAcVt6J2eE9t46w+/Y1kit Mfo018A3yUmevo41yJipkiaoIFAhgWOpno7jwSS1EdcCKUk/FGvusKZBr95hJV8H RtIkfJ2YaxezaXHG/BkZawDhy8lji5LRyf+jRYZ4KE4gHlSLZXJGvSND/Ww2ZCK2 OuiopTJXkdFVWTpJEjA7dk+MhOgD1pWMUY0Zt4qv1sZSyS/N4+/rbX6/2wIIirEH CYoI/0/H4U93w083GvTzvCxylBzrvfrRngQYfLeWQuv2ijqGdoELBeesswMU0rYQ hjO1ddrUjZJhLxglUGJTg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrudeigedgheekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdej necuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdrug gvvheqnecuggftrfgrthhtvghrnhepteduleejgeehtefgheegjeekueehvdevieekueef tddvtdevfefhvdevgedujeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghvpdhnsggprhgtphhtthho peegpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegvlhhiiiesghhnuhdrohhrgh dprhgtphhtthhopehjohgrohhtrghvohhrrgesghhmrghilhdrtghomhdprhgtphhtthho pehshhhiphhmihhnthhssehgmhgrihhlrdgtohhmpdhrtghpthhtohepjedvjedtudesug gvsggsuhhgshdrghhnuhdrohhrgh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 7 Sep 2024 22:24:18 -0400 (EDT) Message-ID: <839e5a5f-3bdc-4814-8101-328985e025d6@gutov.dev> Date: Sun, 8 Sep 2024 05:24:17 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird References: <7ddfb028-a182-486d-bb72-aeb26e0d1d4d@gutov.dev> <86mskkylod.fsf@gnu.org> Content-Language: en-US From: Dmitry Gutov In-Reply-To: <86mskkylod.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) 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.7 (-) On 07/09/2024 10:20, Eli Zaretskii wrote: > Ping! Is this issue resolved and can be closed, or do we need to do > anything else here? I suggest installing the following. Not a hard necessity, but seems like an improvement: diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index acc197754db..e5b14ce9f80 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -3813,6 +3813,7 @@ eglot--code-action (cl-defmethod eglot-register-capability (server (method (eql workspace/didChangeWatchedFiles)) id &key watchers) "Handle dynamic registration of workspace/didChangeWatchedFiles." + (defvar project-files-relative-names) (eglot-unregister-capability server method id) (let* (success (globs (mapcar @@ -3823,6 +3824,7 @@ eglot-register-capability ;; (2), WatchKind.Delete (4) (or kind 7))) watchers)) + (project-files-relative-names nil) (dirs-to-watch (delete-dups (mapcar #'file-name-directory (project-files diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index c38d3f0048a..78f5c127900 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -331,7 +331,10 @@ project-files-relative-names The file names should be relative to the project root. And this can only happen when all returned files are in the same directory. In other words, the DIRS argument of `project-files' has to be nil or a -list of only one element.") +list of only one element. + +This variable is only meant to be set by Lisp code, not customized by +the user.") (cl-defgeneric project-files (project &optional dirs) "Return a list of files in directories DIRS in PROJECT. From unknown Sun Jun 22 08:10:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#72701: eglot crash when project-files-relative-names t 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: Sun, 08 Sep 2024 10:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72701 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov Cc: Eli Zaretskii , 72701@debbugs.gnu.org, shipmints@gmail.com Received: via spool by 72701-submit@debbugs.gnu.org id=B72701.172579306419767 (code B ref 72701); Sun, 08 Sep 2024 10:58:02 +0000 Received: (at 72701) by debbugs.gnu.org; 8 Sep 2024 10:57:44 +0000 Received: from localhost ([127.0.0.1]:58023 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1snFbz-00058l-Va for submit@debbugs.gnu.org; Sun, 08 Sep 2024 06:57:44 -0400 Received: from mail-oo1-f48.google.com ([209.85.161.48]:48231) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1snFby-00058V-28 for 72701@debbugs.gnu.org; Sun, 08 Sep 2024 06:57:42 -0400 Received: by mail-oo1-f48.google.com with SMTP id 006d021491bc7-5e1b6e8720dso913205eaf.0 for <72701@debbugs.gnu.org>; Sun, 08 Sep 2024 03:57:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725792994; x=1726397794; 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=LUMPvwYtTzIjHdRN4YURs1QKBLENPgWzNBTp2KRqBpU=; b=L4VAOxWa8mnDjzHHcbbOK3bOdbEBK6Cz3fjfUhJDi9MJX4CSRLTWgixulhReNhFSn0 07KKVPZdYapOVSuqrt1p6Tr2zWLoFVshMBiJFn8Q536ziEieuClu7XqVCTaChlABfL1c u86Zg7TlV/G5/SO5PzNZVTusUQ4e8LW8bADABL87xxry3MWxx7bA5KGUDBNvd6DqR9jD vRsay4jymJwIMDJBCkfrUkOBkzW2cZSA6KO0vYaIBTdan3ZPSmQrOsAzihl3J/gNmuGK yXHyj7EewVMitoKLMt3BgaqdXoisF8X6HSP/tO3Cq6Qht8phLwPhxgQWousUYZbslWTU Agmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725792994; x=1726397794; 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=LUMPvwYtTzIjHdRN4YURs1QKBLENPgWzNBTp2KRqBpU=; b=R2HhHnJcqL8PlxDB8n4aJ+saUTHvrc7DX16nNW5rqmjVUEmoc7klrG9A2gCUJiQEU1 MXjr2QCMYS8oULGK8Gy9TQGtOdGYhpbczIFOreDeWik6hM3j/iMfu5ZYeCIESDY5LjnS TCOtlH3wjLiyS9q3EIzQL1eCZGD97pG9F/4Sb3fG/luJ9NAF/950AuP7Sb9e2Jljy3i/ itl9FrwGLguh5/c7UabrZJESvcjiHMa06MVAJmoXrMj7TgA/QYKMBopx4ZK6hXiDleDe au6fH0FdU6ZkmYlPjjgyhQyB94Le7ietjVgucljtw9ofua7bEaSDsCc1Pp5jtZDiYmTs 94eA== X-Forwarded-Encrypted: i=1; AJvYcCWbXnsuBuw277WeYCdr10NrhTV4vhCBXfmlhwY1vsW/KkzpfQ+1dUZc8yAf9KdGoK5l8zj/WQ==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yx3Ay0W+2HywvR/M+vmCdCzBJHUMNK6CVJYi2fS4lffBbaZLajw VvRX4QMWA7GNs2wo7LlE9LTH3uFyDaowz+3QclgGbXPlSnxC2uxR5T+X3u3P0PHHyANE8TIKLEU /Z9SeouNDMwBEwtkeg8z4MJzbZd0= X-Google-Smtp-Source: AGHT+IE/GuxuFIlwcph59AfMu26j7C+Bhh+kLgdql7y92MU9w7Eda/Pd+5V6kr9amBVgSOXRRZA4yFFEk0wnSpxA7Ow= X-Received: by 2002:a4a:bd08:0:b0:5e1:ba69:1646 with SMTP id 006d021491bc7-5e1ba691d26mr3920824eaf.4.1725792994168; Sun, 08 Sep 2024 03:56:34 -0700 (PDT) MIME-Version: 1.0 References: <7ddfb028-a182-486d-bb72-aeb26e0d1d4d@gutov.dev> <86mskkylod.fsf@gnu.org> <839e5a5f-3bdc-4814-8101-328985e025d6@gutov.dev> In-Reply-To: <839e5a5f-3bdc-4814-8101-328985e025d6@gutov.dev> From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Date: Sun, 8 Sep 2024 11:56:23 +0100 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) 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 Sun, Sep 8, 2024 at 3:24=E2=80=AFAM Dmitry Gutov wrot= e: > > On 07/09/2024 10:20, Eli Zaretskii wrote: > > Ping! Is this issue resolved and can be closed, or do we need to do > > anything else here? > > I suggest installing the following. Not a hard necessity, but seems like > an improvement: Let's not, for all the reasons enunciated up-thread. Jo=C3=A3o From unknown Sun Jun 22 08:10:18 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Ship Mints Subject: bug#72701: closed (Re: bug#72701: eglot crash when project-files-relative-names t) Message-ID: References: X-Gnu-PR-Message: they-closed 72701 X-Gnu-PR-Package: emacs Reply-To: 72701@debbugs.gnu.org Date: Sun, 08 Sep 2024 20:52:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1725828722-11997-1" This is a multi-part message in MIME format... ------------=_1725828722-11997-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #72701: eglot crash when project-files-relative-names t which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 72701@debbugs.gnu.org. --=20 72701: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D72701 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1725828722-11997-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 72701-done) by debbugs.gnu.org; 8 Sep 2024 20:51:57 +0000 Received: from localhost ([127.0.0.1]:60107 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1snOt2-00037C-P2 for submit@debbugs.gnu.org; Sun, 08 Sep 2024 16:51:57 -0400 Received: from fhigh1-smtp.messagingengine.com ([103.168.172.152]:37645) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1snOt1-00036t-1j for 72701-done@debbugs.gnu.org; Sun, 08 Sep 2024 16:51:55 -0400 Received: from phl-compute-11.internal (phl-compute-11.phl.internal [10.202.2.51]) by mailfhigh.phl.internal (Postfix) with ESMTP id 1C32A1140082; Sun, 8 Sep 2024 16:51:47 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-11.internal (MEProxy); Sun, 08 Sep 2024 16:51:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :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=fm3; t=1725828707; x=1725915107; bh=4dJFuCJRJh5eNffRzKynHyyMXKCY1y7II6EKi4I8/P0=; b= XRXDbgGRNfV7M2ksDYBFk7qXQHWxJZ/6g7H38ZCvFHAcpked9QXUZX4ORihdgP6h 0FFuwTVUwR57KWvFF6k7wRr+553bfq5fB3RSJWsUB6NcEqcd8W928W3FZ0g37+LF SV2QmHBe2Q5ExvCKFu7EZyhvADRlhvp56NYG9sYhFAwwHZbGdUBrn0wrK04iKteG u3WuSmwg9d5zBmVeqY8bOQSqgRlJ0S/FqDDsYSXjhjVixJXhFYfZF8NHRL5mTWLq +mw2wfFTrbpynm0r9+RDV50bOGiZqn6PmViQqPkOnyNDy4fdvRhlu73EK9Nh29Xm Q6OsuRMDEoHF6qmLpntCoA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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=fm1; t=1725828707; x= 1725915107; bh=4dJFuCJRJh5eNffRzKynHyyMXKCY1y7II6EKi4I8/P0=; b=m 4tkR4uUPXgrotQx4pZNdb08xnwvB1xOr9FcONy36gp8hVhA7fhN+q+5ig29tNALo uLLjYlOYbxRCGbcvpWK9ommFWEipfkAEoYqDJ0eycJMHukP/Axht0xv4k7/Eh8NC TP6qElvs628RII4p03XkbnKad8AAsP3wFLBoayQnyskLwsCwXBjYlJNX9MXNseN6 1FAmQ/hqtSJSQrsOnPO8xlR0X9M4uAhr1DEpiLo4S2D3TUzlBbQ0n+gtU+NqVjP6 qUE8C4pJKXgoLmYQBP5gWBS01HpnhDzjaMzm/F/JfN/QA4kO2VGktX7Y0rGdveh1 jf1FV6FxqQKEVjEqtUDpQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrudeihedgudehhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefkffggfgfuvfevfhfhjggtgfesthekredttddv jeenucfhrhhomhepffhmihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrd guvghvqeenucggtffrrghtthgvrhhnpeegleefteekgffhvdfhtdegveevveetteegteev geettdehhfdukeetheffueekkeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh epmhgrihhlfhhrohhmpegumhhithhrhiesghhuthhovhdruggvvhdpnhgspghrtghpthht ohepgedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepjhhorghothgrvhhorhgrse hgmhgrihhlrdgtohhmpdhrtghpthhtohepvghlihiisehgnhhurdhorhhgpdhrtghpthht ohepshhhihhpmhhinhhtshesghhmrghilhdrtghomhdprhgtphhtthhopeejvdejtdduqd guohhnvgesuggvsggsuhhgshdrghhnuhdrohhrgh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 8 Sep 2024 16:51:45 -0400 (EDT) Message-ID: Date: Sun, 8 Sep 2024 23:51:43 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#72701: eglot crash when project-files-relative-names t To: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= References: <7ddfb028-a182-486d-bb72-aeb26e0d1d4d@gutov.dev> <86mskkylod.fsf@gnu.org> <839e5a5f-3bdc-4814-8101-328985e025d6@gutov.dev> Content-Language: en-US From: Dmitry Gutov In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 72701-done Cc: Eli Zaretskii , 72701-done@debbugs.gnu.org, shipmints@gmail.com 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.7 (-) On 08/09/2024 13:56, João Távora wrote: > On Sun, Sep 8, 2024 at 3:24 AM Dmitry Gutov wrote: >> >> On 07/09/2024 10:20, Eli Zaretskii wrote: >>> Ping! Is this issue resolved and can be closed, or do we need to do >>> anything else here? >> >> I suggest installing the following. Not a hard necessity, but seems like >> an improvement: > > Let's not, for all the reasons enunciated up-thread. Very well - I've just installed the docstring update. Thanks, closing. ------------=_1725828722-11997-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 18 Aug 2024 15:46:14 +0000 Received: from localhost ([127.0.0.1]:56519 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sfi6g-00022g-2v for submit@debbugs.gnu.org; Sun, 18 Aug 2024 11:46:14 -0400 Received: from lists.gnu.org ([209.51.188.17]:34860) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sfi6d-00022Y-EW for submit@debbugs.gnu.org; Sun, 18 Aug 2024 11:46:11 -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 1sfi3r-0006nW-Oq for bug-gnu-emacs@gnu.org; Sun, 18 Aug 2024 11:43:20 -0400 Received: from mail-vs1-xe32.google.com ([2607:f8b0:4864:20::e32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sfi3l-0007mq-UZ for bug-gnu-emacs@gnu.org; Sun, 18 Aug 2024 11:43:16 -0400 Received: by mail-vs1-xe32.google.com with SMTP id ada2fe7eead31-49297fca3c2so1272392137.1 for ; Sun, 18 Aug 2024 08:43:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1723995792; x=1724600592; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=Ztsa3IUJu9CipLfEkZT/V63pl5TX4hicuK8SNU19kQk=; b=HAN71b75F2ZOTnkvT8rwkj1rEkTpTgL9b792p8QmmOMS8uAkp+kYcF9+gTGmxY0uto eo72be3HktPnIXKfKeBVhYrajjv9v9Zn4ueqcfEhWCDx85UzbSrf8YMzvDU2JgRd3kIS LUc2DPBo9TJSAKXXMjNevbDo0N8ehBAP2cS2geGPi1avZwuKcIX2X44pEdGkBp5wBDQ1 vEM+aN1Lty6RBiWqiRvmQaMbyL3/bQWOoh/EhKpNNgZfaLHLjvDjNTUMXhSwMXT1ZbxF lOkhb8/TA3raI0FsqtkCSjgeOpH2YHAdMi1bnEt2LzUucnVAzUMa9zkbbbxQf7scgbre ybuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723995792; x=1724600592; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Ztsa3IUJu9CipLfEkZT/V63pl5TX4hicuK8SNU19kQk=; b=F+Ywt3wRAZsQ2tVrwP+aK2AQj71GWYg1Dguw5KB1a2TE8G37oBkVQk5Jap+/uv2ept kyq4ezjdYFnnK8gM//1QVo5zjTo0OU1C1A+HQ0BdgMlTmWWXdiatlc0LfslkYQZS1BRu cNh/0U/WckKgG1pqIg3MA1UP27IHS8NMxJPBuXMfFijBQMt0wiBgLRtiwUMlMOzYqeE3 13vTEWpHSK32VaFlupGlyD6TQy8ehodLVdOrG/5UssszqV52ETlZQNAZERkYxQr5ogqn u7Goz0cHXtXR/yZ6cK8h9FzyeMcUrkj3I4z5iDvXuCcFSpmeR6FTM9XNSH0KK1tBhptQ haVg== X-Gm-Message-State: AOJu0YwZYJ+0kGlbumKm0DPQHFFPExRTfll3q5B2IY2KrGhfPtdMY7pJ MQaYrOolG9tmmvU5XcUy8AEMCUL2uJowk0MLicFNs1zoxxjJYgVlc86kH68Nm02eN2ULEZMc8R8 w2abrVaRldiWrjbn6QPp4QsNIiclG33DN X-Google-Smtp-Source: AGHT+IFRzOCDfm88HmVLMzBug0eDhBHPYqqLCe888RtS8MQAkxDaoqt9zDEkZKI/uGFfPQLw36KxP/LIYTd3iyvssM0= X-Received: by 2002:a67:e242:0:b0:498:9c0a:af1a with SMTP id ada2fe7eead31-4989c0abc0fmr3076286137.4.1723995792173; Sun, 18 Aug 2024 08:43:12 -0700 (PDT) MIME-Version: 1.0 From: Ship Mints Date: Sun, 18 Aug 2024 11:43:01 -0400 Message-ID: Subject: eglot crash when project-files-relative-names t To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary="000000000000c97561061ff70cca" Received-SPF: pass client-ip=2607:f8b0:4864:20::e32; envelope-from=shipmints@gmail.com; helo=mail-vs1-xe32.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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) 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: -2.3 (--) --000000000000c97561061ff70cca Content-Type: text/plain; charset="UTF-8" project-files-relative-names was introduced a few months ago, so it's no surprise that there are some side effects when set. This affects the handler for workspace/didChangeWatchedFiles. The result is that dirs-to-watch... (dirs-to-watch (delete-dups (mapcar #'file-name-directory (project-files (eglot--project server)))))) ...is nil when project-files-relative-names is t, due to file-name-directory failing to parse the directories it was expecting. This results in file-readable-p failing with a nil dir: (watch-dir (dir) (when-let ((probe (and (file-readable-p dir) One solution which I've tested is simply the defensive: (project-files-relative-names nil) ; add this (dirs-to-watch (delete-dups (mapcar #'file-name-directory (project-files (eglot--project server)))))) -Stephane --000000000000c97561061ff70cca Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
project-files-relative-names was introduced a few months=C2=A0ago, so it= 's no surprise that there are some side effects when set.

This affects the handler= for=C2=A0workspace/didChangeWatchedFiles. The result is that dirs-to-watch= ...

<= /div>
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0(dirs-to-watch
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 (delete-dups (mapcar #'file-name-directory
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0(project-files
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 (eglot--project server))))))

...is nil when=C2=A0project-files-relative-names is= t, due to file-name-directory failing to parse the directories it was expe= cting. This results in file-readable-p failing with a nil dir:

=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0(watch-dir (dir)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(whe= n-let ((probe
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0(and (file-readable-p dir)

One solution which I've = tested is simply the defensive:

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(project-files-relativ= e-names nil) ; add this
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0(dirs-to-watch
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (dele= te-dups (mapcar #'file-name-directory
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0(project-files
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (eglot--= project server))))))

-Stephane
--000000000000c97561061ff70cca-- ------------=_1725828722-11997-1--