diff options
author | Marco Wahl <marcowahlsoft@gmail.com> | 2020-07-04 12:54:39 +0200 |
---|---|---|
committer | Marco Wahl <marcowahlsoft@gmail.com> | 2020-07-04 12:54:39 +0200 |
commit | 4dc8b5778644a19a0b40e991407564acb21d1213 (patch) | |
tree | 64e399970c1baa0fa21cd70052a015d757009379 | |
parent | 5427a74071c906e14b6887a3441d6620aa31d027 (diff) | |
parent | 99b8f36ab897f82140d846812afe1874ec1e8d7d (diff) | |
download | org-mode-4dc8b5778644a19a0b40e991407564acb21d1213.tar.gz |
Merge remote-tracking branch 'origin/maint' into maint
-rw-r--r-- | lisp/org-capture.el | 2 | ||||
-rw-r--r-- | lisp/org.el | 6 | ||||
-rw-r--r-- | lisp/ox.el | 6 | ||||
-rw-r--r-- | testing/lisp/test-org.el | 27 |
4 files changed, 35 insertions, 6 deletions
diff --git a/lisp/org-capture.el b/lisp/org-capture.el index 3992212..75b2686 100644 --- a/lisp/org-capture.el +++ b/lisp/org-capture.el @@ -625,7 +625,7 @@ of the day at point (if any) or the current HH:MM time." (setq org-overriding-default-time (org-get-cursor-date (equal goto 1)))) (cond - ((equal goto '(4)) (org-capture-goto-target)) + ((equal goto '(4)) (org-capture-goto-target keys)) ((equal goto '(16)) (org-capture-goto-last-stored)) (t (let* ((orig-buf (current-buffer)) diff --git a/lisp/org.el b/lisp/org.el index c03aa0c..fe5dbbf 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -10065,9 +10065,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) @@ -6878,10 +6878,12 @@ back to standard interface." (with-current-buffer "*Org Export Dispatcher*" ;; Refresh help. Maintain display continuity by re-visiting ;; previous window position. - (let ((pos (window-start))) + (let ((pt (point)) + (wstart (window-start))) (erase-buffer) (insert help) - (set-window-start nil pos))) + (goto-char pt) + (set-window-start nil wstart))) (org-fit-window-to-buffer) (org-export--dispatch-action standard-prompt allowed-keys entries options first-key expertp)))) diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el index 67137c9..ba22925 100644 --- a/testing/lisp/test-org.el +++ b/testing/lisp/test-org.el @@ -3035,6 +3035,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 |