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: Mon, 30 Oct 2023 15:20:04 +0200 Message-ID: <2c15c71f-613d-ec61-774d-93e7696470eb@gutov.dev> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28912"; 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: Eshel Yaron , Juri Linkov , Eli Zaretskii , emacs-devel@gnu.org To: Alexander Adolf , =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Oct 30 14:21: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 1qxSCj-0007Ku-Tx for ged-emacs-devel@m.gmane-mx.org; Mon, 30 Oct 2023 14:21:18 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qxSBi-0005gm-L6; Mon, 30 Oct 2023 09:20:14 -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 1qxSBh-0005ga-77 for emacs-devel@gnu.org; Mon, 30 Oct 2023 09:20:13 -0400 Original-Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qxSBf-0002c2-3Z; Mon, 30 Oct 2023 09:20:12 -0400 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 7417A5C0165; Mon, 30 Oct 2023 09:20:08 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Mon, 30 Oct 2023 09:20: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= 1698672008; x=1698758408; bh=FJkhh0V/nm4I10m/tR3MOciCUCslDRWHYgO kf3mOFYs=; b=LFqCdhHXbcnUQVDb0eSDrPzvz2BQtZKrjjduDlV/QGHg9tWpTZX Ug57tijFH7bqlR6+J975FWrFSu+bvdBEXwXXT54Vp0oYDThNxfIM/D1AFurhXjk+ +qdiNTlsqGVihWYqK+AztdWT1MpBN52z4yBJ44cKHIX0DU7i+3I7V1NBk3F4tXEP Mvb9ax0G6xl4QHryJ5od0uar3OUH/Vj+Aa6pEbDF6tuAQqVKfOrqeDSHB3AF3TwX lVkEKiiaKM2cMN5lkBoESSBe5y4Mft+pVJIS8AMRCJOOmKa9ExKYYg8nEgp6sian 4jbqwG8qb3f5wuxeDhr8lpT1cTktRCxesag== 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= 1698672008; x=1698758408; bh=FJkhh0V/nm4I10m/tR3MOciCUCslDRWHYgO kf3mOFYs=; b=U9p+ZSqZ+CdtGy1PV6HfBPZByUhvFn76R5623Xmmo3GK7ffOyvX 5LaFv4c1+wkf8H92JkJ1b8V1iPruknfP65+z+oJQZ/1xoOX9HjD59S/b9rZ5rncY gdEpDvFUhUPZ8qASnvOk1uapnFNjpGAahrfwXBp5kyRdXtBebc6xqAFQSKMenzNO sQFPqbdQ7CslOBmNb+f29VRgDv90+lqFQd8Uql8nmG7/HOwsAciOZiKBaYhoxsj4 NEw5H9OFnwu77PGT4jmd+HpBple/jIjbrVjwqh39fcZ/pU53k8gExgPjTEl34oGm mLNtk+2ZP+nB9Ez9vc8vkDguXxo9OrGdhBg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedruddttddggeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhephffhleeifffgveevudeugfeifeeuffevgfeutdeitefhiefgtedvheeuvedv vdefnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumhhithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 30 Oct 2023 09:20:06 -0400 (EDT) Content-Language: en-US In-Reply-To: Received-SPF: pass client-ip=66.111.4.29; envelope-from=dmitry@gutov.dev; helo=out5-smtp.messagingengine.com X-Spam_score_int: -71 X-Spam_score: -7.2 X-Spam_bar: ------- X-Spam_report: (-7.2 / 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=-4.441, RCVD_IN_DNSWL_LOW=-0.7, 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:311993 Archived-At: On 30/10/2023 14:42, Alexander Adolf wrote: >> Also company works on TTY Emacs out of the box, and I think Corfu >> doesn't. More stuff to add in. > Corfu works with TTY Emacs of of the box, too. Are you sure you don't have corfu-terminal installed? It's in NonGNU ELPA because it uses the 'popon' package which doesn't have its copyright assigned to FSF, and thus couldn't be included with Emacs until that happens. > Under a graphical environment, corfu uses a frame provided by the > graphical environment (for instance the window manager) to display the > candidates. That way the display of the "popover" is independent of the > fonts used in the buffer. Consider as an example an Org buffer, where > the headings are rendered in a bigger font. Company will render popvover > text in that area using the bigger font. > > Result with company: > ---------------------------------------------------------------------- > > The quick brown fox jum > +-------------+ > | candidate 1 | > * BIG FONT HEADING | CANDIDATE 2 | > BIG FONT HEADING | CANDIDATE 2 | > | candidate 3 | > | candidate 4 | > +-------------+ > ---------------------------------------------------------------------- > > Duh! Company certainly showing its age here. > > > Result with corfu: > ---------------------------------------------------------------------- > > The quick brown fox jum > +-------------+ > | candidate 1 | > * BIG FONT HEADING | candidate 2 | > BIG FONT HEADING | candidate 3 | > | candidate 4 | > +-------------+ > ---------------------------------------------------------------------- You can try out this branch: https://github.com/company-mode/company-mode/pull/1394 It should deal with big fonts, as well as multiple width characters, fine. The only thing that seems impossible to implement is compatibility with line numbering. Perhaps I'll someday switch to popon/popup.el's approach of one-overlay-per-line when I have more time. If 'popon' were in GNU ELPA, however, Company could also use it. In fact, writing a frontend using it for your own purpose should already be easy enough.