emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Christian Wittern <cwittern@gmail.com>
To: Org Mode Mailing List <emacs-orgmode@gnu.org>
Subject: convenience sort function
Date: Mon, 23 Sep 2013 18:48:56 +0900	[thread overview]
Message-ID: <52400E88.1050609@gmail.com> (raw)

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	other threads:[~2013-09-23  9:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=52400E88.1050609@gmail.com \
    --to=cwittern@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).