bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#48740: 28.0.50; Composition text property is not always honoured


From: Ihor Radchenko
Subject: bug#48740: 28.0.50; Composition text property is not always honoured
Date: Sun, 20 Jun 2021 19:24:55 +0800

Eli Zaretskii <eliz@gnu.org> writes:

>> Composition works fine here despite spanning over multiple intervals.
>> Again, I feel that I miss something in your explanation.
>
> We are mis-communicating.  You already stated correctly the reason for
> the problem:

Thanks for the clarification.

> I don't know why the values of the 'composition' property become not
> 'eq'; perhaps some code does a copy-sequence or something?  Presumably
> if you take a good look at what happens in org-agenda-redo-all and its
> subroutines, you will find that code.  In general, when you are
> dealing with static compositions, I'd suggest not to break the
> composed region into several separate intervals with different
> property lists: it's dangerous, as you see.

I debugged the agenda code and found the place where the breakage
happened:

(concat
                   (substring x 0 (match-end 1))
                   (unless (string-empty-p org-agenda-todo-keyword-format)
                     (format org-agenda-todo-keyword-format
                             (match-string 2 x)))
                   ;; Remove `display' property as the icon could leak
                   ;; on the white space.
                   (org-add-props " " (org-plist-delete (text-properties-at 0 x)
                                                        'display))
                   (substring x (match-end 3)))

Magically, replacing concat with format appears to fix the issue.

However, I still have no clue what is going on there. I tried to
investigate further and examined the text properties of the composed
ONGOING keyword in inbox.org buffer. It turned out that the composition
is broken in the inbox.org itself:

#("* ONGOING" 0 1 (...) 2 5 (... composition (0 7 [128119]) 
prettify-symbols-start 3 prettify-symbols-end 10 face org-todo) 5 9 (... 
composition (0 7 [128119]) prettify-symbols-start 3 prettify-symbols-end 10 
face org-todo))

Yet, the ONGOING string is correctly replaced by 👷 symbol in inbox.org.
The replacement does not work only in agenda, *and only when concat is
used to construct the keyword*. I am completely confused about what is
going on.

Do you have any ideas about this?

Best,
Ihor







reply via email to

[Prev in Thread] Current Thread [Next in Thread]