[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] [PATCH] org: Match case of todo keywords when determining empty head
From: |
Lawrence Mitchell |
Subject: |
[O] [PATCH] org: Match case of todo keywords when determining empty headings |
Date: |
Tue, 29 Mar 2011 09:44:07 +0100 |
User-agent: |
Gnus/5.110014 (No Gnus v0.14) Emacs/24.0.50 (gnu/linux) |
* lisp/org.el (org-point-at-end-of-empty-headline): Bind
case-fold-search to nil.
---
Samuel Wales wrote:
> I have found another todo keyword bug of the same type as the other 6.
> A headline with a word that is the same as a todo keyword but not in
> upper case has different behavior.
> Example:
> * test
> * Question[]
> * test
> Have QUESTION as a todo keyword. Put point at the marked spot. Press
> TAB. The headline will outdent instead of cycling visibility. It
> should cycle visibility as it does with other headlines.
This is because the check for an empty heading thinks Question is
a todo keyword, because it doesn't match the case of the values
in org-todo-keywords. This patch fixes the problem by binding
case-fold-search to nil in the relevant place.
Cheers,
Lawrence
lisp/org.el | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/lisp/org.el b/lisp/org.el
index 28025ea..7a4c504 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -19649,8 +19649,9 @@ empty."
(and (looking-at "[ \t]*$")
(save-excursion
(beginning-of-line 1)
- (looking-at (concat "^\\(\\*+\\)[ \t]+\\(" org-todo-regexp
- "\\)?[ \t]*$")))))
+ (let ((case-fold-search nil))
+ (looking-at (concat "^\\(\\*+\\)[ \t]+\\(" org-todo-regexp
+ "\\)?[ \t]*$"))))))
(defun org-at-heading-or-item-p ()
(or (org-on-heading-p) (org-at-item-p)))
--
1.7.4.rc2.18.gb20e9
- [O] 7th todo keyword bug, Samuel Wales, 2011/03/28
- [O] [PATCH] org: Match case of todo keywords when determining empty headings,
Lawrence Mitchell <=