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: Wed, 23 Oct 2024 07:00:03 +0200 Message-ID: References: <87cyjrjz74.fsf@163.com> <87zfmvpkki.fsf@163.com> <87v7xjpjoi.fsf@163.com> 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="34136"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Emacs Devel To: Feng Shu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Oct 23 07:00:54 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 1t3TUM-0008m7-7g for ged-emacs-devel@m.gmane-mx.org; Wed, 23 Oct 2024 07:00:54 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t3TTe-0000sR-AY; Wed, 23 Oct 2024 01:00:10 -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 1t3TTc-0000s0-Hn for emacs-devel@gnu.org; Wed, 23 Oct 2024 01:00:08 -0400 Original-Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t3TTa-0008T1-SQ for emacs-devel@gnu.org; Wed, 23 Oct 2024 01:00:08 -0400 Original-Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-4316cce103dso51222725e9.3 for ; Tue, 22 Oct 2024 22:00:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729659605; x=1730264405; 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=eN0MfeDSQIiYuNwp6ZUCjTcUzcUGI/Fz8ymhHoUufZs=; b=M0WX4zhbxZjpWllhuOqprj5HswN0KAtAIK6frZzt0seXbKurkcJ2aqxB/NBx93kvbk SUrkP0w+t0thlvK8lZfyKa+RWS67u+pd0JtIAGZwf4TE4ZqwhSpc3Uc7pi3OX3INrfBE 3uJyPZLSXAPAvQdtOKldQ8VDYxwrdnUJXftnBIribCTB08eoZckJO4SJR6p2AGnyRZw0 t6MAT55WNCuC7ceaBl5IfYkQ1kjbhsOEmO54SzhbCUtMc5eB+D/gOhV69OwTNhcdYiae KGLKnfT2k2qc1vszMkO2H4z+mrCdIqzzwBWmrLMTF4faoUQf/j57lhHim45tNYxWJw7e L/kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729659605; x=1730264405; 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=eN0MfeDSQIiYuNwp6ZUCjTcUzcUGI/Fz8ymhHoUufZs=; b=EDXTu3DArBl5dqecsGT1qHpoKo4mBLl4x4SV3spC+yWKgJo4wkXxuhdHOqH925ixPs EQOLwGu5V9JE6yfKoGLOestwAxSEu3ipvxOuuKu81vQDTitdEW4rgsoxoToLHumQRTbA 7Ej3my40yyavfh9HVBXOBkStkTYXzwskR9EwJQ9ee7gF47B5z44S1XwmAK6vmi1Op1rk YoddjC5rtyhWfprj2Ltu6GNSbaJWvi5RN4tKWtlAzDkb9sR+p2m/jCqLdTxUqk2SbskX sUSkWc9ZIzsFMVBpG6TH4Q3UEMx4YfTZH1Ie2DIckONckr1oLfz5i3G2wKxUEHP1+dLO PTHw== X-Gm-Message-State: AOJu0YxIKY0Ef4/Xjgxv+KySokw5oWSM/BE66aY9wFV1MHWm/OYqsfqj qqNPss6fTKVBjSS9Opsp43L6DIfRxemfoi956FXp7FiXh3LsKyKS+otARA== X-Google-Smtp-Source: AGHT+IG/6mq2zcpaN2fTCM2BvT7C777RsUuBmaplsK6qsc8rr03gc3YHHkMO+XeE7NCo5qHNNMtwWA== X-Received: by 2002:a05:600c:6b06:b0:431:557e:b40c with SMTP id 5b1f17b1804b1-43184241fa3mr10342255e9.27.1729659604497; Tue, 22 Oct 2024 22:00:04 -0700 (PDT) Original-Received: from pro2 (pd9e36c3f.dip0.t-ipconnect.de. [217.227.108.63]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43186be509dsm5328525e9.16.2024.10.22.22.00.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Oct 2024 22:00:04 -0700 (PDT) In-Reply-To: ("Gerd =?utf-8?Q?M=C3=B6llmann=22'?= =?utf-8?Q?s?= message of "Wed, 23 Oct 2024 06:40:11 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=gerd.moellmann@gmail.com; helo=mail-wm1-x330.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:324761 Archived-At: Gerd M=C3=B6llmann writes: > Gerd M=C3=B6llmann writes: > >> Feng Shu writes: >> >>> Gerd M=C3=B6llmann writes: >>> >>>> Feng Shu writes: >>>> >>>>> border do not work well when current buffer is CJK, maybe because CJK >>>>> Char width is not 1 >>>> >>>> Could you please send me a bit of CJK text so that I have something I >>>> can test this with? >> >> Thanks! > > Hm, okay, but not sure how to fix that. > > The problem comes indeed from the root frame displaying characters that > are more then 1 column wide, say N. When we output such a character to > the terminal, the cursor moves by N columns. Emacs represents that in > the glyph matrix by producing N glyphs for the character, all bu tthe > first have a padding flag set. So we have > > ... (C, 0) (C, 1) ... > > in the glpyh matrix, where C is the character, and the number is the > padding flag. > > Now assume, for example, that the child frame is posititoned so that its > left border where we want to display a '|' is in the column for the (C, > 1). > > That can't work, because writing C to the terminal moves 2 columns and=20 > will skip over the column where we want the '|' to appear. > > I think the same should happen, in principle, without borders. Haven't > checked that though. Maybe we have to "clear the field" to the left and > right of child frames in the root frame matrix so that wide characters > don't interfere. Another question is if there is something lurking with R2L? I have no idea what terminals do in that case, but I'd guess Eli knows :-).