emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Displaying deadline datestamp in todo agenda list?


From: Karl Fogel
Subject: Re: [O] Displaying deadline datestamp in todo agenda list?
Date: Wed, 25 May 2016 18:23:00 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Matt Lundin <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]