From: James TD Smith <ahktenzero@usa.net>
From: James TD Smith <ahktenzero@usa.net>
To: emacs-orgmode@gnu.org
Subject: [PATCH 4/5] Add a new sort option, which sorts items by todo keyword
Date: Sun, 16 Mar 2008 16:30:15 +0000 [thread overview]
Message-ID: <20080316162955.23004.35017.stgit@nyarlathotep.internal> (raw)
In-Reply-To: <20080316162417.23004.16993.stgit@nyarlathotep.internal>
This is a somewhat simple implementation which just uses the position of the
keyword in org-todo-keywords-1, so if you have multiple sequences containing the
same todo keyword you may not get the ordering you expect.
---
org.el | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/org.el b/org.el
index dee8471..d67024f 100644
--- a/org.el
+++ b/org.el
@@ -982,7 +982,6 @@ table, obtained by prompting the user."
:group 'org-table-settings
:type 'string)
-
(defcustom org-table-number-regexp
"^\\([<>]?[-+^.0-9]*[0-9][-+^.0-9eEdDx()%:]*\\|\\(0[xX]\\)[0-9a-fA-F]+\\|nan\\)$"
"Regular expression for recognizing numbers in table columns.
@@ -6993,7 +6992,7 @@ WITH-CASE, the sorting considers case as well."
(message
(if plain-list-p
"Sort %s: [a]lpha [n]umeric [t]ime [f]unc A/N/T/F means reversed:"
- "Sort %s: [a]lpha [n]umeric [t]ime [p]riority p[r]operty [f]unc A/N/T/P/F means reversed:")
+ "Sort %s: [a]lpha [n]umeric [t]ime [p]riority p[r]operty [f]unc keyword [o]rder A/N/T/P/F/O means reversed:")
what)
(setq sorting-type (read-char-exclusive))
@@ -7084,6 +7083,10 @@ WITH-CASE, the sorting considers case as well."
org-default-priority))
((= dcst ?r)
(or (org-entry-get nil property) ""))
+ ((= dcst ?o)
+ (if (looking-at org-complex-heading-regexp)
+ (or (position (match-string 2) org-todo-keywords-1 :test 'string=)
+ 9999)))
((= dcst ?f)
(if getkey-func
(progn
next prev parent reply other threads:[~2008-03-16 17:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-16 16:27 [PATCH 0/5] Various patches James TD Smith
2008-03-16 16:28 ` [PATCH 1/5] Hide drawers after displaying an entry using org-clock-goto James TD Smith
2008-03-16 16:29 ` [PATCH 2/5] Add a way to set a user-defined function to generate descriptions for links James TD Smith
2008-04-09 15:15 ` Carsten Dominik
2008-03-16 16:29 ` [PATCH 3/5] Some improvements to org-table-export James TD Smith
2008-04-09 15:59 ` Carsten Dominik
2008-03-16 16:30 ` James TD Smith, James TD Smith [this message]
2008-04-09 15:40 ` [PATCH 4/5] Add a new sort option, which sorts items by todo keyword Carsten Dominik
2008-03-16 16:31 ` [PATCH 5/5] clipboard handling in remember templats James TD Smith
2008-04-09 15:32 ` Carsten Dominik
2008-04-09 17:35 ` James TD Smith
2008-03-16 18:29 ` [PATCH 4/5] Various patches James TD Smith
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=20080316162955.23004.35017.stgit@nyarlathotep.internal \
--to=ahktenzero@usa.net \
--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).