From mboxrd@z Thu Jan 1 00:00:00 1970 From: Manish Subject: Re: [misc-new-features 1/5] Add two new special properties, SINCE and SINCE_IA. Date: Thu, 27 Aug 2009 21:20:53 +0530 Message-ID: References: <1247473682-23338-1-git-send-email-ahktenzero@mohorovi.cc> <1247473682-23338-2-git-send-email-ahktenzero@mohorovi.cc> <87zlb344so.fsf@bzg.ath.cx> <20090717182243.GB15275@yog-sothoth.mohorovi.cc> <87ws66jpu3.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MghFr-0003ct-SS for emacs-orgmode@gnu.org; Thu, 27 Aug 2009 11:51:15 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MghFr-0003cg-Fx for emacs-orgmode@gnu.org; Thu, 27 Aug 2009 11:51:15 -0400 Received: from [199.232.76.173] (port=39634 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MghFr-0003cd-7l for emacs-orgmode@gnu.org; Thu, 27 Aug 2009 11:51:15 -0400 Received: from ey-out-1920.google.com ([74.125.78.149]:30356) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MghFq-0003Sf-AS for emacs-orgmode@gnu.org; Thu, 27 Aug 2009 11:51:14 -0400 Received: by ey-out-1920.google.com with SMTP id 3so281467eyh.34 for ; Thu, 27 Aug 2009 08:51:13 -0700 (PDT) In-Reply-To: <87ws66jpu3.fsf@bzg.ath.cx> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien Cc: emacs-orgmode@gnu.org On Sat, Jul 18, 2009 at 3:05 PM, Bastien wrote: > Hi James, > > this small patch against current org-colview.el lets you have a custom > function for computing a "summary" of a property and displaying it in > the column. > > To compute the time since the timestamp, you can use this patch and some > of your code like this: > > --8<---------------cut here---------------start------------->8--- > (setq org-columns-custom-summary-function > =A0 =A0 =A0'my-org-compute-since) > > (defun org-time-since (time) > =A0"Get the number of days since `time'" > =A0(time-to-number-of-days > =A0(time-since (apply 'encode-time > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (org-parse-time-string time))))) > > (defun my-org-compute-since (&rest values) > =A0"Eval elapsted days since the entry's timestamp." > =A0(let* ((ts (org-entry-get (point) "TIMESTAMP"))) > =A0 =A0(when ts (org-time-since ts)))) > --8<---------------cut here---------------end--------------->8--- > > This patch is just a workaround, though. =A0I think we should have a way > of adding more than one custom function, as Mikael Fornius suggested > when sending his first patch. > > Let's see what's Carsten take on this. > This is/was a very interesting idea. Any thoughts if this would go in? Or did it already go in and I missed it? --=20 Manish