From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yixuan Chen Newsgroups: gmane.emacs.bugs Subject: bug#73752: 29.4; Ligatures are randomly rendered with extra spaces Date: Sun, 27 Oct 2024 15:47:57 -0400 Message-ID: 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> <86zfmp72ku.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17363"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: luangruo@yahoo.com, 73752@debbugs.gnu.org, visuweshm@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Oct 28 02:16:19 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 1t5EMl-0004MM-KZ for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 28 Oct 2024 02:16:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t5EMC-0006I9-Iv; Sun, 27 Oct 2024 21:15:44 -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 1t5ELx-0006Fh-QO for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2024 21:15:31 -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 1t5ELx-0003xH-4S for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2024 21:15:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=In-Reply-To:From:References:MIME-Version:Date:To:Subject; bh=mR3RavBQ5FuG/ybu1miETruRVvTLhCJeisobL/fgy90=; b=BU5p6H0Ox47fsNbpEl+EdwklorWV8b1DA2c/rAqRE8IjGzRFCbgVImdPp35TCERU6Bhr/nJn1sX6lPRuo3pW5N4rQta6sh2LK+q/vSZiPUgWB44A7zc34Fhne74vrsw4Pjprgu5QhbDJgbltgbCykMdy7NLTQMEVrIYVv5P7y0NicNgf9ebaXzOSP2NpACyD1+yxN+LU3mB85mIFYjVM/XRcSf0Bu/ZCVBRTapEpWbnehZqXQNsIxmP49bnTvTdu3YClF5FJUutvTYkZp7ZLVpcqnro71d/CNFo3hGgh1H3ZVOv7VlqEMdF0CffNWtB9h0r9jRcYpxljM9tGyycI9g==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t5EMW-0002vK-Ei for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2024 21:16:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Yixuan Chen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 28 Oct 2024 01:16:04 +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.173007816111201 (code B ref 73752); Mon, 28 Oct 2024 01:16:04 +0000 Original-Received: (at 73752) by debbugs.gnu.org; 28 Oct 2024 01:16:01 +0000 Original-Received: from localhost ([127.0.0.1]:48483 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5EMS-0002uM-QA for submit@debbugs.gnu.org; Sun, 27 Oct 2024 21:16:01 -0400 Original-Received: from qs51p00im-qukt01080502.me.com ([17.57.155.23]:28049) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t59Fh-0007aQ-Os for 73752@debbugs.gnu.org; Sun, 27 Oct 2024 15:48:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xlk.me; s=sig1; t=1730058481; bh=mR3RavBQ5FuG/ybu1miETruRVvTLhCJeisobL/fgy90=; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type; b=HiTBG92l/9aq8IPVnOGd2DHInWESDTxXGT/qX72807IBUlSFZkRXyw/+aCsz6VBjB MVjQcZezhwUEpFh+1wJQngMg+AFasIakxH5Nd2fVLZ3SoPropygklD9r8Azhm7cMd7 9GYD+zufWeXe/AwHyb83jr25D1glvT2Vs7KZ6MhH/2h/Ry6Js6LjHUL9JxDSvZlhLk a7K1zg8z3VZ7qKo3kaMfKtaWjv2J7VCtEZ4L9pi0kSE4qDlVojVLP3inedwF/2CMDk citjVmQzGjffSRIivBEUsHkPGe3xtokUU1m/JdKbxrX49pcGj6BgPiAy+1hWRzEXE6 0seud6Lzrw9tQ== Original-Received: from [192.168.1.14] (qs51p00im-dlb-asmtp-mailmevip.me.com [17.57.155.28]) by qs51p00im-qukt01080502.me.com (Postfix) with ESMTPSA id 066DA4E402E4; Sun, 27 Oct 2024 19:47:58 +0000 (UTC) Content-Language: en-US In-Reply-To: <86zfmp72ku.fsf@gnu.org> X-Proofpoint-GUID: rfk_qX15GWClITCjPwj-_hZs5gieEMS- X-Proofpoint-ORIG-GUID: rfk_qX15GWClITCjPwj-_hZs5gieEMS- X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1051,Hydra:6.0.680,FMLib:17.12.62.30 definitions=2024-10-27_06,2024-10-25_02,2024-09-30_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 malwarescore=0 bulkscore=0 suspectscore=0 clxscore=1030 mlxlogscore=990 phishscore=0 spamscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2308100000 definitions=main-2410270174 X-Mailman-Approved-At: Sun, 27 Oct 2024 21:15:54 -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:294399 Archived-At: On 10/27/24 15:44, Eli Zaretskii wrote: >> 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? Maybe you missed one of my previous email, let me copy paste what I said again, > It's not about frequency, but probably total number of font face > attribute changes. The lisp code I submitted was changing the attributes > rapidly just to recreate the problem faster. In real-life, this problem > happens with normal emacs configuration, usually within half an hour. > > For reference, here > (https://github.com/LukeXuan/dot-files/tree/e6067ec232ea34e01fb9a1f1a358d1c328d47c50/.config/doom) > is my emacs configuration on top of doom. I primarily write LaTeX and > Coq and this problem occurs every 30 minutes or so. The solution is to > either restart emacs (what I used to do) or disable ligature altogether > (what I do now). >