diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2017-10-18 22:49:10 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2017-10-18 22:49:10 +0200 |
commit | cd9cccb4b28806c4af05fdc192a1babeb75bed22 (patch) | |
tree | 7daf7d7fd92ad91e7e2c91000f247d1d53220a35 | |
parent | 52d4ca4b29b4e404f797130d56fec4793aed83d2 (diff) | |
parent | 8c5c030c646941d057ef76e7845e3503d3fdf3a8 (diff) | |
download | org-mode-cd9cccb4b28806c4af05fdc192a1babeb75bed22.tar.gz |
Merge branch 'maint'
-rw-r--r-- | lisp/org.el | 3 | ||||
-rw-r--r-- | testing/lisp/test-org.el | 7 |
2 files changed, 8 insertions, 2 deletions
diff --git a/lisp/org.el b/lisp/org.el index ba8d72d..54687ab 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -7938,8 +7938,7 @@ unchecked check box." (org-insert-heading (or (and (equal arg '(16)) '(16)) force-heading)) (save-excursion - (org-back-to-heading) - (outline-previous-heading) + (org-forward-heading-same-level -1) (let ((case-fold-search nil)) (looking-at org-todo-line-regexp))) (let* ((new-mark-x (if (or (equal arg '(4)) diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el index fbe053f..f94079b 100644 --- a/testing/lisp/test-org.el +++ b/testing/lisp/test-org.el @@ -1416,6 +1416,13 @@ (org-test-with-temp-text "* H\n- an item\n- another one" (search-forward "an ") (org-insert-todo-heading-respect-content) + (buffer-substring-no-properties (line-beginning-position) (point-max))))) + ;; Use the same TODO keyword as current heading. + (should + (equal + "* TODO \n" + (org-test-with-temp-text "* TODO\n** WAITING\n" + (org-insert-todo-heading-respect-content) (buffer-substring-no-properties (line-beginning-position) (point-max)))))) (ert-deftest test-org/clone-with-time-shift () |