Subject: Re: bug#41423: 27.0.91; eshell file completion in tramp dir is slow (3 minutes) [regression on pretest]

From: Gregory Heytings <[email-masked]>
Date: Sat, 29 Aug 2020 16:12:15 +0000

>> 1. TAB calls completion-at-point
>> 2. completion-at-point calls pcomplete-completions-at-point, which calls pcomplete/cd; this completes the directory name
>
> Sounds like a bug: the `completion-at-point-functions` should not 
> perform the completion but should only return a description of the part 
> of the text that is the subject of completion, along with a description 
> (generally in the form of a function) of the set of elements from which 
> the possible completions can be taken.
>

Please don't take my words too literally.  "This completes the directory 
name" does not mean that `pcomplete/cd' performs the completion itself. 
Indeed it returns something with which the completion is performed.

The bug is clearly not there (at step 2), but later (in the fact that 
`completion-at-point' calls `pcomplete-completions-at-point' three times).