emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: James TD Smith <ahktenzero@mohorovi.cc>
To: Mikael Fornius <mfo@abc.se>
Cc: emacs-orgmode@gnu.org, Carsten Dominik <carsten.dominik@gmail.com>
Subject: Re: [PATCH] Add min/max/mean age operators to column view.
Date: Thu, 29 Oct 2009 21:15:43 +0000	[thread overview]
Message-ID: <20091029211543.GZ72276@yog-sothoth.mohorovi.cc> (raw)
In-Reply-To: <87d4465oh4.fsf@eee.in>

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

--
|-<James TD Smith>-<email/ahktenzero@mohorovi.cc>-|

  parent reply	other threads:[~2009-10-29 21:16 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-26  0:04 [PATCH] Add min/max/mean age operators to column view James TD Smith
2009-10-28 17:01 ` Carsten Dominik
2009-10-28 19:36   ` James TD Smith
2009-10-29 11:12     ` Mikael Fornius
2009-10-29 13:17       ` Mikael Fornius
2009-10-29 20:10         ` Mikael Fornius
2009-10-30  3:36           ` James TD Smith
2009-10-29 21:15         ` James TD Smith [this message]
2009-10-31 13:41           ` Mikael Fornius
2009-11-01 17:24             ` Carsten Dominik
2009-11-01 18:59               ` James TD Smith
2009-12-30 11:32                 ` Manish
2009-12-30 14:01                   ` James TD Smith

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091029211543.GZ72276@yog-sothoth.mohorovi.cc \
    --to=ahktenzero@mohorovi.cc \
    --cc=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mfo@abc.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).