[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] How can I calculate the "age" of a headline?
From: |
John Kitchin |
Subject: |
Re: [O] How can I calculate the "age" of a headline? |
Date: |
Tue, 19 Aug 2014 11:41:19 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (darwin) |
I think this does what you want. I do not know if it would be easy to
get in a tabular agenda view though.
* Calculate age of this headline
#+BEGIN_SRC emacs-lisp
(org-narrow-to-subtree)
(org-time-stamp-to-now
(car
(cl-sort (org-element-map (org-element-parse-buffer) 'headline
(lambda (headline)
(org-element-property
:raw-value
(org-element-property :deadline headline))))
'org-time<)))
#+END_SRC
#+RESULTS:
: -14
** task 1
DEADLINE: <2014-08-12 Tue>
** task 2
DEADLINE: <2014-08-05 Tue>
M <address@hidden> writes:
> In my task lists, I'm working with scheduled and deadline dates.
> However, it would also often be very interesting, how "old" a task is, how
> long it is lurking around on my lists..
>
> Therefore it would be interesting to find the oldest timestamp below this
> heading and calculate the difference in days to today.
>
> Is that possible with org-mode already?
> Could I display this information in a tabular agenda view in a column?
>
> Kind regards
>
> Martin
>
>
>
>
--
-----------------------------------
John Kitchin
Professor
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu