Subject: bug#62847: 29.0.90; Propertized space in Org Agenda's mode-name

From: Gustavo Barros <[email-masked]>
Date: Sat, 15 Apr 2023 08:28:28 -0300

Hi Eli,

thanks for looking into this.

On Sat, 15 Apr 2023 at 07:55, Eli Zaretskii <[email-masked]> wrote:

> So this sounds like some weird heisenbug.

I'm not sure it helps much, but I do have a functioning workaround,
which doesn't do much but may offer some hint on the source of the
problem. It basically "replaces" the space with a space in `mode-name`
with an `:after` advice:

    (defun gb/org-agenda-set-mode-name-advice ()
      (let ((before (butlast mode-name
                             (length (member " " mode-name))))
            (after (cdr (member " " mode-name))))
        (when (= (length before) 2)
          (setq mode-name (append before (list " ") after))
          (force-mode-line-update))))
    (advice-add 'org-agenda-set-mode-name
                :after #'gb/org-agenda-set-mode-name-advice)

I don't know why the space set in my init file is different from the
one set in `org-agenda.el`. But Ihor's insight that the problem only
happens on an installed version suggests a compilation related issue,
as he says.

Best,
Gustavo.