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: Wed, 01 Nov 2023 09:30:29 +0100 Message-ID: References: <2c15c71f-613d-ec61-774d-93e7696470eb@gutov.dev> <8ec6cab5d8104227fef6123b9c99f93a@condition-alpha.com> <8af5efc7-754a-111d-42d7-b875edbb6202@gutov.dev> <26ef9d21-9ab6-1cf5-005d-4ad2907169b5@gutov.dev> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15604"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Alexander Adolf , =?utf-8?B?Sm8=?= =?utf-8?B?w6NvIFTDoXZvcmE=?= , Juri Linkov , Eli Zaretskii , emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Nov 01 09:31:22 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 1qy6dD-0003rc-Eb for ged-emacs-devel@m.gmane-mx.org; Wed, 01 Nov 2023 09:31:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qy6cZ-0004wJ-VZ; Wed, 01 Nov 2023 04:30:39 -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 1qy6cY-0004w9-G2 for emacs-devel@gnu.org; Wed, 01 Nov 2023 04:30:38 -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 1qy6cU-0001yP-8u; Wed, 01 Nov 2023 04:30:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1698827432; bh=WoFnOKtFKzKvIDvO2Sm1cM2bJYsQUEakj5Wp0PGbCNI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=cUjIPrEr3YcC5tjae0UgWT1TSmogKTikVbl5Tpe/UkXSSDksZrKVNV1hteqwOnp+Z ok2YPxxgtGSampLHwx6lXxZ62gc6+dywOvqwAeD9kB2tHpRDLNAYVv59/ufGFSu2/z XLbl4RCt3r2djWrYgSfv5B66gjLqD9DHctoMGRt1XiW0hoJr2erPcdifBGUTkEaget k1CkL88pMbrUlnoRAYcec1VAtfX3/mz6Fp7JfR6RASRY58mJHU1X3AxF68GUG9VJmX oAytFyXNRtKQby4Ap8wBSPbuMWj1j6b9w2FAK1nAlXuSLs16rHtwXMxAD4DerC1YZg iuFSQ4qI0mcjg== In-Reply-To: <26ef9d21-9ab6-1cf5-005d-4ad2907169b5@gutov.dev> (Dmitry Gutov's message of "Wed, 1 Nov 2023 01:29:14 +0200") 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, T_SCC_BODY_TEXT_LINE=-0.01 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:312043 Archived-At: Dmitry Gutov writes: > On 31/10/2023 08:50, Eshel Yaron wrote: >> I find this company/corfo comparison quite compelling, but I'd like to >> steer the discussion back to the topic at hand: adding inline completion >> *preview* to Emacs. Could you check out my proposed implementation[0] >> and weigh in on adding it to core, possibly as part of completion.el? > > Ok, I tried your code. Great, I appreciate it. > This is probably an issue: C-M-i is rebound. > > With completion-preview-mode on, this key combination does something > different than the usual (it inserts the previewed completion). That's an interesting point. Basically, we want to provide a convenient way for users to "accept the suggestion" and insert the preview. So in general there are two choices AFAICT: - (re)bind some convenient key when the preview is visible, and document that fact while explaining how users can remove/change this binding if they want to. - provide no bindings (or maybe bind an unused but less convenient key) by default, and recommend binding a convenient key in the docs. Either way, `C-M-i` seems like a natural choice since inserting the previewed completion is strongly related to `completion-at-point`, so the idea is that this key combination does something similar (completion) whether the preview is visible or not. WDYT? > I can imagine that this behavior can be useful for certain personal > habits/used languages/etc, but it's a change from the default. I agree, although the user explicitly enables this minor mode, so it's entirely unexpected for it to change an otherwise default behavior, no? > Otherwise, I can't really comment on the inclusion, since it's not > something I would have used, and I don't know how many users would > really benefit. Thanks, Eshel