From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Feng Shu Newsgroups: gmane.emacs.devel Subject: Re: "Final" version of tty child frames Date: Wed, 23 Oct 2024 11:05:51 +0800 Message-ID: <87cyjrjz74.fsf@163.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7983"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Emacs Devel To: Gerd =?iso-8859-1?Q?M=F6llmann?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Oct 23 05:07:11 2024 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 1t3RiI-0001zv-AP for ged-emacs-devel@m.gmane-mx.org; Wed, 23 Oct 2024 05:07:10 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t3RhR-0002Kf-Oh; Tue, 22 Oct 2024 23:06:18 -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 1t3RhL-0002K0-QK for emacs-devel@gnu.org; Tue, 22 Oct 2024 23:06:12 -0400 Original-Received: from m16.mail.163.com ([117.135.210.5]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t3RhF-0005UX-LR for emacs-devel@gnu.org; Tue, 22 Oct 2024 23:06:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-ID:MIME-Version: Content-Type; bh=2P2fw9+NYUK3GyMrO9IH+q7o4TCHjTf8CxXkHaD9zn0=; b=VsaR5324cvu3Px8gVvZTCwX0D1u32yA/Bne7+3rUFBBDCrpLsyAapFQvCRIgAv Ci99L7TvSk0Aa/6Ut0itJmCjPFmSshKJ0lQ66mJKfIUlhOgh11tAT4wceFfWWx5d Wn+PqYDZzPVv4ziNTEkrjULcQDeKNE08n/kmtoLCbLUoY= Original-Received: from Tumashu (unknown [218.92.14.78]) by gzga-smtp-mtada-g0-4 (Coremail) with SMTP id _____wBXP4cPaBhneBmwCg--.35669S2; Wed, 23 Oct 2024 11:05:52 +0800 (CST) In-Reply-To: ("Gerd =?iso-8859-1?Q?M=F6llmann?= =?iso-8859-1?Q?=22's?= message of "Tue, 22 Oct 2024 06:46:15 +0200") X-CM-TRANSID: _____wBXP4cPaBhneBmwCg--.35669S2 X-Coremail-Antispam: 1Uf129KBjvJXoWxZr1UKr1ftw48Cw43Wr43GFg_yoW5Ar43pa 4093sYyrWktw1Uuw1jqr18Jry5u34kJa42krZYqry8JFWYqa40kr1aqry5A3yDWr1kJ3yj kFWayw1jgws2vaDanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x0zR33kNUUUUU= X-Originating-IP: [218.92.14.78] X-CM-SenderInfo: 5wxpt2lkx6il2tof0z/1tbiYBiB1GcYZvglZAAAsN Received-SPF: pass client-ip=117.135.210.5; envelope-from=tumashu@163.com; helo=m16.mail.163.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=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:324753 Archived-At: Gerd M=F6llmann writes: Will the below interfaces changed? 1. tty-child-frames 2. tty-non-selected-cursor 3. undecorated If not, I have updated posframe, vertico-posframe and ivy-posframe to support three interfaces. > I have (re-)created the scratch/tty-child-frames branch today, which > contains the code for child frames on ttys, based on a recent master. > > I'm a happy user of this for a while now with corfu, vertico + > vertico-posframe + consult, transient + transient-posframe, > which-key + which-key-posframe. And my current todo list is now empty, > so here it is. > > To use it, redefine these two functions: > > #+begin_src emacs-lisp > (defun posframe-workable-p () > "Test posframe workable status." > (and (>=3D emacs-major-version 26) > (not (or noninteractive > emacs-basic-display > (or (featurep 'tty-child-frames) > (not (display-graphic-p))) > (eq (frame-parameter (selected-frame) 'minibuffer) 'only)= )))))) > > (cl-defgeneric corfu--popup-support-p () > "Return non-nil if child frames are supported." > (or (display-graphic-p) > (featurep 'tty-child-frames))) > #+end_src > > > To make things look nicer you might also want to > > #+begin_src emacs-lisp > (push '(tty-non-selected-cursor . t) vertico-posframe-parameters) > (push '(undecorated . nil) vertico-posframe-parameters)) > (push '(undecorated . nil) transient-posframe-parameters)) > #+end_src > > The 'undecorated' frame parameter lets Emacs draw a border around the > child frame (default is no border). The tty-non-selected-cursor > parameter makes redisplay put the terminal cursor in a non-selected > frame which I find nice for things like consult-buffer. Which is why I > added it :-). > > What's there fits my personal needs entirely. I am not interested in > full support of child frames as they exist on window systems because I > don't see child frames being used except for things like posframe and > corfu and similar. And, TBH, I don't find the tty frame code fun to > work with. > > Other things not contained: > > - Support for anything but termcap frames. I bet I broke MSDOS. > - Mouse support except with xterm-mouse-mode (no GPM). > - Drawing borders like it is normally done (internal border and so > on). Tried that once, git reset --hard, won't happen. > - Tooltips. I think tooltips could relatively easily be implemented > with child frames by copying or extracting the non-native tooltip > code from x-show-tip or some such. From my POV, that would be best > done by refactoring the tooltip code across window systems which I > can't do. > - Documentation. Would only make sense to write if this goes into GNU, > which might or might not happen, depending on, from my side, how > much work that is. > > Disclaimer: As I mentioned already in other contexts, I don't want to > be the maintainer of anything, for personal reasons. > > Have fun! > > --=20