From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#72701: eglot crash when project-files-relative-names t Date: Sun, 8 Sep 2024 05:24:17 +0300 Message-ID: <839e5a5f-3bdc-4814-8101-328985e025d6@gutov.dev> References: <7ddfb028-a182-486d-bb72-aeb26e0d1d4d@gutov.dev> <86mskkylod.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3498"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: 72701@debbugs.gnu.org, shipmints@gmail.com To: Eli Zaretskii , joaotavora@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Sep 08 04:25:16 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sn7c2-0000kA-R9 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 08 Sep 2024 04:25:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sn7br-0002Ff-7T; Sat, 07 Sep 2024 22:25:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sn7bp-0002FM-JW for bug-gnu-emacs@gnu.org; Sat, 07 Sep 2024 22:25:01 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sn7bo-0004gY-Te for bug-gnu-emacs@gnu.org; Sat, 07 Sep 2024 22:25:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=In-Reply-To:From:References:MIME-Version:Date:To:Subject; bh=l6YcPJfNRWOgS+N+Kn1KVRNDto68sBrzgJT0Bvmtx5M=; b=IH75kEnaedygvZV6zljspLgnUvmtKiNdA5JcuSZHz5lU85U//s2cfRbwHdZQdcJJu4ia/7vYZV/kFKk8lo4JZv1DEFPJq6Dgn1C9C21hsi8iH8jThARdXehBcHbRtwd6vGKmzKbg89ADmtM2m/a75buVunnbBYqyXxS6bZwsqo6hkml7ocSsAtHCATmc1kbBT/9ncB9j0/CWK73qGEzs6LSbc9oz2UFODdMXFiM7oN32r6SPwkHYsQIeOZsxj6R7XA+DtdJiFbiWHreiYDM+TmhxbbjTEvBuKlvZInDabQeZbUzjHcMQYfrE557PfRZeeAE8mFIoxSA5gj4kQKX0wQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sn7bq-0003oW-ET for bug-gnu-emacs@gnu.org; Sat, 07 Sep 2024 22:25:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: 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 Original-Received: via spool by 72701-submit@debbugs.gnu.org id=B72701.172576226914602 (code B ref 72701); Sun, 08 Sep 2024 02:25:02 +0000 Original-Received: (at 72701) by debbugs.gnu.org; 8 Sep 2024 02:24:29 +0000 Original-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 Original-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 Original-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) Original-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 Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 7 Sep 2024 22:24:18 -0400 (EDT) Content-Language: en-US In-Reply-To: <86mskkylod.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:291417 Archived-At: 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.