diff options
author | Kyle Meyer <kyle@kyleam.com> | 2020-06-28 02:29:12 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2020-06-28 02:29:12 -0400 |
commit | 15029c8abbf5f7c65f2dd63c2349b8118dcb6f11 (patch) | |
tree | a10937990b8c14532d3aff9f59e82a2c32a3996b | |
parent | 3cbbbd784f8589f8b707a1b431655cfd798f1cc2 (diff) | |
parent | 3ed035ce3bff1bc915bf64267d527b4eeef288d3 (diff) | |
download | org-mode-15029c8abbf5f7c65f2dd63c2349b8118dcb6f11.tar.gz |
Merge branch 'maint'
-rw-r--r-- | lisp/org.el | 6 | ||||
-rw-r--r-- | testing/lisp/test-org.el | 27 |
2 files changed, 30 insertions, 3 deletions
diff --git a/lisp/org.el b/lisp/org.el index 4d46b41..6355e46 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -9561,9 +9561,9 @@ When called through ELisp, arg is also interpreted in the following way: 'region-start-level 'region)) org-loop-over-headlines-in-active-region) (org-map-entries - `(org-todo ,arg) - org-loop-over-headlines-in-active-region - cl (when (org-invisible-p) (org-end-of-subtree nil t)))) + (lambda () (org-todo arg)) + nil cl + (when (org-invisible-p) (org-end-of-subtree nil t)))) (when (equal arg '(16)) (setq arg 'nextset)) (when (equal arg -1) (org-cancel-repeater) (setq arg nil)) (let ((org-blocker-hook org-blocker-hook) diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el index 375e1a7..3c563f3 100644 --- a/testing/lisp/test-org.el +++ b/testing/lisp/test-org.el @@ -3338,6 +3338,33 @@ SCHEDULED: <2017-05-06 Sat> (org-end-of-meta-data t) (looking-at "Contents")))) +(ert-deftest test-org/shiftright-heading () + "Test `org-shiftright' on headings." + (let ((org-todo-keywords '((sequence "TODO" "DONE")))) + (should + (equal "* TODO a1\n** a2\n* DONE b1\n" + (org-test-with-temp-text "* a1\n** a2\n* DONE b1\n" + (org-shiftright) + (buffer-string)))) + (should + (equal "* TODO a1\n** TODO a2\n* b1\n" + (org-test-with-temp-text "* a1\n** a2\n* DONE b1\n" + (let ((org-loop-over-headlines-in-active-region t)) + (transient-mark-mode 1) + (push-mark (point) t t) + (search-forward "* DONE b1") + (org-shiftright)) + (buffer-string)))) + (should + (equal "* TODO a1\n** a2\n* b1\n" + (org-test-with-temp-text "* a1\n** a2\n* DONE b1\n" + (let ((org-loop-over-headlines-in-active-region 'start-level)) + (transient-mark-mode 1) + (push-mark (point) t t) + (search-forward "* DONE b1") + (org-shiftright)) + (buffer-string)))))) + (ert-deftest test-org/beginning-of-line () "Test `org-beginning-of-line' specifications." ;; Move to beginning of line. If current line in invisible, move to |