emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] convenience sort function


From: Christian Wittern
Subject: [O] convenience sort function
Date: Mon, 23 Sep 2013 18:48:56 +0900
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130801 Thunderbird/17.0.8

Dear org users,

I would like to define a convenience sort function to sort on a certain property (e.g PRE), which I can assign to a key, so that I can avoid having to type

C-^ r PRE <RET>

It seems that I want to call org-sort-entries, which has the following signature:

(defun org-sort-entries
  (&optional with-case sorting-type getkey-func compare-func property)

From the docstring, I learn that I have to use ?r to sort on properties and the last parameter is the property to sort on, "PRE" in this case. However, what I do not understand is what I should give for getkey-func and compare-func.
Something like this
(org-sort-entries t ?r t t "PRE")
or this
(org-sort-entries t ?r nil nil "PRE")
does not work, and reading the source does not give me any clues (probably because I do not understand what is going on....)

Any help would be apprectiated,

Christian


--
Christian Wittern, Kyoto




reply via email to

[Prev in Thread] Current Thread [Next in Thread]