From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Gerd_M=C3=B6llmann?= Newsgroups: gmane.emacs.devel Subject: Re: "Final" version of tty child frames Date: Tue, 22 Oct 2024 10:21:43 +0200 Message-ID: References: <86ttd4ftvs.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10874"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Oct 22 10:22:42 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 1t3AA5-0002eJ-GY for ged-emacs-devel@m.gmane-mx.org; Tue, 22 Oct 2024 10:22:41 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t3A9G-0005ty-Il; Tue, 22 Oct 2024 04:21:50 -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 1t3A9F-0005th-3s for emacs-devel@gnu.org; Tue, 22 Oct 2024 04:21:49 -0400 Original-Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t3A9D-00089z-Ev; Tue, 22 Oct 2024 04:21:48 -0400 Original-Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-431548bd1b4so52101535e9.3; Tue, 22 Oct 2024 01:21:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729585305; x=1730190105; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=rfvEIzHoF7QEA9dqRWPPUNG3jz826wERs1Xd58nw/nA=; b=DyimudFZrcAZbsX7ly3F+JNzDmKSZHNo+LHObUYo624e39BtOC1PZzQujkggF8mEom kL5db2Munz0kXxZm/UtlFjkQ0GrjQ5rnfKUqIlI/ym1ubLqUXUvKzZY9oVhWIOMMJ2TO aHpTXRUrUC9fkbfkpQaVTXv2a/olLmZYDPhn4+F66WECrB35cdD7IdkRMzl+TnStafqM /5Szy7A2MjRoTqhrjCtEhkiuYAjgh3s5Zw30BFa2CaJTWzQzLEp7SKjDXakpO+28+XZ6 lth1FjqJSP6d8nTiKc44BK45UnwTPUIFm63SJFG2O0q00F5T9mzN9j8zTbS4uLJ6cYq2 89/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729585305; x=1730190105; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=rfvEIzHoF7QEA9dqRWPPUNG3jz826wERs1Xd58nw/nA=; b=Jas8SBI3WG7OJFLkmAAFED/FKmvdFx1Tie11iXq5Ift0hB1jPLtheo7Wjz4Mn+skjb IzXv72bgCvU4e155hsOMAoPSaXBiYSBnssuYjf+iMI48M6MydfTnso/tAmD5VcZC8WvK m29Z0LIaCIozxxcoW2TIXPWBTCA6t/PvQm3xx2fBK5ve1uHrKCsaSdk//9yzvEeTqQtI wsuKvsLi6V/UuxrT+6l3Ce0KFAyPgaJE7xGVVtlzaNKWbnuqZ8UQLpQMlf7MqdCz9TL+ X/jZHybLZkhX3EctkIDeNHBG0tyH+oRSeBY62aLhsNSV6u9UmA/SciDzbEBxXTWTB4Ob aYTA== X-Gm-Message-State: AOJu0YyqEYpDwrt2kvwf81/2FTcybP/jnUftNAQzu+rXmwgSMykfFfks EZj4COWXcpThZx+PJnmL9yhNXic9fLeV3ZCinfnoc//wZ7cE5HH1c2eD9sNj X-Google-Smtp-Source: AGHT+IFWHGw2+vJ52oeXylNgXHXAQjicXiwqIw6riOzhlEsY/3qSstpVyoLES71sjofP77+XWW4cKA== X-Received: by 2002:a5d:5310:0:b0:378:7f15:d51e with SMTP id ffacd0b85a97d-37eab6ee5e1mr9046617f8f.43.1729585304609; Tue, 22 Oct 2024 01:21:44 -0700 (PDT) Original-Received: from pro2 (p4fe3ac5a.dip0.t-ipconnect.de. [79.227.172.90]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37ee0b9cd48sm6058316f8f.111.2024.10.22.01.21.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Oct 2024 01:21:44 -0700 (PDT) In-Reply-To: <86ttd4ftvs.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 22 Oct 2024 11:01:59 +0300") Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=gerd.moellmann@gmail.com; helo=mail-wm1-x32e.google.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, 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:324722 Archived-At: Eli Zaretskii writes: >> From: Gerd M=C3=B6llmann >> Date: Tue, 22 Oct 2024 06:46:15 +0200 >>=20 >> 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. >>=20 >> 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. > > Is there a way to test the feature without using corfu? If so, can > you suggest some simple Lisp to see if the child frames work in a > build of this branch? Thanks for taking a look. Something built-in you could try is show-paren-mode with show-paren-context-when-offscreen set to 'child-frame. Not very useful, but it should display a child frame at (0,0) of a window. Or maybe (defun my-make-child () (interactive) (make-frame `((parent-frame . ,(selected-frame)) (background-color . "gray10") (foreground-color . "white") (internal-border-width . 1) (top . 15) (left . 40) (width . 80) (height . 25)))) which is not really the use case I have in mind but anyway. >> Disclaimer: As I mentioned already in other contexts, I don't want to >> be the maintainer of anything, for personal reasons. >>=20 >> Have fun! > > Does this compile cleanly for you? I get gobs of warnings like this: Yes it does, with clang. > dispnew.c: In function =E2=80=98gui_update_window_end=E2=80=99: > dispnew.c:4495:34: warning: potential null pointer dereference [-Wnull-= dereference] > 4495 | hlinfo->mouse_face_beg_row =3D hlinfo->mouse_face_beg_col= =3D -1; > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > This seems to be because you've changed the definition of > MOUSE_HL_INFO to be this: > > # define MOUSE_HL_INFO(F) \ > (FRAME_WINDOW_P (F) \ > ? (FRAME_OUTPUT_DATA (F) \ > ? &FRAME_DISPLAY_INFO (F)->mouse_highlight \ > : NULL) \ > : &(F)->output_data.tty->display_info->mouse_highlight) > > I don't understand the need for this NULL there. What is its purpose, > and what will we lose by going back to the original definition? I > believe that NULL is what's causing these warnings. It probably crept in when I ported this. I can remove that if you want.