From 7062a884107fd8ab261fc098096a7d5918b40229 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Wed, 16 Dec 2009 15:33:00 +0100 Subject: [PATCH] Match TODO keywords case-sensitively Samuel Wales writes: > I found three places where the lowercase version of a todo > kw is treated specially in the latest org. For example, > > * todo this is lowercase > > First, in the agenda, they have a special face. > > Second, when inserting an id link, they are removed. > > Third, when printing the olpath, they are removed. To > reproduce, place point at bol on 5 and press the spacebar. > I expect todo to be in the olpath, but it is not. > > Thanks. > > > Samuel > > > * 1 > *** 2 > ***** here are some keywords i like > ******* todo > ********* 5 --- lisp/ChangeLog | 9 +++++++++ lisp/org-agenda.el | 1 + lisp/org-id.el | 1 + lisp/org.el | 9 +++++---- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a70b2ba09..b62837ac0 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,14 @@ 2009-12-16 Carsten Dominik + * org-agenda.el (org-agenda-highlight-todo): Match TODO keywords + case sensitively. + + * org-id.el (org-id-store-link): Match TODO keywords case + sensitively. + + * org.el (org-heading-components, org-get-outline-path) + (org-display-outline-path): Match TODO keywords case sensitively. + * org-latex.el (org-export-as-latex): Ignore read-only properties. diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index b3de62b52..13b55762b 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -4832,6 +4832,7 @@ HH:MM." (defun org-agenda-highlight-todo (x) (let ((org-done-keywords org-done-keywords-for-agenda) + (case-fold-search nil) re pl) (if (eq x 'line) (save-excursion diff --git a/lisp/org-id.el b/lisp/org-id.el index b057faade..736089e6f 100644 --- a/lisp/org-id.el +++ b/lisp/org-id.el @@ -576,6 +576,7 @@ optional argument MARKERP, return the position as a new marker." "Store a link to the current entry, using its ID." (interactive) (let* ((link (org-make-link "id:" (org-id-get-create))) + (case-fold-search nil) (desc (save-excursion (org-back-to-heading t) (or (and (looking-at org-complex-heading-regexp) diff --git a/lisp/org.el b/lisp/org.el index 3c4891f8b..74fa3b6c7 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -6180,7 +6180,7 @@ This is a list with the following elements: - the tags string, or nil." (save-excursion (org-back-to-heading t) - (if (looking-at org-complex-heading-regexp) + (if (let (case-fold-search) (looking-at org-complex-heading-regexp)) (list (length (match-string 1)) (org-reduced-level (length (match-string 1))) (org-match-string-no-properties 2) @@ -9157,7 +9157,7 @@ avoiding backtracing." (prog1 (delq nil (append org-olpa nil)) (aset org-olpa level heading))) - (let (rtn) + (let (rtn case-fold-search) (save-excursion (save-restriction (widen) @@ -9207,8 +9207,9 @@ such as the file name." (defun org-display-outline-path (&optional file current) "Display the current outline path in the echo area." (interactive "P") - (let ((bfn (buffer-file-name (buffer-base-buffer))) - (path (and (org-mode-p) (org-get-outline-path)))) + (let* ((bfn (buffer-file-name (buffer-base-buffer))) + (case-fold-search nil) + (path (and (org-mode-p) (org-get-outline-path)))) (if current (setq path (append path (save-excursion (org-back-to-heading t) -- 2.11.4.GIT