From mboxrd@z Thu Jan 1 00:00:00 1970 From: Noah Slater Subject: Re: How can you sort an Org clock table? Date: Mon, 31 Mar 2014 15:23:08 +0200 Message-ID: References: <87bnwnl6qs.fsf@gmail.com> <877g7bkwhk.fsf@gmail.com> <8738hyleoa.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e0158c41ccef33704f5e6f342 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58725) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WUcBG-0001tO-8t for emacs-orgmode@gnu.org; Mon, 31 Mar 2014 09:23:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WUcBB-0008VA-9l for emacs-orgmode@gnu.org; Mon, 31 Mar 2014 09:23:14 -0400 Received: from mail-yk0-x22e.google.com ([2607:f8b0:4002:c07::22e]:59610) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WUcBB-0008V2-45 for emacs-orgmode@gnu.org; Mon, 31 Mar 2014 09:23:09 -0400 Received: by mail-yk0-f174.google.com with SMTP id 20so6070182yks.5 for ; Mon, 31 Mar 2014 06:23:08 -0700 (PDT) In-Reply-To: <8738hyleoa.fsf@gmail.com> 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: Nick Dokos Cc: emacs-orgmode@gnu.org --089e0158c41ccef33704f5e6f342 Content-Type: text/plain; charset=ISO-8859-1 Okay thanks. If anyone else does know, I'd really appreciate it. Thanks! :) On 31 March 2014 14:45, Nick Dokos wrote: > Noah Slater writes: > > > Ah yes, I see that I have to move the point into the table cell. I was > > trying with the table header. Slightly odd that. Means that it only > > works on tables that aggregate clock times across multiple files, > > where the times are put in the same cell. Can you replicate? If you do > > a clocktable with the scope set to that file, then there's no way to > > order the cells. > > > > How hard would it be to modify org-dblock-write do you think? In hours > > work for someone familiar with elisp, but not the org codebase. > > > > No idea - I have never used clocktables. > > > On 31 March 2014 03:06, Nick Dokos wrote: > > > > Noah Slater writes: > > > > > Yeah, tried that. Doesn't work! :( > > > > > > > AFAICT, it works fine on your first stackoverflow example. > > > > There is probably no hope of getting this method to work the way you > > want on your second example though: org-sort does not know anything > > about the substructure of the table. The only way I can think of is > to > > make the dynblock function that produces the table > > (org-dblock-write:clocktable) do the sorting. > > > > > On 30 March 2014 23:24, Nick Dokos wrote: > > > > > > Noah Slater writes: > > > > > > > I posted a question on StackOverflow: > > > > > > > > > http://stackoverflow.com/questions/22749704/how-can-you-sort-an-org-clock-table > > > > > > > > Summary is: how do I sort an clock table by the % column? > > > > > > > > Is there anything "out there" I can use to get this working? > If not, > > > > how complex a job would it be to write something that did > this? > > > > > > > > If you point me in the right direction, I'll see what I can > come up with. > > > > > > > > > > Never tried on a clock table, but the following works on a > generic > > > table, so I assume that it will work on a clock table too: put > point > > > in the column by which you want to sort the table (in the body > of the > > > table, not in the header) and say M-x org-sort RET n (I assume > you > > > want numeric sorting, but org-sort provides several kinds). > org-sort > > > is normally bound to C-c ^ too, so > > > > > > C-c ^ n > > > > > > should be all that's needed. > > > -- > > > Nick > > > > > > > -- > > Nick > > > > -- > Nick > > > --089e0158c41ccef33704f5e6f342 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Okay thanks. If anyone else does know, I'd really appr= eciate it. Thanks! :)


On 31 March 2014 14:45, Nick Dokos <ndokos@gmail.com><= /span> wrote:
Noah Slater <nslater@tumbolia.org> writes:

> Ah yes, I see that I have to move the point into the table cell. I was=
> trying with the table header. Slightly odd that. Means that it only > works on tables that aggregate clock times across multiple files,
> where the times are put in the same cell. Can you replicate? If you do=
> a clocktable with the scope set to that file, then there's no way = to
> order the cells.
>
> How hard would it be to modify org-dblock-write do you think? In hours=
> work for someone familiar with elisp, but not the org codebase.
>

No idea - I have never used clocktables.

> On 31 March 2014 03:06, Nick Dokos <ndokos@gmail.com> wrote:
>
> =A0 =A0 Noah Slater <nslate= r@tumbolia.org> writes:
>
> =A0 =A0 > Yeah, tried that. Doesn't work! :(
> =A0 =A0 >
>
> =A0 =A0 AFAICT, it works fine on your first stackoverflow example.
>
> =A0 =A0 There is probably no hope of getting this method to work the w= ay you
> =A0 =A0 want on your second example though: org-sort does not know any= thing
> =A0 =A0 about the substructure of the table. =A0The only way I can thi= nk of is to
> =A0 =A0 make the dynblock function that produces the table
> =A0 =A0 (org-dblock-write:clocktable) do the sorting.
>
> =A0 =A0 > On 30 March 2014 23:24, Nick Dokos <ndokos@gmail.com> wrote:
> =A0 =A0 >
> =A0 =A0 > =A0 =A0 Noah Slater <nslater@tumbolia.org> writes:
> =A0 =A0 >
> =A0 =A0 > =A0 =A0 > I posted a question on StackOverflow:
> =A0 =A0 > =A0 =A0 >
> =A0 =A0 > =A0 =A0 > http://st= ackoverflow.com/questions/22749704/how-can-you-sort-an-org-clock-table<= br> > =A0 =A0 > =A0 =A0 >
> =A0 =A0 > =A0 =A0 > Summary is: how do I sort an clock table by = the % column?
> =A0 =A0 > =A0 =A0 >
> =A0 =A0 > =A0 =A0 > Is there anything "out there" I ca= n use to get this working? If not,
> =A0 =A0 > =A0 =A0 > how complex a job would it be to write somet= hing that did this?
> =A0 =A0 > =A0 =A0 >
> =A0 =A0 > =A0 =A0 > If you point me in the right direction, I= 9;ll see what I can come up with.
> =A0 =A0 > =A0 =A0 >
> =A0 =A0 >
> =A0 =A0 > =A0 =A0 Never tried on a clock table, but the following w= orks on a generic
> =A0 =A0 > =A0 =A0 table, so I assume that it will work on a clock t= able too: put point
> =A0 =A0 > =A0 =A0 in the column by which you want to sort the table= (in the body of the
> =A0 =A0 > =A0 =A0 table, not in the header) and say M-x org-sort RE= T n (I assume you
> =A0 =A0 > =A0 =A0 want numeric sorting, but org-sort provides sever= al kinds). org-sort
> =A0 =A0 > =A0 =A0 is normally bound to C-c ^ too, so
> =A0 =A0 >
> =A0 =A0 > =A0 =A0 =A0 =A0 C-c ^ n
> =A0 =A0 >
> =A0 =A0 > =A0 =A0 should be all that's needed.
> =A0 =A0 > =A0 =A0 --
> =A0 =A0 > =A0 =A0 Nick
> =A0 =A0 >
>
> =A0 =A0 --
> =A0 =A0 Nick
>

--
Nick



--089e0158c41ccef33704f5e6f342--