Re: [O] Sorting nodes by clocked time

2014-04-20 Thread Noah Slater
Thanks Sacha, that's great! On 18 April 2014 02:09, Sacha Chua sa...@sachachua.com wrote: Noah Slater nsla...@tumbolia.org writes: Hello, Noah, all! Using this a bit, it doesn't quite do what I want it to do. Is there any way to sort recursively? At the moment, calling

Re: [O] Sorting nodes by clocked time

2014-04-17 Thread Bastien
Hi Noah, Noah Slater nsla...@tumbolia.org writes: Is there any way to sort a collection of siblings by the total clocked time? Now there is in master: C-c ^ k on a headline. Thanks for this idea, -- Bastien

Re: [O] Sorting nodes by clocked time

2014-04-17 Thread Noah Slater
I guess not. How does one do that? On 17 April 2014 12:55, Bastien b...@gnu.org wrote: Noah Slater nsla...@tumbolia.org writes: Oh, funny. I had already patched this locally. I picked e for tim [e]. Using your version, I get an error: sort: Wrong type argument: number-or-marker-p,

Re: [O] Sorting nodes by clocked time

2014-04-17 Thread Noah Slater
Also, something I was hoping to look at was that when I sort, it expand all the nodes, including all of the :LOGBOOK: draws. I find this very inconvenient, and probably will not use this feature unless I can get it sorted. It appears that the code is expanding the nodes and the draws to read the

Re: [O] Sorting nodes by clocked time

2014-04-17 Thread Bastien
Noah Slater nsla...@tumbolia.org writes: Oh, funny. I had already patched this locally. I picked e for tim [e]. Using your version, I get an error: sort: Wrong type argument: number-or-marker-p, (10426 . 10437) I don't have this error. Did you reload Org correctly? -- Bastien

Re: [O] Sorting nodes by clocked time

2014-04-17 Thread Bastien
Noah Slater nsla...@tumbolia.org writes: I guess not. How does one do that? M-x org-reload RET -- Bastien

Re: [O] Sorting nodes by clocked time

2014-04-17 Thread Bastien
Noah Slater nsla...@tumbolia.org writes: Also, something I was hoping to look at was that when I sort, it expand all the nodes, including all of the :LOGBOOK: draws. (add-hook 'org-after-sorting-entries-or-items-hook (lambda() (org-cycle-hide-drawers 'children))) should od. --

Re: [O] Sorting nodes by clocked time

2014-04-17 Thread Noah Slater
I'm still getting this error! :/ Happy to provide any sort of debug/version/setup info you need. I'm on IRC as nslater in #org-mode, if that is more convenient for you. Thank you so much for the help! On 17 April 2014 13:00, Bastien b...@gnu.org wrote: Noah Slater nsla...@tumbolia.org

Re: [O] Sorting nodes by clocked time

2014-04-17 Thread Bastien
Noah Slater nsla...@tumbolia.org writes: I'm still getting this error! :/ Should be fixed in master. Otherwise use (setq debug-on-error t) and send the backtrace. Better to debug from an uncompiled version if that's possible. Happy to provide any sort of debug/version/setup info you need.

Re: [O] Sorting nodes by clocked time

