From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: How can I calculate the "age" of a headline? Date: Tue, 19 Aug 2014 11:41:19 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43320) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XJlXO-00066j-6R for emacs-orgmode@gnu.org; Tue, 19 Aug 2014 11:41:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XJlXI-0004eW-GU for emacs-orgmode@gnu.org; Tue, 19 Aug 2014 11:41:30 -0400 Received: from mail-qc0-x22f.google.com ([2607:f8b0:400d:c01::22f]:59562) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XJlXI-0004eI-BV for emacs-orgmode@gnu.org; Tue, 19 Aug 2014 11:41:24 -0400 Received: by mail-qc0-f175.google.com with SMTP id w7so6392575qcr.6 for ; Tue, 19 Aug 2014 08:41:23 -0700 (PDT) In-Reply-To: (M.'s message of "Tue, 19 Aug 2014 17:26:55 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: M Cc: emacs orgmode-mailinglist 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 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