From 6e9fb4550feda7ec36205ae55016d579503b8f25 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Sat, 11 Apr 2009 08:16:41 +0200 Subject: [PATCH] TODO keywords: Should be case sensitive Samuel Wales writes: > A lower case version of a todo kw at the beginning of a > headline, when in lower case, causes sort to ignore the > word. > > Also, setting priority with shift down causes the cookie to > be inserted in the wrong place. Both problems are address in this commit. --- lisp/ChangeLog | 6 ++++++ lisp/org.el | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6a4ada434..6f980ed13 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2009-04-11 Carsten Dominik + + * org.el (org-sort-entries-or-items): Match TODO keywrds + case-sensitively, when sorting. + (org-priority): Do not match TODO keywords with wrong case. + 2009-04-09 Carsten Dominik * org-feed.el (org-feed-update): Bind the variable diff --git a/lisp/org.el b/lisp/org.el index 1e8c70674..196e37895 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -6097,6 +6097,7 @@ WITH-CASE, the sorting considers case as well." (narrow-to-region start end) (let ((dcst (downcase sorting-type)) + (case-fold-search nil) (now (current-time))) (sort-subr (/= dcst sorting-type) @@ -9980,7 +9981,8 @@ ACTION can be `set', `up', `down', or a character." (replace-match news t t nil 2)) (if remove (error "No priority cookie found in line") - (looking-at org-todo-line-regexp) + (let ((case-fold-search nil)) + (looking-at org-todo-line-regexp)) (if (match-end 2) (progn (goto-char (match-end 2))