2014-04-17 Thread Noah Slater
Okay, that seem to work. But I'm not able to get this work: (add-hook 'org-after-sorting-entries-or-items-hook (lambda() (org-cycle-hide-drawers 'children))) After running the sort, all the LOGBOOK draws are still open. I'm also thinking: even if this closes the logbook draws, all

Re: [O] Sorting nodes by clocked time

2014-04-17 Thread Bastien
Noah Slater nsla...@tumbolia.org writes: Okay, that seem to work. But I'm not able to get this work: (add-hook 'org-after-sorting-entries-or-items-hook (lambda() (org-cycle-hide-drawers 'children))) After running the sort, all the LOGBOOK draws are still open. Try this: (defun

Re: [O] Sorting nodes by clocked time

2014-04-17 Thread Noah Slater
Okay, wow. Thanks for writing that. Do you have a Gittip or something? I would love to support your OSS work in some way or otherwise show my gratitude beyond words in an email! Anyway. I tried your function and it works. But afterwards, the node is completely folded. So I added (org-cycle) to

Re: [O] Sorting nodes by clocked time

2014-04-17 Thread Noah Slater
Oh, funny. I had already patched this locally. I picked e for tim[e]. Using your version, I get an error: sort: Wrong type argument: number-or-marker-p, (10426 . 10437) Any clue? I tried to recompile everything under my .emacs.d (including org-mode), but I still get the error. On 17 April

Re: [O] Sorting nodes by clocked time

2014-04-17 Thread Noah Slater
Actually. What I want, I think, is a function that sorts the whole buffer and then collapses all nodes. I think your my-hide-all-drawers-in-current-subtree thing will take care of collapsing all nodes. But I'm now on StackOverflow trying to work out how to sort the whole buffer. On 17 April

Re: [O] Sorting nodes by clocked time

2014-04-17 Thread Bastien
Noah Slater nsla...@tumbolia.org writes: I think your my-hide-all-drawers-in-current-subtree thing will take care of collapsing all nodes. But I'm now on StackOverflow trying to work out how to sort the whole buffer. C-x h C-c ^ should do. -- Bastien

Re: [O] Sorting nodes by clocked time

2014-04-17 Thread Bastien
Noah Slater nsla...@tumbolia.org writes: Okay, wow. Thanks for writing that. Do you have a Gittip or something? I would love to support your OSS work in some way or otherwise show my gratitude beyond words in an email! You can use my paypal account: bastien.gue...@free.fr Thanks! Anyway. I

Re: [O] Sorting nodes by clocked time

2014-04-17 Thread Noah Slater
I came up with this: (defun my-sort-buffer () (interactive) (mark-whole-buffer) (org-sort-entries t ?K) (org-overview)) Seems to do what I want. This is most excellent. Making some great progress here. Thanks. And I will send you a token of my gratitude at the end of the month, when I

Re: [O] Sorting nodes by clocked time

2014-04-17 Thread Noah Slater
Actually, I renamed this my-overview, added (org-clock-display), and bound it to C-c o. Very swish. On 17 April 2014 14:34, Noah Slater nsla...@tumbolia.org wrote: I came up with this: (defun my-sort-buffer () (interactive) (mark-whole-buffer) (org-sort-entries t ?K)

Re: [O] Sorting nodes by clocked time

2014-04-17 Thread Noah Slater
Using this a bit, it doesn't quite do what I want it to do. Is there any way to sort recursively? At the moment, calling org-sort-entries on the whole buffer only sorts the top level nodes. On 17 April 2014 14:45, Noah Slater nsla...@tumbolia.org wrote: Actually, I renamed this my-overview,

Re: [O] Sorting nodes by clocked time

2014-04-17 Thread Bastien
Noah Slater nsla...@tumbolia.org writes: Seems to do what I want. This is most excellent. Making some great progress here. Thanks. And I will send you a token of my gratitude at the end of the month, when I have funds available. ... or wait a bit more and send your gratitude as patches! --

Re: [O] Sorting nodes by clocked time

2014-04-17 Thread Bastien
Noah Slater nsla...@tumbolia.org writes: Using this a bit, it doesn't quite do what I want it to do. Is there any way to sort recursively? Not implemented, but you can hack around. Anyway, sorting recursively sounds like a nice idea but you probably want to just run this once in a while, not

Re: [O] Sorting nodes by clocked time

2014-04-17 Thread Sacha Chua
Noah Slater nsla...@tumbolia.org writes: Hello, Noah, all! Using this a bit, it doesn't quite do what I want it to do. Is there any way to sort recursively? At the moment, calling org-sort-entries on the whole buffer only sorts the top level nodes. Here's a rather inefficient hack (but hey,