From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Akib Azmain Turja Newsgroups: gmane.emacs.devel Subject: Re: Implementing child frames on terminal Date: Tue, 12 Jul 2022 20:21:02 +0600 Message-ID: <874jzm1kfl.fsf@disroot.org> References: <87czfxu7be.fsf@disroot.org> <874k19tya1.fsf@disroot.org> <83h759lb6f.fsf@gnu.org> <87tu99s860.fsf@disroot.org> <838rqklurd.fsf@gnu.org> <87tu7n10hr.fsf@disroot.org> <87h73mykv6.fsf@yahoo.com> <87h73m20fg.fsf@disroot.org> <83o7xuxyc0.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35369"; mail-complaints-to="usenet@ciao.gmane.io" Cc: luangruo@yahoo.com, monnier@iro.umontreal.ca, emacs-devel@gnu.org, ibluefocus@outlook.com To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jul 12 16:35:44 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 1oBGzI-0008zh-JQ for ged-emacs-devel@m.gmane-mx.org; Tue, 12 Jul 2022 16:35:44 +0200 Original-Received: from localhost ([::1]:40844 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oBGzH-0001hQ-4Z for ged-emacs-devel@m.gmane-mx.org; Tue, 12 Jul 2022 10:35:43 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53836) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBGpN-0006Vs-So for emacs-devel@gnu.org; Tue, 12 Jul 2022 10:25:31 -0400 Original-Received: from knopi.disroot.org ([178.21.23.139]:52030) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBGpI-0001Mc-0p; Tue, 12 Jul 2022 10:25:29 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 1F4A440EFF; Tue, 12 Jul 2022 16:25:17 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Original-Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with UTF8SMTP id tCwlNiTqktef; Tue, 12 Jul 2022 16:25:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1657635686; bh=AXyA3daF4eJCujC7QiWICUcT+ySUKZBv3C5EqrmQ194=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=jL7ekQDd9A4f96kqzisl97iKY0vcjqT8JHglX13hqocs8vbBSwaEJASWX6np0r1AP Wn4VmAB08vVqp+KMUDAmLA+bOQaHgWgSOLdx4xHyOlmCecFwne0bS1oY/FHRg6I/pM fB8mvi6GpwOVp4npQaJWvffOlz33V26c46dhfDQBF7e7OYkq4d7kXBe6/KvYdxFLI1 cf5xqm+SageL/DncKwrzwjX7dkO0oq411xG2Toa7LPBnrcx6sYf2ibh8QbIFLxSPnc Ryyjaq4RqrMXoQfmGsVtpC3cq50dyI5NGOyGrOO7+T7oynJv4XZ2Q/e8jIMXCUxHVM MZKCtEIwMPIzw== In-Reply-To: <83o7xuxyc0.fsf@gnu.org> Received-SPF: pass client-ip=178.21.23.139; envelope-from=akib@disroot.org; helo=knopi.disroot.org 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, 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:292086 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Eli Zaretskii writes: >> From: Akib Azmain Turja >> Cc: Eli Zaretskii , monnier@iro.umontreal.ca, >> emacs-devel@gnu.org, ibluefocus@outlook.com >> Date: Tue, 12 Jul 2022 14:35:31 +0600 >>=20 >> > Fixing that (assuming you clip the contents of the child frame to the >> > parent) sounds easier than what you propose further on here: >> > >> >> I think we should somehow render the child frame glyph matrix before >> >> processing it's parents. Then we can copy the it's glyph matrix to i= t's >> >> parent's one. And, in case the child frame doesn't cross parent's >> >> edges, we can use a floating window (as you suggested) as an >> >> optimization (although I don't think we need this optimization, since >> >> terminal don't usually have many characters). >>=20 >> Really? It looks like it would require to modify whole redisplay logic >> to make sure whether a glyph is inside edges and write to it only if it >> is. > > Actually, the current redisplay code does this all the time: that's > how we know when to continue or truncate a too-long line, or where to > wrap a long line under visual-line-mode. > But this problem is different than that. In your too-long line case, redisplay code checks whether a glyph is inside the window. But for child frames, it needs to check whether a glyph is inside the parent frame (i.e. safe to write to), write it if it is and always assume that it was written successfully. For example, if we have a 30 chars wide child frames displaying a 40 chars wide line and the child frame's left edge is 20 char away from it's parent right edge, the redisplay code has to write the first 20 chars to the glyph matrix and don't write the next 10 chars, but still think that they were written, and finally truncate the last 10 chars or wrap it depending on the value of "truncate-lines". =2D-=20 Akib Azmain Turja This message is signed by me with my GnuPG key. It's fingerprint is: 7001 8CE5 819F 17A3 BBA6 66AF E74F 0EFA 922A E7F5 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEyVTKmrtL6kNBe3FRVTX89U2IYWsFAmLNg04ACgkQVTX89U2I YWsilQ/+LjN21P7e/xc8fBy6SLQhwcdjJdjOaIqsmze87RL/rD5AGJHM+ve56425 5MVVe31olDxlUYXKLNDe3DV3euLrGcmrI1L016U68ntJFKzpybQ6c+H7q9acrWE2 rQQx/6gVwzOgx49wmltWw+VY59M63ElwJCObDKFjaC/e/U3pcR2Ojv6c96AaEL7z METX6H4LLrvPUU009eOYRETx+HYOUVLcUGCPrUAp8zaD/kxVmCyGvf7dXgTRfcV6 ecMD0tBcIs8EtSLBStjttgFu8gCXtNzPaMJfv6uPrIBPu++r+KviW8WBhini/8pm J9WM7WGrr4W2XbOMQpHE4+73CuwvXjncqb9oyQwi37wY7lCXBVVflahk/JAa1/ym C1C3Q7F2h8Uwvl6OxHgg3FWKSDjW5koHgGidTjlwfIrFmNkgi+q1ujWunRguXufq E5Pz7POz27Wqdmnu20F0jIFHIWRPxaiUzSTiu4FyXO3Q25wlivWVcuca0bCMxIuP sCs+Dy2edMk5E0nsJj7TcDffyjPCMX83jcsvxUbJpVgDwrgoK0KA5zXHYV0R83+s 5OpDEsq36+BvmkPlOHMnMoitLJC90BgbPPLvrmC4O6f6O10oimAt+7UpBM9MCrzw 6Q7cc/CgE2NTA1+2hb64Ql4mrJGfOziXska0q2qBzLftcf+WePk= =G+5U -----END PGP SIGNATURE----- --=-=-=--