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: Question about minibuffer and child frames (Posframe) Date: Mon, 07 Oct 2024 09:08:02 +0800 Message-ID: <87jzek200d.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="31372"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Emacs Devel , Martin Rudalics To: Gerd =?iso-8859-1?Q?M=F6llmann?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Oct 07 03:09:26 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 1sxcFa-000824-7g for ged-emacs-devel@m.gmane-mx.org; Mon, 07 Oct 2024 03:09:26 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sxcEc-0000Hx-7G; Sun, 06 Oct 2024 21:08:26 -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 1sxcEb-0000Hn-1m for emacs-devel@gnu.org; Sun, 06 Oct 2024 21:08:25 -0400 Original-Received: from m16.mail.163.com ([117.135.210.4]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sxcEV-0000PH-50 for emacs-devel@gnu.org; Sun, 06 Oct 2024 21:08:24 -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=DWFxjUCtl4DAZiXDdGUeKoPbZ7iDxLihn7en5t1Llyo=; b=MJEC30o9fu0jkGDL1r2zkK8Pi6zwRsAlKUCUJ89hozMJzluA1u1tU5H3Miohfi JFxpm3nDm97KGdk+Ht3ZU0VZr2g4FcTCm/k8oQ5EC4LCKsUfNuKo4pNKS8Lrq6fR dyhTMUJ3OEp6NhfmDnWk5vcsuVelDX90Fpqs1b4EeJl9Y= Original-Received: from Guix (unknown [117.92.180.98]) by gzga-smtp-mtada-g1-0 (Coremail) with SMTP id _____wD3f9lyNANnon9uBQ--.49777S2; Mon, 07 Oct 2024 09:08:03 +0800 (CST) In-Reply-To: ("Gerd =?iso-8859-1?Q?M=F6llmann?= =?iso-8859-1?Q?=22's?= message of "Wed, 02 Oct 2024 14:50:07 +0200") X-CM-TRANSID: _____wD3f9lyNANnon9uBQ--.49777S2 X-Coremail-Antispam: 1Uf129KBjvJXoW7WryftFW7ArWUWryDJFy3CFg_yoW8CFyfpr yYg3y8Aw4qkanrCr1vyw1rCFy5uFyDXw4Fg3yrZFy8u343tryavrWaya42y348Ww1xKryY vFWUGry8Gw15Z37anT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x0zRrwIkUUUUU= X-Originating-IP: [117.92.180.98] X-CM-SenderInfo: 5wxpt2lkx6il2tof0z/1tbiYBBx1GcDJ6mrHgAAsK Received-SPF: pass client-ip=117.135.210.4; 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_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_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:324366 Archived-At: Gerd M=F6llmann writes: Wow, this is a good feature. posframe do not handle focus in most situation, for it is too complicate to let focus work. posframe just *show* the content of a buffer. When enable vertico-posframe, we just let the content of minibuffer is showed in a posframe, but input handle is in parent frame, we lock the height of parent minibuffer window and vscroll minibuffer window to hide minibuffer content in below function. (defun vertico-posframe--handle-minibuffer-window () "Handle minibuffer window." (let ((show-minibuffer-p (vertico-posframe--show-minibuffer-p)) (minibuffer-window (active-minibuffer-window))) (setq-local max-mini-window-height 1) (window-resize minibuffer-window (- (window-pixel-height minibuffer-window)) nil nil 'pixelwise) (set-window-vscroll minibuffer-window 100) (when show-minibuffer-p (set-window-vscroll minibuffer-window 0)))) > > On GUI, consult-buffer pops up a child frame, which has, AFAICT, a > minibuffer at the top. The cursor is in that minibuffer. The minibuffer the minibuffer showed in posframe is not real minibuffer :-)=20 > ih the parent frame looks inactive. There is no prompt or anything else. > That's how it should be. No, it's content is hide, but it active. > > With my new code on tty, the same child frame pops up, but this time the > child frame's minibuffer contains a prompt and what I type is displayed > there and so on, but it doesn't have a visible cursor. The parent in posframe, cursor just a space with face of cursor. > frame's minibuffer this time contains the prompt and the cursor, too. Maybe the below hack is not work well in tty (set-window-vscroll minibuffer-window 100) In my opinion, hide minibuffer's content just hack way, I can not find a better way to hide minibuffer window's content. > > Any idea what that could be? --=20