From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#73752: 29.4; Ligatures are randomly rendered with extra spaces Date: Sun, 27 Oct 2024 21:44:49 +0200 Message-ID: <86zfmp72ku.fsf@gnu.org> References: <86zfn9ycis.fsf@gnu.org> <86o735als7.fsf@gnu.org> <87o73534dn.fsf@gmail.com> <86h68x8nuz.fsf@gnu.org> <86ed418niu.fsf@gnu.org> <6566317e-03bb-4856-9cc8-5e90c2875e44@xlk.me> <86cyjl8mqs.fsf@gnu.org> <86bjz58ik7.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7373"; mail-complaints-to="usenet@ciao.gmane.io" Cc: luangruo@yahoo.com, 73752@debbugs.gnu.org, visuweshm@gmail.com To: Yixuan Chen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Oct 27 20:45:44 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1t59Cp-0001jG-Go for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 27 Oct 2024 20:45:43 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t59Ca-0006A1-Bs; Sun, 27 Oct 2024 15:45:28 -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 1t59CZ-00069s-DT for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2024 15:45:27 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t59CZ-0008PK-59 for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2024 15:45:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=7N/N0/h39Z33gE8FItVRDbn6P9E1rnRk0wP2RcAmW20=; b=YCjNoPkvmJ4bQwhyasKx/gVu0zLyBGmmHKZ6jac+138u+mjzQoNZhU0cfz30EHqf3JiY/iglW4bW3tm5jMH0eE55yJK6SpZQJeY5n0fTQa516OLry878Wi27uy6NSpggpvHjG7+pTykM5BMEl0aSa/QGwvME/+hG1Z2K3SHZqDsiu69oh1njIbg7gedd2+qQUwYrdBmonu895BLIg1RHUhlRsTlt/bPHpw3Nr9Ao2hk8XnfAqpvBYPhIdpXJZCIWXhE7CK66hrDVwrrgU/8m8wN2+OaP7FwPPw9Qm9uXRHU/NNG8O2z0o65KZYPgn2NzBo+naqX5M56R/3zKhjM0LA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t59D8-0007Vl-84 for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2024 15:46:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 27 Oct 2024 19:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73752 X-GNU-PR-Package: emacs Original-Received: via spool by 73752-submit@debbugs.gnu.org id=B73752.173005833328466 (code B ref 73752); Sun, 27 Oct 2024 19:46:02 +0000 Original-Received: (at 73752) by debbugs.gnu.org; 27 Oct 2024 19:45:33 +0000 Original-Received: from localhost ([127.0.0.1]:46433 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t59Ce-0007P4-ST for submit@debbugs.gnu.org; Sun, 27 Oct 2024 15:45:33 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:44882) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t59Cd-0007Or-Ra for 73752@debbugs.gnu.org; Sun, 27 Oct 2024 15:45:32 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t59Bz-0008AV-6e; Sun, 27 Oct 2024 15:44:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=7N/N0/h39Z33gE8FItVRDbn6P9E1rnRk0wP2RcAmW20=; b=Ez8VBQfRyeJe 0W6ZK2BebmYpHwd+VI8U4bcUlE8O7GH5AuTA4yCw1fsn1mgFym4PBnPBgHFCRxTVwJJqgCvt8Ks/c 7PuLyP0cycCaRzP0c3ZAb7FZPI4Q0tM0e9Z365Uir/h/wzhzRtn6vmWspS5rh3qp0J/5V2RkfsHNl x76jUro0OgKGoNp9FjFc44PFlrGHY3CZGN7iyMOTiN9CdYCHrtsbZj5ulQRbgNtPTe66BfcnuNB1s YApbAWuwc+UjwXUPnD8SjPLF6Pe3UhsRFwTi0Qp4vKsbfPtcUKj+RjxRtOKIbwpnDfF2NyCQjfAE8 8WJn8KrFxl1bWNLQbPpcxw==; In-Reply-To: (message from Yixuan Chen on Sun, 27 Oct 2024 15:36:06 -0400) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:294389 Archived-At: > Date: Sun, 27 Oct 2024 15:36:06 -0400 > Cc: visuweshm@gmail.com, luangruo@yahoo.com, 73752@debbugs.gnu.org > From: Yixuan Chen > > On 10/27/24 15:14, Eli Zaretskii wrote: > >> Date: Sun, 27 Oct 2024 13:46:55 -0400 > >> Cc: visuweshm@gmail.com, luangruo@yahoo.com, 73752@debbugs.gnu.org > >> From: Yixuan Chen > >> > >>> Sorry, I still don't understand. Your code does > >>> > >>> (highlight-lines-matching-regexp (cdr face) (car face)) > >>> > >>> This potentially shows each line in a different face, and thus can > >>> affect the metrics of the SPC character glyph which is what the > >>> indentation is made of. So why is this a problem, let alone a bug? > >> > >> The problem is executing that line at 10PM today may render the font one > >> way, while executing that line at 6AM tomorrow (with exactly the same > >> "face" variable) may render the font a different way, even if all the > >> other variables remains the same. > > > > But you modify the faces in a random fashion, so why is this a > > surprise that it is not deterministic? > > I said, > > > ... (with exactly the same "face" variable) ... even if all the > > other variables remains the same. > > Yes, this script is modifying the scripts in a random fashion, but let's > imagine this: > > 1. the first time I open emacs, start the script and it randomizes the > first line to a combination of face attributes (let's say (16, bold, > regular)) in 5 seconds after going through 50 different combinations, it > looks one way. > > 2. I restart emacs, start the script and it randomizes the first line to > the same combination of face attributes (16, bold, regular) in 5 minutes > after going through 3000 combinations, it looks differently from the > first time, > > Do you agree that in both cases that single line should look the same? > And they should always look the same as long as the randomization hits > (16, bold, regular) on that line regardless of time and previous history? That depends when redisplay kicks in, between your face randomizations. Among other factors. And I still fail to understand why this largely artificial program is important to investigate. Are there any real-life cases where you see the same face displayed differently when ligatures are involved? If not, what useful stuff will we learn by digging into this, especially since reproducing the problem is so hard?