Excerpt from describe-variable org-agenda-prefix-format: If the first character after `%' is a question mark, the entire field will only be included if the corresponding value applies to the current entry. This is useful for fields which should have fixed width when present, but zero width when absent. For example, "%?-12t" will result in a 12 character time field if a time of the day is specified, but will completely disappear in entries which do not contain a time.
This does not work for me (emacs 24.3, Org-mode version 8.2.10 (8.2.10- 41-g42228a-elpa)). Excerpt from agenda view: <excerpt agenda view> Project Subtasks INFRA nil : TODO Purchase Fragment Library </excerpt agenda view> Excerpt from org file (Not that the task in question has no Property drawer at all): <excerpt org file> * Other Infrastructure Development :PROPERTIES: :CATEGORY: INFRA :END: ** TODO NMR-based Fragment Screen *** TODO Purchase Fragment Library </excerpt org file> Here's the definition of org-agenda-prefix-format from my .emacs: <excerpt from .emacs> ((org-agenda-prefix-format " %-5c %?-4(setq type (org-entry-get (point) \"Type\")): ") </excerpt from .emacs> There is a similar thread on stackexchange from March 10 on this (http://stackoverflow.com/questions/35910204/org-agenda-prefix-format- does-not-work). Is this a bug? Thanks Markus