From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ship Mints Newsgroups: gmane.emacs.bugs Subject: bug#72701: eglot crash when project-files-relative-names t Date: Fri, 23 Aug 2024 11:07:51 -0400 Message-ID: References: <86bk1ksawn.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000042975f06205b244b" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32043"; mail-complaints-to="usenet@ciao.gmane.io" Cc: dmitry@gutov.dev, Eli Zaretskii , 72701@debbugs.gnu.org To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Aug 23 17:09:36 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 1shVux-000873-6U for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 23 Aug 2024 17:09:35 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1shVui-0005fD-AZ; Fri, 23 Aug 2024 11:09:20 -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 1shVug-0005eh-QF for bug-gnu-emacs@gnu.org; Fri, 23 Aug 2024 11:09:18 -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 1shVud-00075Y-35 for bug-gnu-emacs@gnu.org; Fri, 23 Aug 2024 11:09:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=Date:From:In-Reply-To:References:MIME-Version:To:Subject; bh=qsLxKem+HXG/dwNN+Q0VzJp971/aY6+JyZhfbcU+hfg=; b=Z+QHUoRjayUMQFIpRn/1vm3pQHrsbjGCuQ60j8dTu1tGZfsfWWdnqDSxxoml+xHR66hAtOW6L+18cMTH02QQCbsqB+h7TpHz1mFJXY6XoIRqAtBj0ChaXtFF1oJb7vQjxTuCE+QTK9Gs2OtaIsAF1q0q9MGWbqa3eAcQWz0iivUEAVQbS8+jvNVzh3nN687oOloaS7L6CT3Nqp1cTESLdEC5X8DQEZ/w6rvf5FKU/uAtOWHMdDyGF06VUBXUO3iJ3XHSWyaTJpLJAHod9PIsPUhyjQweNzO2YOHrJ8sflAyi2FCNiWvlXh5p9vHepfPXo6nObi+VTKhuF4Yf+jVhKA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1shVvO-0003BJ-5V for bug-gnu-emacs@gnu.org; Fri, 23 Aug 2024 11:10:02 -0400 X-Loop: help-debbugs@gnu.org 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 Original-Received: via spool by 72701-submit@debbugs.gnu.org id=B72701.172442579912215 (code B ref 72701); Fri, 23 Aug 2024 15:10:02 +0000 Original-Received: (at 72701) by debbugs.gnu.org; 23 Aug 2024 15:09:59 +0000 Original-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 Original-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 Original-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) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:290599 Archived-At: --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--