diff options
author | Kaushal Modi <kaushal.modi@gmail.com> | 2019-01-04 08:59:10 -0500 |
---|---|---|
committer | Kaushal Modi <kaushal.modi@gmail.com> | 2019-01-04 08:59:10 -0500 |
commit | b334a59902bc74fa4cf5ece1ac3ddf3ea3e0671e (patch) | |
tree | e9f045f6c352eea361ea7400a72cf4b42c11e977 | |
parent | 7db8ebc1df2f1c85060724ccf4e24fa9d0d21bc3 (diff) | |
parent | 539091799b370a1c452fe4952e8074d7dfe8656f (diff) | |
download | org-mode-b334a59902bc74fa4cf5ece1ac3ddf3ea3e0671e.tar.gz |
Merge branch 'maint'
-rw-r--r-- | lisp/org.el | 6 | ||||
-rw-r--r-- | testing/lisp/test-org.el | 16 |
2 files changed, 19 insertions, 3 deletions
diff --git a/lisp/org.el b/lisp/org.el index 631407e..2273a69 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -14235,8 +14235,10 @@ visible part of the buffer." (org--align-tags-here (funcall get-indent-column)) (save-excursion (if all - (while (re-search-forward org-tag-line-re nil t) - (org--align-tags-here (funcall get-indent-column))) + (progn + (goto-char (point-min)) + (while (re-search-forward org-tag-line-re nil t) + (org--align-tags-here (funcall get-indent-column)))) (org-back-to-heading t) (org--align-tags-here (funcall get-indent-column))))))) diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el index 6e1abc8..a77c0f7 100644 --- a/testing/lisp/test-org.el +++ b/testing/lisp/test-org.el @@ -6121,7 +6121,21 @@ Paragraph<point>" (let ((org-tags-column 78) (indent-tabs-mode nil)) (org-fix-tags-on-the-fly)) - (current-column))))) + (current-column)))) + ;; Aligning all tags in visible buffer. + (should + ;; 12345678901234567890 + (equal (concat "* Level 1 :abc:\n" + "** Level 2 :def:") + (org-test-with-temp-text (concat "* Level 1 :abc:\n" + "** Level 2 :def:") + (let ((org-tags-column -20) + (indent-tabs-mode nil)) + ;; (org-align-tags :all) must work even when the point + ;; is at the end of the buffer. + (goto-char (point-max)) + (org-align-tags :all)) + (buffer-string))))) (ert-deftest test-org/get-tags () "Test `org-get-tags' specifications." |