Mark Barton <mbarto...@gmail.com> writes: > I had tried modifying Org agenda to display the repeater in tasks as Wai > Hon's Blog documented a few weeks ago: > https://whhone.com/posts/org-agenda-repeated-tasks/ > > Below is the code that causes the org-element warning: > > (defun my/org-agenda-repeater () > "The repeater shown in org-agenda-prefix for agenda." > (if (org-before-first-heading-p) > "-------" ; fill the time grid > (format "%5s: " (or (org-get-repeat) "")))) > > ;; Add `my/org-agenda-repeater' to the agenda prefix. > (setcdr (assoc 'agenda org-agenda-prefix-format) > " %i %-12:c%?-12t%s%(my/org-agenda-repeater)")
This code looks all right - org-agenda-prefix-format placeholders are evaluated with current buffer being Org buffer (normally). May you try to run M-x debug-on-entry RET display-warning RET and try triggering the warning? Then, you will see a backtrace with the full information about where the warning is triggered. (you can later disable the debugger via M-x cancel-debug-on-entry RET RET) -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>