I've been writing my own custom org-agenda views lately, and I've had good luck playing around with org-agenda-prefix-format
for customizing the format for my different tasks. I occasionally would like to include extra information, typically via my own added property tags. However, while I've been adding this extra information /before/ the task of interest, I'd prefer to include it /after/ the task.
For example, I currently display calendar events as:
Serenity: 18:00-19:00
Location: Jaynestown
Scheduled: TODO Help the Mudders
However, I'd like for this information to appear in the following order:
Serenity: 18:00-19:00
Scheduled: TODO Help the Mudders
Location: Jaynestown
Notice that this cannot be done with org-agenda-prefix-format
since some of the added text occurs after TODO Help the Mudders
.
===
Edit: Here's the code I used to generate the above:
(defun gs/org-agenda-add-location-string ()
"Gets the value of the LOCATION property"
(let ((loc (org-entry-get (point) "LOCATION")))
(if (> (length loc) 0)
(concat "\n" (make-string 15 ?\s) "Location: " loc
"\n" (make-string 15 ?\s))
"")))
And then use this custom function as follows (within org-agenda-custom-commands
):
(org-agenda-prefix-format '((agenda . " %-12:c%?-12t %(gs/org-agenda-add-location-string)% s") ...
org-agenda-format-item
? By tweakingorg-agenda-format-item
, you can change any entry that is gathered prior to the creation of the org-agenda buffer.org-agenda-format-item
if possible, but if no built-in solution exists, I'm willing to give it a try.org-agenda-finalize-hook
to comb the buffer and modify text after it has already been inserted, but that is not as ideal as modifying the text before it gets inserted. Here is a link to an example of gathering the raw data in the event you want to go crazy and create your own custom org-agenda view: emacs.stackexchange.com/a/12563/2287