From mboxrd@z Thu Jan 1 00:00:00 1970 From: James TD Smith Subject: Re: [PATCH 4/5] Various patches Date: Sun, 16 Mar 2008 18:29:26 +0000 Message-ID: <20080316182926.GA16746@yog-sothoth.internal> References: <20080316162417.23004.16993.stgit@nyarlathotep.internal> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="xXmbgvnjoT4axfJE" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jaxbw-00063R-Nk for emacs-orgmode@gnu.org; Sun, 16 Mar 2008 14:29:32 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jaxbv-00062l-OW for emacs-orgmode@gnu.org; Sun, 16 Mar 2008 14:29:32 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jaxbv-00062W-IT for emacs-orgmode@gnu.org; Sun, 16 Mar 2008 14:29:31 -0400 Received: from 81-86-40-42.dsl.pipex.com ([81.86.40.42] helo=yog-sothoth.internal) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Jaxbu-0001c1-Ch for emacs-orgmode@gnu.org; Sun, 16 Mar 2008 14:29:31 -0400 Received: from yog-sothoth.internal (localhost [127.0.0.1]) by yog-sothoth.internal (8.13.4/8.13.4) with ESMTP id m2GITR5X017593 for ; Sun, 16 Mar 2008 18:29:27 GMT (envelope-from ahktenzero@dsl.pipex.com) Received: (from ahktenzero@localhost) by yog-sothoth.internal (8.13.4/8.13.4/Submit) id m2GITR6h017592 for emacs-orgmode@gnu.org; Sun, 16 Mar 2008 18:29:27 GMT (envelope-from ahktenzero@dsl.pipex.com) Content-Disposition: inline In-Reply-To: <20080316162417.23004.16993.stgit@nyarlathotep.internal> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --xXmbgvnjoT4axfJE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline One of my patches [4/5] appears to have gone missing. I've attatched it to this email. James --xXmbgvnjoT4axfJE Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=sort-todo-by-state Add a new sort option, which sorts items by todo keyword in the order of the From: James TD Smith todo sequence. 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 --xXmbgvnjoT4axfJE Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --xXmbgvnjoT4axfJE--