emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Noah Slater <nslater@tumbolia.org>
To: Nick Dokos <ndokos@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: How can you sort an Org clock table?
Date: Mon, 31 Mar 2014 12:18:37 +0200	[thread overview]
Message-ID: <CA+Y+4467vf+6s7n1y6-K9eWjbF_E23Bmo0Wi+EasiPhqVZ48cw@mail.gmail.com> (raw)
In-Reply-To: <877g7bkwhk.fsf@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2202 bytes --]

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.


On 31 March 2014 03:06, Nick Dokos <ndokos@gmail.com> wrote:

> Noah Slater <nslater@tumbolia.org> 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 <ndokos@gmail.com> wrote:
> >
> >     Noah Slater <nslater@tumbolia.org> 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
>
>
>

[-- Attachment #2: Type: text/html, Size: 3195 bytes --]

  reply	other threads:[~2014-03-31 10:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-30 21:00 How can you sort an Org clock table? Noah Slater
2014-03-30 21:24 ` Nick Dokos
2014-03-30 22:25   ` Noah Slater
2014-03-31  1:06     ` Nick Dokos
2014-03-31 10:18       ` Noah Slater [this message]
2014-03-31 12:45         ` Nick Dokos
2014-03-31 13:23           ` Noah Slater
2014-04-16 16:26         ` Bastien
2014-04-16 17:01           ` Noah Slater
2014-04-20  9:41           ` Noah Slater
2014-04-20 10:22             ` Bastien
2014-05-24 18:33               ` Noah Slater
2014-05-24 22:39                 ` Bastien

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=CA+Y+4467vf+6s7n1y6-K9eWjbF_E23Bmo0Wi+EasiPhqVZ48cw@mail.gmail.com \
    --to=nslater@tumbolia.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=ndokos@gmail.com \
    /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).