Subject: Re: bug#58784: 28.2; project-buffers incorrect under let-bound default-directory
From: Dmitry Gutov <[email-masked]>
To: Sean Devlin <[email-masked]>
Cc: [email-masked]
Date: Fri, 4 Nov 2022 03:18:40 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

On 02.11.2022 17:18, Sean Devlin wrote:

>>> I think there’s still some fragility in the project-buffers function, since any callers need to be careful not to bind default-directory. It might be useful to call this out in the doc string or in the manual.
>>
>> I suppose it could use improvement, but I'm not sure what phrasing would stop someone from making such a mistake. After all, I knew its implementation and made it anyway.
>>
>> Perhaps the docstring should simply say that the buffers are matched on the basis of their default-directory value. In the default implementation, that is (custom backends could choose their own strategy). Would that help?
> 
> Yeah, I think a high-level description of the default strategy would be useful.
> 
> Thanks again for your help!

I've added some clarification in 7d47651d01.

Hopefully it makes things better, if not -- suggestions welcome.

I'm going to close this in the meantime.