From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [NonGNU ELPA] New packages: corfu-doc and corfu-doc-terminal Date: Sat, 28 May 2022 13:47:41 -0400 Message-ID: References: <87czfxu7be.fsf@disroot.org> <874k19tya1.fsf@disroot.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21150"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: emacs-devel@gnu.org, Yuwei Tian To: Akib Azmain Turja Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat May 28 19:48:38 2022 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 1nv0YI-0005KE-CR for ged-emacs-devel@m.gmane-mx.org; Sat, 28 May 2022 19:48:38 +0200 Original-Received: from localhost ([::1]:38228 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nv0YH-000626-8Y for ged-emacs-devel@m.gmane-mx.org; Sat, 28 May 2022 13:48:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45274) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nv0XV-0004PK-Na for emacs-devel@gnu.org; Sat, 28 May 2022 13:47:49 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:30100) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nv0XS-0006EA-Tf for emacs-devel@gnu.org; Sat, 28 May 2022 13:47:48 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id DAB85100140; Sat, 28 May 2022 13:47:44 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 49DBD100054; Sat, 28 May 2022 13:47:43 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1653760063; bh=8WLkog/f/pqkTcoGIFMqtPx/4eogZjg/SQPJCa1JWAQ=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=kIlhL346up3gMwVkaGuOxzzmCfO0LZI3S44TXei67GDu52DfivddxKRfeJYoyP6Wl VOcNoqRGNB3axRPmhs4hvhddi6YPe6dYxvdCpB5GkD6bRzzUHFojQ9S8EXJ1UCHdvd W5vrvQ4We3vDDfRrTUFMtbDqn3bLlfCypWoJIap+4Ft9t30QR7z/kJOQ/wvjgyzah1 UekbuiTucLeqYNvteO0jYWzb/NmJCCxvYqa00VMUqxxi8fRor/phYOfV87mzpCE1mI DmxbPazOjgSGgwu9ed+mMB7UIGTnsqkrP+dXN1MPr0VjNt4dvFPjVKqW5+Ysw4P8yg IT9+UzRNzGTLw== Original-Received: from pastel (unknown [45.72.221.51]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 0AB49120225; Sat, 28 May 2022 13:47:43 -0400 (EDT) In-Reply-To: <874k19tya1.fsf@disroot.org> (Akib Azmain Turja's message of "Sat, 28 May 2022 22:30:46 +0600") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=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" Xref: news.gmane.io gmane.emacs.devel:290344 Archived-At: > That's a great idea, but has a problem, Popon or popup.el don't work > like windows and frames. popup.el seems to be useful mainly for menus, > though I maybe wrong. Popon is more generalized and minimal, so it > requires manual handling of the text. That's the point of the design of the API: to provide an interface that is sufficiently restricted that it can work with various implementation choices (while still being useful enough). > example, I asked Corfu's author if it is possible to add corfu-terminal > to Corfu as an extension, but he said no just because of the extra Popon > dependency, which I intentionally extracted out of corfu-terminal to let > others use it) But once the API is available corfu can make use of it without adding a dependency on `popon`. > I think the best solution will be to implement child frames in terminal. > AFAIK, ncurses has a concept of floating window, which we can use to > render the frame. Doing this will solve all floating popup related > problems. Then all packages will use this standard (child) frame API to > show popup. We already have code which does this kind of thing, to draw menus in tty frames. IIUC the implementation currently relies on the fact that no ELisp is run while those overlaid menus are drawn, so it may require a fair bit of surgery, but indeed implementing something like popup/popon at a lower level is probably the better choice in the long run. Nobody has taken on this challenge yet, tho. In any case, this API that I think we should design should hopefully make it possible to use such a C-level implementation if/when it's available. Stefan