From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: How can you sort an Org clock table? Date: Sun, 30 Mar 2014 21:06:15 -0400 Message-ID: <877g7bkwhk.fsf@gmail.com> References: <87bnwnl6qs.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45365) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WUQgM-00063m-Um for emacs-orgmode@gnu.org; Sun, 30 Mar 2014 21:06:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WUQgH-0005d7-JI for emacs-orgmode@gnu.org; Sun, 30 Mar 2014 21:06:34 -0400 Received: from plane.gmane.org ([80.91.229.3]:33843) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WUQgH-0005cv-Cz for emacs-orgmode@gnu.org; Sun, 30 Mar 2014 21:06:29 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WUQgG-0003Ur-4Q for emacs-orgmode@gnu.org; Mon, 31 Mar 2014 03:06:28 +0200 Received: from pool-98-110-160-12.bstnma.fios.verizon.net ([98.110.160.12]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 31 Mar 2014 03:06:28 +0200 Received: from ndokos by pool-98-110-160-12.bstnma.fios.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 31 Mar 2014 03:06:28 +0200 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: emacs-orgmode@gnu.org 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