From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: StrawberryTea Newsgroups: gmane.emacs.bugs Subject: bug#65896: 30.0.50; folding text with text properties prevents background from extending past the newline Date: Sun, 24 Sep 2023 02:53:02 -0500 Message-ID: <877cog80hc.fsf@strawberrytea.xyz> References: <87ttrzmfua.fsf@strawberrytea.xyz> <87il8fm7x2.fsf@gmail.com> <40b4f4d3-34ae-4631-bebd-eefcd034d87e@app.fastmail.com> <83il8envaf.fsf@gnu.org> <87pm2d6mbj.fsf@localhost> <83bkdvaio4.fsf@gnu.org> <87jzsiy0ra.fsf@localhost> <83il82775q.fsf@gnu.org> <8734z6xvsh.fsf@localhost> <83a5te74sa.fsf@gnu.org> <87fs352mdx.fsf@localhost> <83sf75401f.fsf@gnu.org> <871qep2l2z.fsf@localhost> <83pm293w0k.fsf@gnu.org> <87y1gx11vv.fsf@localhost> <83jzsh3uj8.fsf@gnu.org> <87ttrl0yt1.fsf@localhost> <87lecwrast.fsf@strawberrytea.xyz> <83edio4snm.fsf@gnu.org> <87jzsgr9jr.fsf@strawberrytea.xyz> <83cyy84143.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29778"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.10.6; emacs 30.0.50 Cc: yantar92@posteo.net, 65896@debbugs.gnu.org, kevin.legouguec@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Sep 24 10:01: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 1qkK3A-0007NH-1h for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 24 Sep 2023 10:01:17 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qkK2z-00081E-3w; Sun, 24 Sep 2023 04:00:57 -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 1qkK2s-00080c-MS for bug-gnu-emacs@gnu.org; Sun, 24 Sep 2023 04:00:51 -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 1qkK2s-000435-EN for bug-gnu-emacs@gnu.org; Sun, 24 Sep 2023 04:00:50 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qkK33-0006lZ-S8 for bug-gnu-emacs@gnu.org; Sun, 24 Sep 2023 04:01:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: StrawberryTea Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 24 Sep 2023 08:01: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.169554244425976 (code B ref 65896); Sun, 24 Sep 2023 08:01:01 +0000 Original-Received: (at 65896) by debbugs.gnu.org; 24 Sep 2023 08:00:44 +0000 Original-Received: from localhost ([127.0.0.1]:40941 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qkK2j-0006kr-Dc for submit@debbugs.gnu.org; Sun, 24 Sep 2023 04:00:44 -0400 Original-Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:49285) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qkK2e-0006kX-Hi for 65896@debbugs.gnu.org; Sun, 24 Sep 2023 04:00:40 -0400 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id B05DB3200959; Sun, 24 Sep 2023 04:00:18 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Sun, 24 Sep 2023 04:00:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= strawberrytea.xyz; h=cc:cc:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1695542418; x=1695628818; bh=pPUmv011ZO2zN9513YfefyjaMgtHNw/Iz36 OqzMCbQA=; b=w6IiIQFZXw06+t22UfBAJ9asMlli6l2lA3JhxUp2x7tbVUIPUJw YNLs4xweKsbX5r+S86jRRHE7IQdbrs093kG1qmjOw9otQMlsU6rqIKWGuE/PDIEr hj9Of0EPqNxzyQuWU/IFEiAXSL0wzX2l04hoe/o25YlisHd93QK3lSpfPB5k6BXj rhp1CK5AhNbuxDD+A4lo9MDxD3zO6PkbioXB3p2GuJ8gXo6rxWme8m/8yqXKxyIy 6+dbtfHwGARkyPQ0cCKlxQ3I53PN3RDLU0byHY3x1WLWGe0rZ8GuLXHIQRDMOSJL vgS+XcJFAdtl6jdKNECr32TPX90cuS5/mBQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1695542418; x=1695628818; bh=pPUmv011ZO2zN 9513YfefyjaMgtHNw/Iz36OqzMCbQA=; b=IMexNUazaJLAnSC2sqvJX7vM/eN2G KKs9VyLERWcHcTYSSzv3/A96p18ehKB3B0jTNS9ZWcn5xKre+f5nf+qRI+E6qlcE rXj7TLmJdeV/eoT+IX6HPyKQIwrZGXguHbBLOK7QITlQSyFdQg9uCo+oiFBdWsYZ US6oKZhLvOYzIRLdweLIFSMLwDIN7curN1vJwhSPHh9xn89ewGZRsHlxs4FKrYwK 1TQNfnNhHcSzvORwK5SQcoV2Oj8Ht8IeBl7yHbchhibpuLvpb9+SeqbNipyqGeAH +riwQjNWm+Zup9/QqzKZ6l9LYuRfLlbH7i54dWcviWcXb3eQ+3AX+3Lqg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudeluddguddvlecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enfghrlhcuvffnffculddujedmnecujfgurhephffvvefuffhffggjkfggtgesmhdtreer tderjeenucfhrhhomhepufhtrhgrfigsvghrrhihvfgvrgcuoehlohhokhesshhtrhgrfi gsvghrrhihthgvrgdrgiihiieqnecuggftrfgrthhtvghrnhephfelleffvdeijeetgfdt vdfghfegfedvtefgjeefveejteegudekveelvdeluefhnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomheplhhoohhksehsthhrrgifsggvrhhrhiht vggrrdighiii X-ME-Proxy: Feedback-ID: id85149b6:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 24 Sep 2023 04:00:17 -0400 (EDT) In-reply-to: <83cyy84143.fsf@gnu.org> 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:271222 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I finally figured it out. This can be resolved with a small Elisp advice: (advice-add #=E2=80=99org-fold-core-region :around #=E2=80=99cae-org-fold-r= egion-a) (defun cae-org-fold-region-a (oldfun from to flag &optional spec-or-alias) (if (and (eq to (point-max)) flag) (setq to (1- to))) (funcall oldfun from to flag spec-or-alias) (remove-overlays from (1+ to) =E2=80=99cae-org-fold-heading t) (when flag (let ((o (make-overlay to (1+ to) nil =E2=80=99front-advance))) (overlay-put o =E2=80=99evaporate t) (overlay-put o =E2=80=99cae-org-fold-heading t) (overlay-put o =E2=80=99face (save-excursion (goto-char from) (face-at-point))) (overlay-put o =E2=80=99display =E2=80=9C\n=E2=80=9D)))) I modeled the code after the Backline package which does the same thing for Outline, which uses overlays. I=E2=80=99m thinking now that we should not p= atch the display engine. Eli Zaretskii writes: >> From: StrawberryTea >> Cc: yantar92@posteo.net, 65896@debbugs.gnu.org, kevin.legouguec@gmail.com >> Date: Sat, 23 Sep 2023 14:05:53 -0500 >> >> What I=E2=80=99m saying is that, I start up GDB and I set a breakpoint o= n Frecenter and >> step into display_line, I can see the glyph row and how all the characte= rs in >> the folded heading have the heading except the newline character at the = end. And >> I would like for in this specific scenario, the face on the ellipsis to = be used >> (since it has extend) instead of the face on the newline which is the de= fault >> face. But I don=E2=80=99t know how to make that modification to the code= yet. > > How will this behavior be limited to the case of folded text? Because > when the text between the ellipsis and the newline is not invisible, > the face of the newline should still be used, otherwise we will have > an unacceptable change in behavior in the =E2=80=9Cnormal=E2=80=9D cases,= when there=E2=80=99s > no invisible folded text. --=-=-=--