From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alexander Adolf Newsgroups: gmane.emacs.devel Subject: Re: Inline completion preview Date: Mon, 30 Oct 2023 18:43:21 +0100 Message-ID: <8ec6cab5d8104227fef6123b9c99f93a@condition-alpha.com> References: <2c15c71f-613d-ec61-774d-93e7696470eb@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="23432"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eshel Yaron , Juri Linkov , Eli Zaretskii , emacs-devel@gnu.org To: Dmitry Gutov , =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Oct 30 18:44:55 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 1qxWJr-0005lx-57 for ged-emacs-devel@m.gmane-mx.org; Mon, 30 Oct 2023 18:44:55 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qxWId-0004fG-9c; Mon, 30 Oct 2023 13:43:41 -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 1qxWIU-0004ai-Tv for emacs-devel@gnu.org; Mon, 30 Oct 2023 13:43:31 -0400 Original-Received: from smtprelay02.ispgateway.de ([80.67.31.36]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qxWIP-0000zy-Nf; Mon, 30 Oct 2023 13:43:30 -0400 Original-Received: from [185.17.206.16] (helo=condition-alpha.com) by smtprelay02.ispgateway.de with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.1) (envelope-from ) id 1qxWIM-00057q-1g; Mon, 30 Oct 2023 18:43:22 +0100 In-Reply-To: <2c15c71f-613d-ec61-774d-93e7696470eb@gutov.dev> X-Df-Sender: YWxleGFuZGVyLmFkb2xmQGNvbmRpdGlvbi1hbHBoYS5jb20= Received-SPF: pass client-ip=80.67.31.36; envelope-from=alexander.adolf@condition-alpha.com; helo=smtprelay02.ispgateway.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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:312000 Archived-At: Dmitry Gutov writes: > 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? > [...] Quoting from the corfu readme [1]: ---------------------------- Begin Quote ----------------------------- NOTE: Corfu uses child frames to show the popup and falls back to the default setting of the completion-in-region-function on non-graphical displays. If you want to use Corfu in the terminal, install the package corfu-terminal, which provides an alternative overlay-based display. ----------------------------- End Quote ------------------------------ Thus, there is a fallback behaviour of corfu on TTYs, and you ar enot loosing any completion _semantics_ in such a case. If you want a similar "eye candy" on a TTY, then one would have to use corfu-terminal as you point out. [1] https://github.com/minad/corfu/blob/main/README.org Looking at the "Alternatives" section in [1] may also be informative. >> [...] >> Result with company: >> ---------------------------------------------------------------------- >> >> The quick brown fox jum >> +-------------+ >> | candidate 1 | >> * BIG FONT HEADING | CANDIDATE 2 | >> BIG FONT HEADING | CANDIDATE 2 | >> | candidate 3 | >> | candidate 4 | >> +-------------+ >> ---------------------------------------------------------------------- >> [...] > > You can try out this branch: > https://github.com/company-mode/company-mode/pull/1394 > [...] Or you could adopt the child frame technique from corfu to avoid the problem occurring in the first place? Cheers, --alexander