Thanks Sacha, that's great!


On 18 April 2014 02:09, Sacha Chua <sacha@sachachua.com> wrote:
Noah Slater <nslater@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, it seems to work =) ):

(defun sacha/org-sort-recursively (type)
        (org-map-entries
         (lambda ()
                 (condition-case nil
                                 (org-sort-entries nil type)
                         (error nil)))))

Call with M-: (sacha/org-sort-recursively ?K) or merge the code into
your own.

Sacha