From: Lawrence Mitchell <wence@gmx.li>
To: emacs-orgmode@gnu.org
Subject: [PATCH] org: Match case of todo keywords when determining empty headings
Date: Tue, 29 Mar 2011 09:44:07 +0100 [thread overview]
Message-ID: <m37hbiz57s.fsf@e4300lm.epcc.ed.ac.uk> (raw)
In-Reply-To: AANLkTik+_2yUSn6vyhqY8LSzNYvNVibtKjppnu+mzYmi@mail.gmail.com
* 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
next prev parent reply other threads:[~2011-03-29 8:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-29 2:10 7th todo keyword bug Samuel Wales
2011-03-29 8:44 ` Lawrence Mitchell [this message]
2011-03-31 5:28 ` [PATCH] org: Match case of todo keywords when determining empty headings Samuel Wales
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=m37hbiz57s.fsf@e4300lm.epcc.ed.ac.uk \
--to=wence@gmx.li \
--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).