Subject: bug#72701: eglot crash when project-files-relative-names t

From: João Távora <[email-masked]>
Date: Fri, 23 Aug 2024 23:49:07 +0100

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ão

On Fri, Aug 23, 2024 at 4:08 PM Ship Mints <[email-masked]> wrote:
>
> João, I don't have Emacs git access so I'll write the equivalent comment 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 PM João Távora <[email-masked]> 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ão
>>
>> On Thu, Aug 22, 2024 at 6:52 PM Eli Zaretskii <[email-masked]> wrote:
>> >
>> > > Cc: Dmitry Gutov <[email-masked]>,
>> > >  João Távora <[email-masked]>
>> > > From: Ship Mints <[email-masked]>
>> > > 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ão Távora

-- 
João Távora