all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: StrawberryTea <look@strawberrytea.xyz>
To: Eli Zaretskii <eliz@gnu.org>
Cc: yantar92@posteo.net, 65896@debbugs.gnu.org, kevin.legouguec@gmail.com
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	[thread overview]
Message-ID: <877cog80hc.fsf@strawberrytea.xyz> (raw)
In-Reply-To: <83cyy84143.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1959 bytes --]

I finally figured it out. This can be resolved with a small Elisp advice:

(advice-add #’org-fold-core-region :around #’cae-org-fold-region-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) ’cae-org-fold-heading t)
  (when flag
    (let ((o (make-overlay to (1+ to) nil ’front-advance)))
      (overlay-put o ’evaporate t)
      (overlay-put o ’cae-org-fold-heading t)
      (overlay-put o ’face
                   (save-excursion (goto-char from)
                                   (face-at-point)))
      (overlay-put o ’display “\n”))))

I modeled the code after the Backline package which does the same thing for
Outline, which uses overlays. I’m thinking now that we should not patch the
display engine.

Eli Zaretskii <eliz@gnu.org> writes:

>> From: StrawberryTea <look@strawberrytea.xyz>
>> Cc: yantar92@posteo.net, 65896@debbugs.gnu.org, kevin.legouguec@gmail.com
>> Date: Sat, 23 Sep 2023 14:05:53 -0500
>>
>> What I’m saying is that, I start up GDB and I set a breakpoint on Frecenter and
>> step into display_line, I can see the glyph row and how all the characters 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 default
>> face. But I don’t 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 “normal” cases, when there’s
> no invisible folded text.

  reply	other threads:[~2023-09-24  7:53 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-12 18:00 bug#65896: 30.0.50; folding text with text properties prevents background from extending past the newline StrawberryTea
2023-09-12 18:51 ` Eli Zaretskii
2023-09-12 20:51   ` Kévin Le Gouguec
2023-09-12 21:35     ` LemonBreezes
2023-09-13 11:54       ` Eli Zaretskii
2023-09-20 12:50         ` Ihor Radchenko
2023-09-21 11:07           ` Eli Zaretskii
2023-09-22 10:12             ` Ihor Radchenko
2023-09-22 11:56               ` Eli Zaretskii
2023-09-22 12:00                 ` Ihor Radchenko
2023-09-22 12:48                   ` Eli Zaretskii
2023-09-23 10:51                     ` Ihor Radchenko
2023-09-23 11:11                       ` Eli Zaretskii
     [not found]                         ` <871qep2l2z.fsf@localhost>
2023-09-23 12:38                           ` Eli Zaretskii
2023-09-23 12:59                             ` Ihor Radchenko
2023-09-23 13:10                               ` Eli Zaretskii
2023-09-23 14:06                                 ` Ihor Radchenko
2023-09-23 18:33                                   ` StrawberryTea
2023-09-23 19:05                                     ` Eli Zaretskii
2023-09-23 19:05                                       ` StrawberryTea
2023-09-24  5:00                                         ` Eli Zaretskii
2023-09-24  7:53                                           ` StrawberryTea [this message]
2023-09-24 10:19                                             ` Ihor Radchenko
2023-09-24 11:59                                               ` Eli Zaretskii
2023-09-24 18:30                                                 ` StrawberryTea
2023-09-25  4:38                                                   ` Eli Zaretskii
2023-09-26  8:18                                                 ` Ihor Radchenko
2023-09-29  5:47                                                   ` Eli Zaretskii
2024-01-22 14:45                                                   ` Ihor Radchenko
2024-01-23 19:14                                                     ` Kévin Le Gouguec
2024-01-24 16:42                                                       ` Ihor Radchenko
2024-01-25  7:46                                                         ` Kévin Le Gouguec
2024-01-25 13:47                                                           ` Ihor Radchenko
2023-09-21 12:54           ` Eli Zaretskii
2023-09-21 21:07             ` Kévin Le Gouguec
2023-09-22  6:40               ` Juri Linkov
2023-09-22  7:20                 ` Eli Zaretskii
2023-09-29  7:12                 ` Kévin Le Gouguec
2023-09-29 15:41                   ` Juri Linkov
2023-09-29 19:07                     ` StrawberryTea
2023-09-30 13:49                       ` Eli Zaretskii
2023-09-30 22:55                         ` StrawberryTea
2023-10-01  8:42                           ` Eli Zaretskii
2023-10-02  4:28                             ` StrawberryTea
2023-10-02  6:05                               ` Eli Zaretskii
2023-10-05 20:59                                 ` StrawberryTea
2023-09-13 11:48     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877cog80hc.fsf@strawberrytea.xyz \
    --to=look@strawberrytea.xyz \
    --cc=65896@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=kevin.legouguec@gmail.com \
    --cc=yantar92@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.