From a8a95b6c2c038ff75d439fbb9f8beed50a55e01b Mon Sep 17 00:00:00 2001 From: Ihor Radchenko Date: Sun, 16 Apr 2023 13:18:42 +0200 Subject: [PATCH] * lisp/org-agenda.el: Do not modify string constant " " (org-agenda-highlight-todo): Use `propertize' that copies the argument string instead of `org-add-props'. Otherwise, if the compiler optimizes string constants into a single object, the properties may populate in unexpected places. Reported-by: Gustavo Barros Link: https://orgmode.org/list/CAM9ALR95F_ZHV2_WsqAz0-35-S2rwxbHqsA5VGftvq51Yz3ZAQ@mail.gmail.com --- lisp/org-agenda.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 2ec2f4c00..d3e616431 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -7724,8 +7724,7 @@ The optional argument TYPE tells the agenda type." (unless (string= org-agenda-todo-keyword-format "") ;; Remove `display' property as the icon could leak ;; on the white space. - (org-add-props " " (org-plist-delete (text-properties-at 0 x) - 'display))) + (apply #'propertize " " (org-plist-delete (text-properties-at 0 x) 'display))) (substring x (match-end 3))))))) x)))