Subject: bug#55205: 28.1.50; completion--replace illegally mutates completion candidates

From: Dmitry Gutov <[email-masked]>
Date: Tue, 3 May 2022 00:06:47 +0300

On 02.05.2022 17:27, Eli Zaretskii wrote:
>> Date: Mon, 2 May 2022 12:46:00 +0300
>> Cc:[email-masked],[email-masked],[email-masked],
>>   [email-masked]
>> From: Dmitry Gutov<[email-masked]>
>>
>> On 02.05.2022 05:23, Eli Zaretskii wrote:
>>> Collection can include functions, and how do you copy that?
>> Collection can be a function, not "include functions". You fetch the
>> list of strings using that function (for the given input) and then make
>> a deep copy of that.
> So I need to call that function twice, is that it?  It is normally
> called by the completion machinery out of my control.

You only use the function at the "fetch the list" step.

How many times it is called in total, is a harder question (due to 
implementation details, sometimes suboptimal), but that number shouldn't 
have to change.