From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Inline completion preview Date: Wed, 1 Nov 2023 14:32:05 +0200 Message-ID: <726ab367-7645-22b1-3b50-bba1365899c0@gutov.dev> 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; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6342"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Cc: Alexander Adolf , =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= , Juri Linkov , Eli Zaretskii , emacs-devel@gnu.org To: Eshel Yaron Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Nov 01 13:33:10 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 1qyAPF-0001J7-QA for ged-emacs-devel@m.gmane-mx.org; Wed, 01 Nov 2023 13:33:10 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qyAOO-0005Zo-JU; Wed, 01 Nov 2023 08:32:16 -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 1qyAON-0005Zg-6t for emacs-devel@gnu.org; Wed, 01 Nov 2023 08:32:15 -0400 Original-Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qyAOJ-0002y1-Ly; Wed, 01 Nov 2023 08:32:14 -0400 Original-Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id E1E855C01B3; Wed, 1 Nov 2023 08:32:08 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Wed, 01 Nov 2023 08:32:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1698841928; x=1698928328; bh=2ysZHfLRaPnvVNkIrqjkFNK2fe1EPZyD6j4 NlPvlalI=; b=ACcBNOio28ewysXM6Nkz6ArQWEolR51neOGLImc9KOLA/JOQisg sI821aDG1V+JQ6roBZDYLKPsuFuLfzLP06CXlLNlora4G8L/ByE62FIg+7m13XlT rvfmpWm9jMCsPAoTKNh6i/YWB/1tVGT/uZ0+DS5vWJK+lltEP7O7dMDJB6Wr0Ngd /tLSvZkT+1Ggtd1S1njufrwWMYo8h5qbNrsVzW5kAQR81SJ+PEZ0bA6PKbWB4TEa Ag1RkvFbQ5w9/Tk3r4MmDlDDOH+wjZGYB18L2Um+hgzsIrIIdfSahXuSTKPnwh7w sXaI3aNFkcOvJqdy2NETrf5fZI8LMmyEOXg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1698841928; x=1698928328; bh=2ysZHfLRaPnvVNkIrqjkFNK2fe1EPZyD6j4 NlPvlalI=; b=kGNHiK7cAZSSSiu/7XTgWJYYd9JJmX5iAswDRoZYsz5BidqkcV0 Q6RY5X6ZB3aTSmfLAP/SSj2C8irHMTWqRzBUQ8yCBq03pewigWz2JKHy/SpoWX7A cQnYto2MQR4236tLkBcKvG5bRuDVp4NEwh/NtEIWr5uaKp2H5FBc2bnBZtAm3rRP QdiWskkN48zMzIpK9oTJJWPt9Erf4YDMr4XGgAbksMyqTmOv3vynSmfup/U3sSoh dHy1JTzkad61v1gx683/+taxXB06HkWT5ksj/ySSf05uuWdBIwQbnNjTZUBqn23X +lvVEhmp5nj3iPJvjnbaUp0aIFD0+DtNoSA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedruddtgedggeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhephfffheeljeffgeffueeghfekkedtfffgheejvdegjeettdduheeufffggfef jeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 1 Nov 2023 08:32:06 -0400 (EDT) Content-Language: en-US In-Reply-To: Received-SPF: pass client-ip=66.111.4.27; envelope-from=dmitry@gutov.dev; helo=out3-smtp.messagingengine.com X-Spam_score_int: -65 X-Spam_score: -6.6 X-Spam_bar: ------ X-Spam_report: (-6.6 / 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, NICE_REPLY_A=-3.777, RCVD_IN_DNSWL_LOW=-0.7, 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:312059 Archived-At: On 01/11/2023 14:29, Eshel Yaron wrote: >> I think I'd simply use RET as the key. Since the preview only appears >> after the user had pressed C-M-i already, this should conflict with >> the regular usage of RET. > I'm not sure I completely follow, but I do agree that RET is another > good choice for "accepting the suggestion". OTOH note that the > completion preview appears automatically, without you pressing C-M-i, so > I feel that it would probably be better to leave RET alone for inserting > a newline. Another good candidate, IMO, is TAB. But I do like how with > João's suggestion we don't rebind any key, which makes things somewhat > simpler. If a user does want to use RET or TAB in order to insert the > suggestion when the preview is visible, they can bind > `completion-at-point` to RET in `completion-preview-active-mode-map`. Fair points. Though I do imagine a user would normally expect to have /some/ default binding to act on the shown preview.