From mboxrd@z Thu Jan 1 00:00:00 1970 From: Noah Slater Subject: Re: How can you sort an Org clock table? Date: Sun, 20 Apr 2014 11:41:38 +0200 Message-ID: References: <87bnwnl6qs.fsf@gmail.com> <877g7bkwhk.fsf@gmail.com> <87wqepw76r.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=20cf301b5fe7801b4b04f77630cf Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54481) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WboFt-0004cZ-ID for emacs-orgmode@gnu.org; Sun, 20 Apr 2014 05:41:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WboFn-0006h0-Cc for emacs-orgmode@gnu.org; Sun, 20 Apr 2014 05:41:45 -0400 Received: from mail-yk0-x22e.google.com ([2607:f8b0:4002:c07::22e]:46714) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WboFn-0006gn-7d for emacs-orgmode@gnu.org; Sun, 20 Apr 2014 05:41:39 -0400 Received: by mail-yk0-f174.google.com with SMTP id 20so2617687yks.33 for ; Sun, 20 Apr 2014 02:41:38 -0700 (PDT) In-Reply-To: <87wqepw76r.fsf@bzg.ath.cx> 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: Bastien Cc: Nick Dokos , emacs-orgmode@gnu.org --20cf301b5fe7801b4b04f77630cf Content-Type: text/plain; charset=ISO-8859-1 Hmm. I'm not sure this is working. If you add ":link" to the BEGIN blog, the sorting doesn't appear to kick in. Bug, I expect. If I remove ":link" I can see that some sorting is taking place. But it's not what I expect. With "?t" I am getting this sort order: - (empty cell) - "4:02" - "1d 5:15" - "1d 9:08" - "14:19" With "?T" I am getting this sort order: - "14:19" - "1d 9:08" - "1d 5:15" - (empty cell) Note that this isn't the reverse order. On 16 April 2014 18:26, Bastien wrote: > Hi Noah, > > from master, you can now use a :sort parameter in clocktable > to sort a column. For example: > > #+BEGIN: clocktable :maxlevel 2 :scope file :sort (2 . ?t) > #+CAPTION: Clock summary at [2014-04-16 mer. 18:12] > | Headline | Time | > |--------------+--------| > | *Total time* | *0:34* | > |--------------+--------| > | STRT abc | 0:15 | > | STRT def | 0:19 | > #+END: > > The (2 . ?t) means: "sort the second column by time." > > Let me know if it works for you, > > -- > Bastien > --20cf301b5fe7801b4b04f77630cf Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hmm. I'm not sure this is working.

= If you add ":link" to the BEGIN blog, the sorting doesn't app= ear to kick in. Bug, I expect.

If I remove ":= link" I can see that some sorting is taking place. But it's not wh= at I expect.

With "?t" I am getting this sort order:
=

- (empty cell)
- "4:02"
-= "1d 5:15"
- "1d 9:08"
- "14:1= 9"

With "?T" I am getting this sort order:
=

- "14:19"
- "1d 9:08"
- "1d 5:15"
- (empty cell)

Note that this isn't the reverse order.

=


On 16 April 2= 014 18:26, Bastien <bzg@gnu.org> wrote:
Hi Noah,

from master, you can now use a :sort parameter in clocktable
to sort a column. =A0For example:

#+BEGIN: clocktable :maxlevel 2 :scope file :sort (2 . ?t)
#+CAPTION: Clock summary at [2014-04-16 mer. 18:12]
| Headline =A0 =A0 | =A0 Time |
|--------------+--------|
| *Total time* | *0:34* |
|--------------+--------|
| STRT abc =A0 =A0 | =A0 0:15 |
| STRT def =A0 =A0 | =A0 0:19 |
#+END:

The (2 . ?t) means: "sort the second column by time."

Let me know if it works for you,

--
=A0Bastien

--20cf301b5fe7801b4b04f77630cf--