Matt Lundin <m...@imapmail.org> writes: >Here's a working implementation, using org-agenda-add-custom-command and >the built-in mechanism for skipping non-deadline entries (you can get >rid of ots-org-entry-skip-non-deadline). I also added some justification >(the -22) to accommodate my rather long timestamp strings. Adjust as >needed: > >(org-add-agenda-custom-command > '("d" "Deadlines and scheduled work" alltodo "" > ((org-agenda-skip-function '(org-agenda-skip-entry-if 'notdeadline)) > (org-agenda-prefix-format '((todo . " %i %-22(org-entry-get nil > \"DEADLINE\") %-12:c %s"))) > (org-agenda-sorting-strategy '(deadline-up))))) > >Matt
Matt, I can't thank you enough -- this is great. (Our company runs on Org Mode, so this will help more free software hackers than just me :-) .) The core trick is obviously "(org-entry-get nil \"DEADLINE\")". I knew about embedding a Lisp expression into the format string, but didn't know about that particular function -- now that I know it exists, I suspect we'll be using it a lot. And the "(org-agenda-skip-entry-if 'notdeadline)" part saves us a bunch of custom code too. This is the best kind of solution: it solved the immediate problem and gives us infrastructure for solving future problems as well. Thanks! -Karl