I'm trying to show certain icons to the left of TODO items in the agenda based on the presence of a property.
For example, if TODO item A has the "important" property, show an exclamation mark:
! TODO A TODO B
It looks like this can be customized with
org-agenda-prefix-format using the
%(expression) syntax, but I encounter bizarre issues when using the following syntax:
(defun show-exclamation-if-important() (save-window-excursion (org-agenda-goto) (if (org-entry-properties (point) "important") "!" " ")))
This combined with using
user-error: Command not allowed in this line. It seems to be an issue with the excursion of some sorts?
Simply put, how can I get a return value of the properties of a TODO item while on the corresponding agenda entry?