Subject: bug#76941: [PATCH] completion-preview.el: Provide an API.

From: Eshel Yaron <[email-masked]>
Date: Wed, 12 Mar 2025 14:55:20 +0100

Eli Zaretskii <[email-masked]> writes:

>> From: Eshel Yaron <[email-masked]>
>> Cc: [email-masked]
>> Date: Tue, 11 Mar 2025 21:45:13 +0100
>> 
>> >> > Should this be documented in the ELisp manual?
>> >> 
>> >> Maybe, I can definitely add something if you think we should.  I wonder
>> >> where to mention it though, perhaps in `(elisp)Completion in Buffers'?
>> >
>> > Yes, there.
>> 
>> OK, done in the updated patch below.
>
> Thanks, the addition to the manual is okay, with one nit:
>
>> +  Emacs can also @emph{suggest} possible in-buffer completions by means
>> +of a @dfn{completion preview}.  The preview appears after a given
>> +stretch of buffer text, usually ending at point, and suggest a possible
>> +completion of that text.  Users can interact with the preview to accept
>> +the completion suggestion or cycle among multiple suggestions.  Use the
>> +following functions to create or dismiss a completion preview:
>
> The ELisp manual is written for Lisp programmers, not for Emacs
> users.  So please use "Lisp programs" instead of "users"

We are telling Lisp programmers what their users can do with the
completion preview, so this is about users, not other programs.  
Does that makes sense?

> and "call" instead of "use".

OK, will do.

Anyway, I'll wait with this patch for some more feedback before for now.

Thanks,

Eshel