Subject: Re: bug#42209: 12.2.4; Text propogated wrong in TeX-fold-mode

From: Ikumi Keita <[email-masked]>
Date: Fri, 14 Feb 2025 23:17:09 +0900

Hi Arash, thanks for taking care of old bugs.

>>>>> Arash Esbati <[email-masked]> writes:
>> I at last succeeded to reproduce this issue. It turned out that C-c C-o
>> C-b doesn't reproduce it, but C-c C-o C-m on the \textit does. It seems
>> that it results from complex interactions within emacs display engine,
>> and not easy to fix. Maybe I look into this again some day.

> Do you think you will look at this issue again?  Do you still want to
> keep the report open or should we close it as 'wontfix'?

I'd like to close it as "wontfix". Sorry, Gennady.

Here is a summary of my study. The following code demonstrates what is
going on:
----------------------------------------------------------------------
(defface my-large '((t (:height 2.0))) "twice large")
(switch-to-buffer (generate-new-buffer "abc"))
(insert "ABCD XYZ
foo bar") ; for comparison
(put-text-property 1 9 'face 'my-large) ; enlarge 1st line
(setq my-str (buffer-substring 2 3)) ; "B" with `my-large' face
(setq my-ov (make-overlay 1 4)) ; covers "ABC"
(overlay-put my-ov 'display my-str) ; largeness applied twice.
----------------------------------------------------------------------
Apparently, `display' property string of overlay inherits the
"largeness" of the underlying texts, thus the largeness is applied twice
here.
I'm not sure whether this is an emacs bug or not, since it's certain
that there are situations where such behavior is useful. In addition,
even if it is actually a bug, it would be difficult for emacs developer
to "fix" it because I suppose there are already elisp codes which depend
on that behavior.

Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopMassiveKilling #CeasefireNOW