diff options
author | Bastien Guerry <bzg@altern.org> | 2012-12-22 20:16:17 +0100 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2012-12-22 20:16:17 +0100 |
commit | f015ae5b8b01fc0393d808146968d8974911d914 (patch) | |
tree | 7b282c5a13b0df463e56b392a67be8dbd9b1360a | |
parent | ce4e0846b2b80430698c88664c505f9171b17204 (diff) | |
download | org-mode-f015ae5b8b01fc0393d808146968d8974911d914.tar.gz |
org.el (org-todo): Ignore the comment string when changing a TODO state
* org.el (org-todo): Ignore the comment string when changing
the TODO state of a headline.
Thanks to Samuel Wales for reporting this.
-rw-r--r-- | lisp/org.el | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/org.el b/lisp/org.el index ab1e2ad..77886cc 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -11439,7 +11439,8 @@ For calling through lisp, arg is also interpreted in the following way: cl (if (outline-invisible-p) (org-end-of-subtree nil t)))) (if (equal arg '(16)) (setq arg 'nextset)) (let ((org-blocker-hook org-blocker-hook) - (case-fold-search nil)) + commentp + case-fold-search) (when (equal arg '(64)) (setq arg nil org-blocker-hook nil)) (when (and org-blocker-hook @@ -11449,6 +11450,9 @@ For calling through lisp, arg is also interpreted in the following way: (save-excursion (catch 'exit (org-back-to-heading t) + (when (looking-at (concat "^\\*+ " org-comment-string)) + (org-toggle-comment) + (setq commentp t)) (if (looking-at org-outline-regexp) (goto-char (1- (match-end 0)))) (or (looking-at (concat " +" org-todo-regexp "\\( +\\|[ \t]*$\\)")) (looking-at "\\(?: *\\|[ \t]*$\\)")) @@ -11624,7 +11628,8 @@ For calling through lisp, arg is also interpreted in the following way: (and (looking-at " ") (just-one-space)))) (when org-trigger-hook (save-excursion - (run-hook-with-args 'org-trigger-hook change-plist))))))))) + (run-hook-with-args 'org-trigger-hook change-plist))) + (when commentp (org-toggle-comment)))))))) (defun org-block-todo-from-children-or-siblings-or-parent (change-plist) "Block turning an entry into a TODO, using the hierarchy. |