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#65896: 30.0.50; folding text with text properties prevents background from extending past the newline Date: Thu, 21 Sep 2023 15:54:41 +0300 Message-ID: <83a5tfadpq.fsf@gnu.org> References: <87ttrzmfua.fsf@strawberrytea.xyz> <83v8cfns1m.fsf@gnu.org> <87il8fm7x2.fsf@gmail.com> <40b4f4d3-34ae-4631-bebd-eefcd034d87e@app.fastmail.com> <83il8envaf.fsf@gnu.org> <87pm2d6mbj.fsf@localhost> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32014"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 65896@debbugs.gnu.org, kevin.legouguec@gmail.com, look@strawberrytea.xyz To: Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 21 15:03:18 2023 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 1qjJKw-00085O-Ts for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 21 Sep 2023 15:03:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qjJKn-0004L7-1n; Thu, 21 Sep 2023 09:03:09 -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 1qjJDk-0003BY-GZ for bug-gnu-emacs@gnu.org; Thu, 21 Sep 2023 08:56:01 -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 1qjJDk-00014h-3c for bug-gnu-emacs@gnu.org; Thu, 21 Sep 2023 08:55:52 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qjJDt-00040d-PZ for bug-gnu-emacs@gnu.org; Thu, 21 Sep 2023 08:56:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 21 Sep 2023 12:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65896 X-GNU-PR-Package: emacs Original-Received: via spool by 65896-submit@debbugs.gnu.org id=B65896.169530092315355 (code B ref 65896); Thu, 21 Sep 2023 12:56:01 +0000 Original-Received: (at 65896) by debbugs.gnu.org; 21 Sep 2023 12:55:23 +0000 Original-Received: from localhost ([127.0.0.1]:32985 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qjJDG-0003za-EG for submit@debbugs.gnu.org; Thu, 21 Sep 2023 08:55:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56064) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qjJDB-0003zE-AC for 65896@debbugs.gnu.org; Thu, 21 Sep 2023 08:55:21 -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 1qjJCn-0000ZU-HT; Thu, 21 Sep 2023 08:54:56 -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=T1i/ja56XhyXhuFmqTanXdW22EznD+neksKDo0qCXz8=; b=A5l0QW5gBhrI etqVUD3FRAWhSw4VgT1tD6HWkMJDs7ZnGk05xzaxLwDplxdO9LQttVBpGOlz6vsmHC3uW0puTfTiL VrbRWf19RyO8Yv8N9yv6aryFtEePR9ZqBb0BrsrSKPIlqcMdxs6po6fEJGnQcvdR3vRVj23cGdJ+J 6P3P5P7fO8etYzhKBAts1/3d8KyJ25uc7a3GNFfOE0adY8Cj7OvdwM1lJtyvIzIy1z5RxMaKrfS6F m62IfzOT8OOcL9ragDKjfLP9wEuPMygkSJDDs0yK/lQw3mjqIWTKvIhZG5LqJSQGGzZ/AkITaIjb3 9bE5nymooz1xUWdAzEIwWw==; In-Reply-To: <87pm2d6mbj.fsf@localhost> (message from Ihor Radchenko on Wed, 20 Sep 2023 12:50:08 +0000) 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:270987 Archived-At: > From: Ihor Radchenko > Cc: LemonBreezes , 65896@debbugs.gnu.org, > kevin.legouguec@gmail.com > Date: Wed, 20 Sep 2023 12:50:08 +0000 > > Eli Zaretskii writes: > > >> This might not sound too clever, but why don't we just make the extend > >> property be determined by the first character in the line rather than > >> the last character / newline character? > > > > How can Emacs know, when it processes the first character on a line, > > whether the last character on that line will have the same face? > > > > You seem to assume that the Emacs display engine has "global" view of > > the line it is processing for display. But that's not what happens: > > the Emacs display is basically a one-pass layout engine whose view of > > the text is a peephole whose size is a single character. The display > > engine processes a character, makes all the decisions regarding its > > display and layout, then proceeds to the next one, and so on. When it > > gets to the newline that ends a line, it makes the decision whether > > the last face it saw needs to be extended, and if so, extends it. > > Are you sure? I am looking at `extend_face_to_end_of_line' and it looks > like there is nothing preventing it from accessing it->glyph_row->glyphs > array to look backwards into preceding glyphs. First, glyphs have only partial information about the original face properties. IOW, the produced glyph row doesn't have all the info that the original text had. And second, I don't see how the accessibility to the glyphs is relevant to the issue at hand. Suppose the visible text of a line is: aaabbbbxxx where each letter represents some character with different face -- you want Emacs to extend face 'a' after the end of the line, not the face 'x', just because the line started with characters whose face was 'a'?? that's what the OP said, AFAIU. I cannot see how this proposal could be TRT.