From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eshel Yaron Newsgroups: gmane.emacs.devel Subject: Re: Inline completion preview Date: Fri, 27 Oct 2023 17:53:23 +0200 Message-ID: References: <83h6mdfcv2.fsf@gnu.org> <87zg04cuh2.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30606"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Ihor Radchenko Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Oct 27 17:54:18 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qwPA9-0007lY-J5 for ged-emacs-devel@m.gmane-mx.org; Fri, 27 Oct 2023 17:54:17 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qwP9Q-0003HS-Kd; Fri, 27 Oct 2023 11:53:32 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qwP9O-0003Gk-Ew for emacs-devel@gnu.org; Fri, 27 Oct 2023 11:53:31 -0400 Original-Received: from mail.eshelyaron.com ([107.175.124.16] helo=eshelyaron.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qwP9L-0002N0-2o; Fri, 27 Oct 2023 11:53:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1698422005; bh=5SjIp+lw7Yr9EYLSltfitteR9Ve6S0fBS0ObYkBI8OQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=cRyzbgERMOOZxPxjHZcJ6D5qo6ILSv7FRoLNYhlGmBVe4M0vLuu0sDJXjSZs702TU Frww4mnT5H6ntzVW3mUPO0dMk7wFZztgcIYszASdhWB4brX81v3qbU2N83nm3h8ZTe Bd9VpK4l2KPIc68E7s07wboeuUu4xzaBA33zkhW/g6g8rqpnYARyQswx+libw8Bu7o JgUjOxx2x82IdtMPHTQNxgirA4xovqQJN3XT6au2r43N97KrnwhadYjPFfcSEr2mBg LRyTbX6oXW/qXSubvnNGYSIfAgh/mzn6/AlXn6Bq860dhhcjFs+Fi9dzwBg8Ioru2L HqX7is0+7FNDw== In-Reply-To: <87zg04cuh2.fsf@localhost> (Ihor Radchenko's message of "Fri, 27 Oct 2023 08:58:33 +0000") Received-SPF: pass client-ip=107.175.124.16; envelope-from=me@eshelyaron.com; helo=eshelyaron.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:311937 Archived-At: Ihor Radchenko writes: > Eshel Yaron writes: > >> Sorry, that might have not been clear enough, I wrote: >> >> ISTM that the best approach is a simple library that uses only >> `completion-at-point` as a backend, because `completion-at-point` is >> already extensible enough to support a variety of completion >> backends. >> >> None of the aforementioned packages take that approach, so I wrote >> `completion-preview.el` do demonstrate and test this approach. As to >> the question of adding this feature to core, since it's quite a simple >> and useful addition, I just think it could be nice to have it OOTB. >> > > Don't corfu do it already? No, this is a somewhat different feature, > From https://github.com/minad/corfu: > > Corfu is a small package, which relies on the Emacs completion > facilities and concentrates on providing a polished completion UI. Indeed `corfu` provides a completion UI, but not an inline completion preview. `corfu`'s completion UI replaces the *Completions* buffer for in-buffer completions. Completion preview is something related but independent from the completion UI. Namely a suggestion for a single completion candidate that automatically shows up after point as you type. It appears inline, as if you've already inserted that candidate, in that sense it gives you a preview for the completion operation. The package `corfu-candidate-overlay` is another project that does provide completion preview and builds on top of `corfu` instead of `completion-at-point` directly.