From mboxrd@z Thu Jan 1 00:00:00 1970 From: James TD Smith Subject: Re: [PATCH] Add min/max/mean age operators to column view. Date: Thu, 29 Oct 2009 21:15:43 +0000 Message-ID: <20091029211543.GZ72276@yog-sothoth.mohorovi.cc> References: <1256515485-28476-1-git-send-email-ahktenzero@mohorovi.cc> <4AD87891-4DD3-4B80-9FD3-2B6B65653E5B@gmail.com> <20091028193607.GY72276@yog-sothoth.mohorovi.cc> <87pr865u9b.fsf@eee.in> <87d4465oh4.fsf@eee.in> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N3cMD-0000vO-Uf for emacs-orgmode@gnu.org; Thu, 29 Oct 2009 17:16:33 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N3cM9-0000rv-S5 for emacs-orgmode@gnu.org; Thu, 29 Oct 2009 17:16:33 -0400 Received: from [199.232.76.173] (port=52751 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N3cM9-0000rg-3Y for emacs-orgmode@gnu.org; Thu, 29 Oct 2009 17:16:29 -0400 Received: from 81-86-40-42.dsl.pipex.com ([81.86.40.42]:50616 helo=yog-sothoth.mohorovi.cc) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N3cM8-0006Gm-Du for emacs-orgmode@gnu.org; Thu, 29 Oct 2009 17:16:28 -0400 Content-Disposition: inline In-Reply-To: <87d4465oh4.fsf@eee.in> 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: Mikael Fornius Cc: emacs-orgmode@gnu.org, Carsten Dominik Hi Mikael, On 2009-10-29 14:17:11(+0100), Mikael Fornius wrote: > Maybe someone other than me should test this because I am not sure if I > understand it correctly? > > The only reference to "age" or "creation time" I can find is in the > documentation string of org-sort-entries-or-items. > > "... creation time, which is assumed to be the first inactive time stamp > at the beginning of a line." Sorry, I could have been more specific in my description of what the patch does. What it does is add three operators which can be applied to properties containing timestamps, which show the length of time between the timestamp and the current time for leaf entries, and either the minimum, maximum or average elapsed time for entries with children. The age/creation time thing is just a suggested usage. All my remember templates add a CREATED property containing a timestamp, so by adding %CREATED{@min} to the columns for a tree I can get a display of the time which has elapsed since that item was added. > I pulled from your git://yog-sothoth.mohorovi.cc/org-mode.git > misc-new-features branch and have tried a basic setup with timestamps as > described with no success. I must have missed something. > > When I use org-columns-new (M-S-right/left) to add a column there is no > choice named age or creation time, should I use TIMESTAMP_IA? > > When I do I have three (new?) options "age, age, age" as summary options > and I think it should be "min_age, mean_age, max_age" instead? I didn't test org-columns-new much; I tend to set up columns manually using the COLUMNS property. I'll have to take a look at that. > When I manually tried to summarize a %TIMESTAMP_IA{@mean} I got just > numbers when I expected a date. You shouldn't see a date. You should see something like '22d 3h 4m 11s' giving the time since the first inactive timestamp in each item, and if an item has children the average of the values from the childen. If you have a file like: --8<---------------cut here---------------start------------->8--- #+COLUMNS: %20ITEM %16TIMESTAMP_IA{@min} * Test 1 [2008-10-29 Thu 21:05] * Test 2 [2009-10-29 Thu 21:05] * Test 3 ** Test 4 [2009-10-29 Thu 20:05] ** Test 5 [2009-11-29 Thu 21:05] --8<---------------cut here---------------end--------------->8--- You should see something like this (from the column view dblock): --8<---------------cut here---------------start------------->8--- | ITEM | TIMESTAMP_IA | |-----------+------------------| | * Test 1 | 365d 00h 04m 01s | |-----------+------------------| | * Test 2 | 0d 00h 04m 01s | |-----------+------------------| | * Test 3 | -31d 00h 04m 01s | | ** Test 4 | 0d 01h 04m 01s | | ** Test 5 | -31d 00h 04m 01s | --8<---------------cut here---------------end--------------->8--- > I also have another problem with org-columns-new that when selecting a > summary type the #+COLUMNS row is not updated, format specification > works. I do not know if this is introduced by this patch or some other > but it used to work... It's probably the patch. Thanks for testing this, and also for the improvements you made to column view which made this possible. James -- |---|