GNU bug report logs - #76941
[PATCH] completion-preview.el: Provide an API.

Previous Next

Package: emacs;

Reported by: Eshel Yaron <me <at> eshelyaron.com>

Date: Tue, 11 Mar 2025 12:53:01 UTC

Severity: wishlist

Tags: patch

To reply to this bug, email your comments to 76941 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#76941; Package emacs. (Tue, 11 Mar 2025 12:53:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Eshel Yaron <me <at> eshelyaron.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 11 Mar 2025 12:53:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Eshel Yaron <me <at> eshelyaron.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] completion-preview.el: Provide an API.
Date: Tue, 11 Mar 2025 13:51:50 +0100
[Message part 1 (text/plain, inline)]
Tags: patch

Hi,

This patch adds an initial API for controlling Completion Preview mode's
preview overlay from Lisp programs, so other features can reuse the
completion preview UI.

Any thoughts/comments?

[0001-completion-preview.el-Provide-an-API.patch (text/patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#76941; Package emacs. (Tue, 11 Mar 2025 13:36:02 GMT) Full text and rfc822 format available.

Message #8 received at 76941 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Eshel Yaron <me <at> eshelyaron.com>
Cc: 76941 <at> debbugs.gnu.org
Subject: Re: bug#76941: [PATCH] completion-preview.el: Provide an API.
Date: Tue, 11 Mar 2025 15:35:07 +0200
> Date: Tue, 11 Mar 2025 13:51:50 +0100
> From:  Eshel Yaron via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> This patch adds an initial API for controlling Completion Preview mode's
> preview overlay from Lisp programs, so other features can reuse the
> completion preview UI.
> 
> Any thoughts/comments?

Should this be documented in the ELisp manual?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#76941; Package emacs. (Tue, 11 Mar 2025 14:19:02 GMT) Full text and rfc822 format available.

Message #11 received at 76941 <at> debbugs.gnu.org (full text, mbox):

From: Eshel Yaron <me <at> eshelyaron.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 76941 <at> debbugs.gnu.org
Subject: Re: bug#76941: [PATCH] completion-preview.el: Provide an API.
Date: Tue, 11 Mar 2025 15:18:54 +0100
Hi Eli,

Eli Zaretskii <eliz <at> gnu.org> writes:

>> Date: Tue, 11 Mar 2025 13:51:50 +0100
>> From:  Eshel Yaron via "Bug reports for GNU Emacs,
>>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>> 
>> This patch adds an initial API for controlling Completion Preview mode's
>> preview overlay from Lisp programs, so other features can reuse the
>> completion preview UI.
>> 
>> Any thoughts/comments?
>
> 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'?


Thanks,

Eshel




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#76941; Package emacs. (Tue, 11 Mar 2025 17:11:02 GMT) Full text and rfc822 format available.

Message #14 received at 76941 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Eshel Yaron <me <at> eshelyaron.com>
Cc: 76941 <at> debbugs.gnu.org
Subject: Re: bug#76941: [PATCH] completion-preview.el: Provide an API.
Date: Tue, 11 Mar 2025 19:09:39 +0200
> From: Eshel Yaron <me <at> eshelyaron.com>
> Cc: 76941 <at> debbugs.gnu.org
> Date: Tue, 11 Mar 2025 15:18:54 +0100
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> >> Date: Tue, 11 Mar 2025 13:51:50 +0100
> >> From:  Eshel Yaron via "Bug reports for GNU Emacs,
> >>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> >> 
> >> This patch adds an initial API for controlling Completion Preview mode's
> >> preview overlay from Lisp programs, so other features can reuse the
> >> completion preview UI.
> >> 
> >> Any thoughts/comments?
> >
> > 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.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#76941; Package emacs. (Tue, 11 Mar 2025 20:46:02 GMT) Full text and rfc822 format available.

Message #17 received at 76941 <at> debbugs.gnu.org (full text, mbox):

From: Eshel Yaron <me <at> eshelyaron.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 76941 <at> debbugs.gnu.org
Subject: Re: bug#76941: [PATCH] completion-preview.el: Provide an API.
Date: Tue, 11 Mar 2025 21:45:13 +0100
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Eshel Yaron <me <at> eshelyaron.com>
>> Cc: 76941 <at> debbugs.gnu.org
>> Date: Tue, 11 Mar 2025 15:18:54 +0100
>> 
>> Eli Zaretskii <eliz <at> gnu.org> writes:
>> 
>> >> Date: Tue, 11 Mar 2025 13:51:50 +0100
>> >> From:  Eshel Yaron via "Bug reports for GNU Emacs,
>> >>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>> >> 
>> >> This patch adds an initial API for controlling Completion Preview mode's
>> >> preview overlay from Lisp programs, so other features can reuse the
>> >> completion preview UI.
>> >> 
>> >> Any thoughts/comments?
>> >
>> > 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.

[v2-0001-completion-preview.el-Provide-an-API.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#76941; Package emacs. (Wed, 12 Mar 2025 13:00:02 GMT) Full text and rfc822 format available.

Message #20 received at 76941 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Eshel Yaron <me <at> eshelyaron.com>
Cc: 76941 <at> debbugs.gnu.org
Subject: Re: bug#76941: [PATCH] completion-preview.el: Provide an API.
Date: Wed, 12 Mar 2025 14:58:57 +0200
> From: Eshel Yaron <me <at> eshelyaron.com>
> Cc: 76941 <at> debbugs.gnu.org
> 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" and "call"
instead of "use".




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#76941; Package emacs. (Wed, 12 Mar 2025 13:56:01 GMT) Full text and rfc822 format available.

Message #23 received at 76941 <at> debbugs.gnu.org (full text, mbox):

From: Eshel Yaron <me <at> eshelyaron.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 76941 <at> debbugs.gnu.org
Subject: Re: bug#76941: [PATCH] completion-preview.el: Provide an API.
Date: Wed, 12 Mar 2025 14:55:20 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Eshel Yaron <me <at> eshelyaron.com>
>> Cc: 76941 <at> debbugs.gnu.org
>> 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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#76941; Package emacs. (Wed, 12 Mar 2025 15:26:01 GMT) Full text and rfc822 format available.

Message #26 received at 76941 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Eshel Yaron <me <at> eshelyaron.com>
Cc: 76941 <at> debbugs.gnu.org
Subject: Re: bug#76941: [PATCH] completion-preview.el: Provide an API.
Date: Wed, 12 Mar 2025 17:25:48 +0200
> From: Eshel Yaron <me <at> eshelyaron.com>
> Cc: 76941 <at> debbugs.gnu.org
> Date: Wed, 12 Mar 2025 14:55:20 +0100
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> >> +  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?

Yes,  But then I'd say something like "Users can then interact with
this preview to ..."




Severity set to 'wishlist' from 'normal' Request was from Stefan Kangas <stefankangas <at> gmail.com> to control <at> debbugs.gnu.org. (Sat, 15 Mar 2025 12:03:05 GMT) Full text and rfc822 format available.

This bug report was last modified 97 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.