emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] Fix indentation in test-org.el
@ 2023-11-25 11:13 Allen Li
  2023-12-04 14:38 ` Ihor Radchenko
  0 siblings, 1 reply; 2+ messages in thread
From: Allen Li @ 2023-11-25 11:13 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 317 bytes --]

The indentation in test-org.el is all over the place.  I've attached a
patch fixing it.

Alternatively, you can do the following to reproduce the changes:

Load org-test.el and test-org.el to pick up macros which define their own
indentation.
In test-org.el, type `C-x h TAB` to mark the entire buffer and re-indent.

[-- Attachment #1.2: Type: text/html, Size: 402 bytes --]

[-- Attachment #2: 0001-testing-lisp-test-org.el-Fix-indentation.patch --]
[-- Type: text/x-patch, Size: 45976 bytes --]

From 69ddca72e4744c8f3d3a552b760108bd17c676ae Mon Sep 17 00:00:00 2001
From: Allen Li <darkfeline@felesatra.moe>
Date: Sat, 25 Nov 2023 03:06:06 -0800
Subject: [PATCH] testing/lisp/test-org.el: Fix indentation

The indentation in this file is all messed up.  Fix it by loading
test-org.el and org-test.el to pick up all the macros, and then C-x h
TAB to re-indent the entire file.

* testing/lisp/test-org.el (org-test-with-timezone): Fix indentation.
---
 testing/lisp/test-org.el | 584 +++++++++++++++++++--------------------
 1 file changed, 292 insertions(+), 292 deletions(-)

diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el
index 612bfa1e5..1825af21d 100644
--- a/testing/lisp/test-org.el
+++ b/testing/lisp/test-org.el
@@ -41,7 +41,7 @@
            (progn
              (setenv "TZ" ,tz)
              ,@body)
-             (setenv "TZ" ,tz-saved)))))
+         (setenv "TZ" ,tz-saved)))))
 
 (defmacro org-test-with-result (result &rest body)
   "Evaluate BODY, and return buffer content based on RESULT.
@@ -562,7 +562,7 @@ Otherwise, evaluate RESULT as an sexp and return its result."
   ;; The function ignores incomplete drawers.
   (should-not
    (org-test-with-temp-text ":PROPERTIES:\n<point>:PROP: t\n"
-                            (org-at-property-drawer-p)))
+     (org-at-property-drawer-p)))
   ;; tab separating the value.
   (should
    (org-test-with-temp-text ":PROPERTIES:\n:PROP:	t\n:END:\n"
@@ -682,20 +682,20 @@ Otherwise, evaluate RESULT as an sexp and return its result."
     (should
      (equal "* H\n:PROPERTIES:\n:END:\n*************** I\n*************** END\nP"
 	    (org-test-with-temp-text
-		"* H\n*************** I\n*************** END\nP<point>"
+	        "* H\n*************** I\n*************** END\nP<point>"
 	      (let ((org-adapt-indentation nil)
 		    (org-inlinetask-min-level 15))
-		(org-insert-property-drawer))
+	        (org-insert-property-drawer))
 	      (buffer-string)))))
   ;; Correctly set drawer in an inlinetask.
   (when (featurep 'org-inlinetask)
     (should
      (equal "* H\n*************** I\n:PROPERTIES:\n:END:\nP\n*************** END"
 	    (org-test-with-temp-text
-		"* H\n*************** I\nP<point>\n*************** END"
+	        "* H\n*************** I\nP<point>\n*************** END"
 	      (let ((org-adapt-indentation nil)
 		    (org-inlinetask-min-level 15))
-		(org-insert-property-drawer))
+	        (org-insert-property-drawer))
 	      (buffer-string))))))
 
 \f
@@ -941,21 +941,21 @@ Otherwise, evaluate RESULT as an sexp and return its result."
   (should
    (equal "\n- 2345678\n  9\n- 2345678\n  9"
 	  (org-test-with-temp-text "\n- 2345678 9\n- 2345678 9"
-	                           (let ((fill-column 10))
-	                             (transient-mark-mode 1)
-	                             (push-mark (point-min) t t)
-	                             (goto-char (point-max))
-	                             (call-interactively #'fill-region)
-	                             (buffer-string)))))
+	    (let ((fill-column 10))
+	      (transient-mark-mode 1)
+	      (push-mark (point-min) t t)
+	      (goto-char (point-max))
+	      (call-interactively #'fill-region)
+	      (buffer-string)))))
   (should
    (equal "\n- 1 2\n- 1 2"
 	  (org-test-with-temp-text "\n- 1\n  2\n- 1\n  2"
-	                           (let ((fill-column 10))
-	                             (transient-mark-mode 1)
-	                             (push-mark (point-min) t t)
-	                             (goto-char (point-max))
-	                             (call-interactively #'fill-region)
-	                             (buffer-string)))))  )
+	    (let ((fill-column 10))
+	      (transient-mark-mode 1)
+	      (push-mark (point-min) t t)
+	      (goto-char (point-max))
+	      (call-interactively #'fill-region)
+	      (buffer-string)))))  )
 
 (ert-deftest test-org/auto-fill-function ()
   "Test auto-filling features."
@@ -1127,9 +1127,9 @@ Otherwise, evaluate RESULT as an sexp and return its result."
   (should
    (= 1
       (org-test-with-temp-text
-	  "\\begin{equation}\n <point>1+1=2\n\\end{equation}"
-	(org-indent-line)
-	(org-get-indentation))))
+          "\\begin{equation}\n <point>1+1=2\n\\end{equation}"
+        (org-indent-line)
+        (org-get-indentation))))
   ;; On blank lines at the end of a list, indent like last element
   ;; within it if the line is still in the list.  If the last element
   ;; is an item, indent like its contents.  Otherwise, indent like the
@@ -1157,9 +1157,9 @@ Otherwise, evaluate RESULT as an sexp and return its result."
   (should
    (= 4
       (org-test-with-temp-text
-	  "* H\n  - \n    #+BEGIN_SRC emacs-lisp\n  t\n    #+END_SRC\n<point>"
-	(let ((org-adapt-indentation t)) (org-indent-line))
-	(org-get-indentation))))
+          "* H\n  - \n    #+BEGIN_SRC emacs-lisp\n  t\n    #+END_SRC\n<point>"
+        (let ((org-adapt-indentation t)) (org-indent-line))
+        (org-get-indentation))))
   (should
    (= 2
       (org-test-with-temp-text "- A\n  B\n\n<point>"
@@ -1168,9 +1168,9 @@ Otherwise, evaluate RESULT as an sexp and return its result."
   (should
    (= 2
       (org-test-with-temp-text
-	  "- A\n  \begin{cases}    1 + 1\n  \end{cases}\n\n<point>"
-	(let ((org-adapt-indentation nil)) (org-indent-line))
-	(org-get-indentation))))
+          "- A\n  \begin{cases}    1 + 1\n  \end{cases}\n\n<point>"
+        (let ((org-adapt-indentation nil)) (org-indent-line))
+        (org-get-indentation))))
   ;; Likewise, on a blank line at the end of a footnote definition,
   ;; indent at column 0 if line belongs to the definition.  Otherwise,
   ;; indent like the definition itself.
@@ -1189,9 +1189,9 @@ Otherwise, evaluate RESULT as an sexp and return its result."
   (should
    (= 1
       (org-test-with-temp-text
-	  " #+BEGIN_CENTER\n  Contents\n<point>#+END_CENTER"
-	(org-indent-line)
-	(org-get-indentation))))
+          " #+BEGIN_CENTER\n  Contents\n<point>#+END_CENTER"
+        (org-indent-line)
+        (org-get-indentation))))
   ;; On blank lines after a paragraph, indent like its last non-empty
   ;; line.
   (should
@@ -1206,43 +1206,43 @@ Otherwise, evaluate RESULT as an sexp and return its result."
     (should
      (= 2
         (org-test-with-temp-text "A\n\n  B\n\nC<point>"
-	                         (org-indent-line)
-	                         (org-get-indentation))))
+	  (org-indent-line)
+	  (org-get-indentation))))
     (should
      (= 1
         (org-test-with-temp-text " A\n\n[fn:1] B\n\n\nC<point>"
-	                         (org-indent-line)
-	                         (org-get-indentation))))
+	  (org-indent-line)
+	  (org-get-indentation))))
     (should
      (= 1
         (org-test-with-temp-text
-	 " #+BEGIN_CENTER\n<point>  Contents\n#+END_CENTER"
-	 (org-indent-line)
-	 (org-get-indentation)))))
+	    " #+BEGIN_CENTER\n<point>  Contents\n#+END_CENTER"
+	  (org-indent-line)
+	  (org-get-indentation)))))
   ;; Within code part of a source block, use language major mode if
   ;; `org-src-tab-acts-natively' is non-nil.  Otherwise, indent
   ;; according to line above.
   (should
    (= 6
       (org-test-with-temp-text
-	  "#+BEGIN_SRC emacs-lisp\n (and A\n<point>B)\n#+END_SRC"
-	(let ((org-src-tab-acts-natively t)
+          "#+BEGIN_SRC emacs-lisp\n (and A\n<point>B)\n#+END_SRC"
+        (let ((org-src-tab-acts-natively t)
 	      (org-edit-src-content-indentation 0))
 	  (org-indent-line))
-	(org-get-indentation))))
+        (org-get-indentation))))
   (should
    (= 1
       (org-test-with-temp-text
-	  "#+BEGIN_SRC emacs-lisp\n (and A\n<point>B)\n#+END_SRC"
-	(let ((org-src-tab-acts-natively nil)
+          "#+BEGIN_SRC emacs-lisp\n (and A\n<point>B)\n#+END_SRC"
+        (let ((org-src-tab-acts-natively nil)
 	      (org-edit-src-content-indentation 0))
 	  (org-indent-line))
-	(org-get-indentation))))
+        (org-get-indentation))))
   ;; Otherwise, indent like the first non-blank line above.
   (should
    (zerop
     (org-test-with-temp-text
-	"#+BEGIN_CENTER\nline1\n\n<point>  line2\n#+END_CENTER"
+        "#+BEGIN_CENTER\nline1\n\n<point>  line2\n#+END_CENTER"
       (org-indent-line)
       (org-get-indentation))))
   ;; Align node properties according to `org-property-format'.  Handle
@@ -1266,8 +1266,8 @@ Otherwise, evaluate RESULT as an sexp and return its result."
     (should
      (equal "A\nB\nC"
 	    (org-test-with-temp-text " A\nB\n  C"
-	                             (org-indent-region (point-min) (point-max))
-	                             (buffer-string)))))
+	      (org-indent-region (point-min) (point-max))
+	      (buffer-string)))))
   ;; Indent greater elements along with their contents.
   (should
    (equal "#+BEGIN_CENTER\nA\nB\n#+END_CENTER"
@@ -1284,8 +1284,8 @@ Otherwise, evaluate RESULT as an sexp and return its result."
     (should
      (equal "#+BEGIN_VERSE\n  A\n   B\n#+END_VERSE"
 	    (org-test-with-temp-text " #+BEGIN_VERSE\n  A\n   B\n #+END_VERSE"
-	                             (org-indent-region (point-min) (point-max))
-	                             (buffer-string)))))
+	      (org-indent-region (point-min) (point-max))
+	      (buffer-string)))))
   ;; Indent example blocks as a single block, unless indentation
   ;; should be preserved.  In this case only indent the block markers.
   (should
@@ -1297,21 +1297,21 @@ Otherwise, evaluate RESULT as an sexp and return its result."
     (should
      (equal "#+BEGIN_EXAMPLE\n A\n  B\n#+END_EXAMPLE"
 	    (org-test-with-temp-text " #+BEGIN_EXAMPLE\n  A\n   B\n #+END_EXAMPLE"
-	                             (org-indent-region (point-min) (point-max))
-	                             (buffer-string))))
+	      (org-indent-region (point-min) (point-max))
+	      (buffer-string))))
     (should
      (equal "#+BEGIN_EXAMPLE -i\n  A\n   B\n#+END_EXAMPLE"
 	    (org-test-with-temp-text
-	     " #+BEGIN_EXAMPLE -i\n  A\n   B\n #+END_EXAMPLE"
-	     (org-indent-region (point-min) (point-max))
-	     (buffer-string))))
+	        " #+BEGIN_EXAMPLE -i\n  A\n   B\n #+END_EXAMPLE"
+	      (org-indent-region (point-min) (point-max))
+	      (buffer-string))))
     (should
      (equal "#+BEGIN_EXAMPLE\n  A\n   B\n#+END_EXAMPLE"
 	    (org-test-with-temp-text
-	     " #+BEGIN_EXAMPLE\n  A\n   B\n #+END_EXAMPLE"
-	     (let ((org-src-preserve-indentation t))
-	       (org-indent-region (point-min) (point-max)))
-	     (buffer-string)))))
+	        " #+BEGIN_EXAMPLE\n  A\n   B\n #+END_EXAMPLE"
+	      (let ((org-src-preserve-indentation t))
+	        (org-indent-region (point-min) (point-max)))
+	      (buffer-string)))))
   ;; Treat export blocks as a whole.
   (should
    (equal "#+BEGIN_EXPORT latex\n A\n  B\n#+END_EXPORT"
@@ -1470,20 +1470,20 @@ CLOCK: [2022-09-17 sam. 11:00]--[2022-09-17 sam. 11:46] =>  0:46"
   ;; Calling `M-j' when point is not in an Org comment:
   (should
    (equal "* Some heading\n"
-  (org-test-with-temp-text "* Some heading<point>"
-                           (call-interactively #'default-indent-new-line)
-                           (buffer-string))))
+          (org-test-with-temp-text "* Some heading<point>"
+            (call-interactively #'default-indent-new-line)
+            (buffer-string))))
   ;; Calling `M-j' when point is in an Org comment:
   (should
    (equal "# Some Org comment\n# "
-  (org-test-with-temp-text "# Some Org comment<point>"
-                           (call-interactively #'default-indent-new-line)
-                           (buffer-string))))
+          (org-test-with-temp-text "# Some Org comment<point>"
+            (call-interactively #'default-indent-new-line)
+            (buffer-string))))
   (should
    (equal "# Some Org\n# comment"
-  (org-test-with-temp-text "# Some Org <point>comment"
-                           (call-interactively #'default-indent-new-line)
-                           (buffer-string)))))
+          (org-test-with-temp-text "# Some Org <point>comment"
+            (call-interactively #'default-indent-new-line)
+            (buffer-string)))))
 
 
 \f
@@ -1493,16 +1493,16 @@ CLOCK: [2022-09-17 sam. 11:00]--[2022-09-17 sam. 11:46] =>  0:46"
   "Test `org-delete-indentation' specifications."
   ;; Regular test.
   (should (equal "foo bar"
-		(org-test-with-temp-text
-		    "foo \n bar<point>"
-		  (org-delete-indentation)
-		  (buffer-string))))
+		 (org-test-with-temp-text
+		     "foo \n bar<point>"
+		   (org-delete-indentation)
+		   (buffer-string))))
   ;; With optional argument.
   (should (equal "foo bar"
-		(org-test-with-temp-text
-		    "foo<point> \n bar"
-		  (org-delete-indentation t)
-		  (buffer-string))))
+		 (org-test-with-temp-text
+		     "foo<point> \n bar"
+		   (org-delete-indentation t)
+		   (buffer-string))))
   ;; At headline text should be appended to the headline text.
   (should
    (equal"* foo bar :tag:"
@@ -1515,7 +1515,7 @@ CLOCK: [2022-09-17 sam. 11:00]--[2022-09-17 sam. 11:46] =>  0:46"
    (equal "* foo bar :tag:"
 	  (let (org-auto-align-tags)
 	    (org-test-with-temp-text
-		"* foo <point>:tag:\n bar"
+	        "* foo <point>:tag:\n bar"
 	      (org-delete-indentation t)
 	      (buffer-string))))))
 
@@ -2668,9 +2668,9 @@ test <point>
    (org-test-with-temp-text "* Headline :ARCHIVE:\n** Level 2\nBody"
      (goto-char (point-max))
      (org-in-archived-heading-p t)))
-   ;; Archive tag containing ARCHIVE as substring
-   (should-not
-    (org-test-with-temp-text "* Headline :NOARCHIVE:\n** Level 2\nBody"
+  ;; Archive tag containing ARCHIVE as substring
+  (should-not
+   (org-test-with-temp-text "* Headline :NOARCHIVE:\n** Level 2\nBody"
      (goto-char (point-max))
      (org-in-archived-heading-p))))
 
@@ -2963,7 +2963,7 @@ SCHEDULED: <2014-03-04 tue.>"
 	      (org-map-entries #'point "TEST!=*1"))))
     ;; Property matches on names containing quoted characters.
     (org-test-with-temp-text
-     "
+        "
 * H1 :BAR:
 :PROPERTIES:
 :TEST-FOO: 1
@@ -2981,11 +2981,11 @@ SCHEDULED: <2014-03-04 tue.>"
 :-FOO: 2
 :END:
 * H5 :TEST:"
-     (should (equal '(2) (org-map-entries #'point "TEST\\-FOO!=*0-FOO")))
-     (should (equal '(2) (org-map-entries #'point "-FOO+TEST\\-FOO!=*0")))
-     (should (equal '(88) (org-map-entries #'point "\\-FOO!=*0-FOO")))
-     (should (equal '(88) (org-map-entries #'point "-FOO+\\-FOO!=*0")))
-     (should (equal '(88) (org-map-entries #'point "-TEST-FOO-TEST\\-FOO=1"))))
+      (should (equal '(2) (org-map-entries #'point "TEST\\-FOO!=*0-FOO")))
+      (should (equal '(2) (org-map-entries #'point "-FOO+TEST\\-FOO!=*0")))
+      (should (equal '(88) (org-map-entries #'point "\\-FOO!=*0-FOO")))
+      (should (equal '(88) (org-map-entries #'point "-FOO+\\-FOO!=*0")))
+      (should (equal '(88) (org-map-entries #'point "-TEST-FOO-TEST\\-FOO=1"))))
     ;; Multiple criteria.
     (should
      (equal '(23)
@@ -3441,7 +3441,7 @@ Let’s stop here
    (let ((first-line
 	  "** TODO [#A] [/]  Test [1/2] [33%] 1 \t  2 [%] :work:urgent: "))
      (org-test-with-temp-text
-	 (concat first-line "\nFoo Bar\n<point>[[*Test 1 2]]")
+         (concat first-line "\nFoo Bar\n<point>[[*Test 1 2]]")
        (let ((org-link-search-must-match-exact-headline nil)
 	     (org-todo-regexp "TODO"))
 	 (org-open-at-point))
@@ -3528,12 +3528,12 @@ Foo Bar
   "Does `org-open-at-point' open link in a commented line?"
   (should
    (org-test-with-temp-text
-    "<<top>>\n# <point>[[top]]"
-    (org-open-at-point) t))
+       "<<top>>\n# <point>[[top]]"
+     (org-open-at-point) t))
   (should
    (org-test-with-temp-text
-    "* H\n<<top>>\n# <point>[[top]]"
-    (org-open-at-point) t)))
+       "* H\n<<top>>\n# <point>[[top]]"
+     (org-open-at-point) t)))
 
 (ert-deftest test-org/open-at-point/inline-image ()
   "Test `org-open-at-point' on nested links."
@@ -3580,7 +3580,7 @@ Foo Bar
 	 ;; possibly trying to open attachments which will return an
 	 ;; error if there isn't an attachment. Suppress that error.
 	 (ignore-errors
-	     (org-open-at-point))
+	   (org-open-at-point))
 	 nil)))))
 
 \f
@@ -3615,7 +3615,7 @@ Foo Bar
   (should
    (let ((org-custom-properties '("FOO" "BAR")))
      (org-test-with-temp-text
-	 "* H\n:PROPERTIES:\n<point>:FOO: val\n:P: 1\n:BAR: baz\n:END:\n"
+         "* H\n:PROPERTIES:\n<point>:FOO: val\n:P: 1\n:BAR: baz\n:END:\n"
        (org-fold-reveal)
        (org-toggle-custom-properties-visibility)
        (and (org-invisible-p2)
@@ -3636,7 +3636,7 @@ Foo Bar
   (should-not
    (let ((org-custom-properties '("A")))
      (org-test-with-temp-text
-	 "* H\n:PROPERTIES:\n:A: 1\n:END:\n\n:PROPERTIES:\n<point>:A: 2\n:END:"
+         "* H\n:PROPERTIES:\n:A: 1\n:END:\n\n:PROPERTIES:\n<point>:A: 2\n:END:"
        (org-fold-reveal)
        (org-toggle-custom-properties-visibility)
        (org-invisible-p2)))))
@@ -3702,7 +3702,7 @@ Foo Bar
 		 (region-beginning)))))))
 
 
- \f
+\f
 ;;; Miscellaneous
 
 (ert-deftest test-org/sort-entries ()
@@ -5004,9 +5004,9 @@ asd
   (should
    (= 2
       (org-test-with-temp-text
-	  "* H\n:PROPERTIES:\n:prop: value\n:END:\n<point>P1"
-	(org-backward-paragraph)
-	(org-current-line))))
+          "* H\n:PROPERTIES:\n:prop: value\n:END:\n<point>P1"
+        (org-backward-paragraph)
+        (org-current-line))))
   ;; In a plain list with one item every line, skip the whole list,
   ;; even with point in the middle of the list.
   (should
@@ -5043,21 +5043,21 @@ asd
   (should
    (= 1
       (org-test-with-temp-text
-	  "#+begin_comment\n<point>L1\n\nL2\n\nL3\n#+end_comment"
-	(org-backward-paragraph)
-	(org-current-line))))
+          "#+begin_comment\n<point>L1\n\nL2\n\nL3\n#+end_comment"
+        (org-backward-paragraph)
+        (org-current-line))))
   (should
    (= 2
       (org-test-with-temp-text
-	  "#+begin_verse\nL1\n\n<point>L2\n\nL3\n#+end_verse"
-	(org-backward-paragraph)
-	(org-current-line))))
+          "#+begin_verse\nL1\n\n<point>L2\n\nL3\n#+end_verse"
+        (org-backward-paragraph)
+        (org-current-line))))
   (should
    (= 3
       (org-test-with-temp-text
-	  "#+begin_src emacs-lisp\nL1\n\nL2\n\n<point>L3\n#+end_src"
-	(org-backward-paragraph)
-	(org-current-line))))
+          "#+begin_src emacs-lisp\nL1\n\nL2\n\n<point>L3\n#+end_src"
+        (org-backward-paragraph)
+        (org-current-line))))
   ;; When called from the opening line itself, however, move to
   ;; beginning of block.
   (should
@@ -5335,7 +5335,7 @@ Outside."
    (equal
     "#+BEGIN_CENTER\n#+B: 2\n#+A: 1\n#+END_CENTER"
     (org-test-with-temp-text
-	"#+BEGIN_CENTER\n#+A: 1\n<point>#+B: 2\n#+END_CENTER"
+        "#+BEGIN_CENTER\n#+A: 1\n<point>#+B: 2\n#+END_CENTER"
       (org-drag-element-backward)
       (buffer-string))))
   ;; Preserve blank lines.
@@ -5375,7 +5375,7 @@ Outside."
    (equal '((63 . 82) (26 . 48))
           (let ((org-fold-core-style 'text-properties))
 	    (org-test-with-temp-text
-             "
+                "
 #+BEGIN_CENTER
 Text.
 #+END_CENTER
@@ -5383,23 +5383,23 @@ Text.
   #+BEGIN_QUOTE
   Text.
   #+END_QUOTE"
-	     (while (search-forward "BEGIN_" nil t) (org-cycle))
-	     (search-backward "- item 1")
-	     (org-drag-element-backward)
-             (let (regions)
-               (goto-char (point-min))
-               (while (< (point) (point-max))
-	         (let ((region (org-fold-get-region-at-point)))
-                   (if (not region)
-                       (goto-char (org-fold-next-folding-state-change))
-                     (goto-char (cdr region))
-                     (push region regions))))
-               regions)))))
+	      (while (search-forward "BEGIN_" nil t) (org-cycle))
+	      (search-backward "- item 1")
+	      (org-drag-element-backward)
+              (let (regions)
+                (goto-char (point-min))
+                (while (< (point) (point-max))
+	          (let ((region (org-fold-get-region-at-point)))
+                    (if (not region)
+                        (goto-char (org-fold-next-folding-state-change))
+                      (goto-char (cdr region))
+                      (push region regions))))
+                regions)))))
   (should
    (equal '((26 . 48) (63 . 82))
           (let ((org-fold-core-style 'overlays))
 	    (org-test-with-temp-text
-             "
+                "
 #+BEGIN_CENTER
 Text.
 #+END_CENTER
@@ -5407,11 +5407,11 @@ Text.
   #+BEGIN_QUOTE
   Text.
   #+END_QUOTE"
-             (while (search-forward "BEGIN_" nil t) (org-cycle))
-	     (search-backward "- item 1")
-	     (org-drag-element-backward)
-	     (mapcar (lambda (ov) (cons (overlay-start ov) (overlay-end ov)))
-		     (overlays-in (point-min) (point-max)))))))
+              (while (search-forward "BEGIN_" nil t) (org-cycle))
+	      (search-backward "- item 1")
+	      (org-drag-element-backward)
+	      (mapcar (lambda (ov) (cons (overlay-start ov) (overlay-end ov)))
+		      (overlays-in (point-min) (point-max)))))))
   ;; Pathological case: handle call with point in blank lines right
   ;; after a headline.
   (should
@@ -5450,7 +5450,7 @@ Text.
   ;; 5. Preserve visibility of elements and their contents.
   (let ((org-fold-core-style 'text-properties))
     (org-test-with-temp-text
-     "
+        "
 #+BEGIN_CENTER
 Text.
 #+END_CENTER
@@ -5458,24 +5458,24 @@ Text.
   #+BEGIN_QUOTE
   Text.
   #+END_QUOTE"
-     (while (search-forward "BEGIN_" nil t) (org-cycle))
-     (search-backward "#+BEGIN_CENTER")
-     (org-drag-element-forward)
-     (should
-      (equal
-       '((63 . 82) (26 . 48))
-       (let (regions)
-         (goto-char (point-min))
-         (while (< (point) (point-max))
-	   (let ((region (org-fold-get-region-at-point)))
-             (if (not region)
-                 (goto-char (org-fold-next-folding-state-change))
-               (goto-char (cdr region))
-               (push region regions))))
-         regions)))))
+      (while (search-forward "BEGIN_" nil t) (org-cycle))
+      (search-backward "#+BEGIN_CENTER")
+      (org-drag-element-forward)
+      (should
+       (equal
+        '((63 . 82) (26 . 48))
+        (let (regions)
+          (goto-char (point-min))
+          (while (< (point) (point-max))
+	    (let ((region (org-fold-get-region-at-point)))
+              (if (not region)
+                  (goto-char (org-fold-next-folding-state-change))
+                (goto-char (cdr region))
+                (push region regions))))
+          regions)))))
   (let ((org-fold-core-style 'overlays))
     (org-test-with-temp-text
-     "
+        "
 #+BEGIN_CENTER
 Text.
 #+END_CENTER
@@ -5483,14 +5483,14 @@ Text.
   #+BEGIN_QUOTE
   Text.
   #+END_QUOTE"
-     (while (search-forward "BEGIN_" nil t) (org-cycle))
-     (search-backward "#+BEGIN_CENTER")
-     (org-drag-element-forward)
-     (should
-      (equal
-       '((26 . 48) (63 . 82))
-       (mapcar (lambda (ov) (cons (overlay-start ov) (overlay-end ov)))
-	       (overlays-in (point-min) (point-max))))))))
+      (while (search-forward "BEGIN_" nil t) (org-cycle))
+      (search-backward "#+BEGIN_CENTER")
+      (org-drag-element-forward)
+      (should
+       (equal
+        '((26 . 48) (63 . 82))
+        (mapcar (lambda (ov) (cons (overlay-start ov) (overlay-end ov)))
+	        (overlays-in (point-min) (point-max))))))))
 
 (ert-deftest test-org/next-block ()
   "Test `org-next-block' specifications."
@@ -5881,10 +5881,10 @@ Text.
   (should
    (zerop
     (org-test-with-temp-text
-	"* H\n#+BEGIN_SRC emacs-lisp -i\n(+ 1 1)\n#+END_SRC"
+        "* H\n#+BEGIN_SRC emacs-lisp -i\n(+ 1 1)\n#+END_SRC"
       (let ((org-adapt-indentation t)
 	    (org-src-preserve-indentation nil))
-	(org-demote))
+        (org-demote))
       (forward-line 2)
       (org-get-indentation)))))
 
@@ -6060,41 +6060,41 @@ Text.
   (should-not
    (zerop
     (org-test-with-temp-text
-	"** H\n #+BEGIN_SRC emacs-lisp\n(+ 1 1)\n #+END_SRC"
+        "** H\n #+BEGIN_SRC emacs-lisp\n(+ 1 1)\n #+END_SRC"
       (let ((org-adapt-indentation t)
 	    (org-src-preserve-indentation nil)
 	    (org-odd-levels-only nil))
-	(org-promote))
+        (org-promote))
       (forward-line)
       (org-get-indentation))))
   (should
    (zerop
     (org-test-with-temp-text
-	"** H\n #+BEGIN_EXAMPLE\nContents\n #+END_EXAMPLE"
+        "** H\n #+BEGIN_EXAMPLE\nContents\n #+END_EXAMPLE"
       (let ((org-adapt-indentation t)
 	    (org-src-preserve-indentation t)
 	    (org-odd-levels-only nil))
-	(org-promote))
+        (org-promote))
       (forward-line)
       (org-get-indentation))))
   (should
    (zerop
     (org-test-with-temp-text
-	"** H\n #+BEGIN_SRC emacs-lisp\n(+ 1 1)\n #+END_SRC"
+        "** H\n #+BEGIN_SRC emacs-lisp\n(+ 1 1)\n #+END_SRC"
       (let ((org-adapt-indentation t)
 	    (org-src-preserve-indentation t)
 	    (org-odd-levels-only nil))
-	(org-promote))
+        (org-promote))
       (forward-line)
       (org-get-indentation))))
   (should
    (zerop
     (org-test-with-temp-text
-	"** H\n #+BEGIN_SRC emacs-lisp -i\n(+ 1 1)\n #+END_SRC"
+        "** H\n #+BEGIN_SRC emacs-lisp -i\n(+ 1 1)\n #+END_SRC"
       (let ((org-adapt-indentation t)
 	    (org-src-preserve-indentation nil)
 	    (org-odd-levels-only nil))
-	(org-promote))
+        (org-promote))
       (forward-line)
       (org-get-indentation)))))
 
@@ -6143,19 +6143,19 @@ Text.
   (when (featurep 'org-inlinetask)
     (should
      (org-test-with-temp-text
-	 "*** Inlinetask\n<point>DEADLINE: <2014-03-04 tue.>\n*** END"
+         "*** Inlinetask\n<point>DEADLINE: <2014-03-04 tue.>\n*** END"
        (let ((org-inlinetask-min-level 3)) (org-at-planning-p))))
     (should-not
      (org-test-with-temp-text
-	 "*** Inlinetask\n<point>DEADLINE: <2014-03-04 tue.>"
+         "*** Inlinetask\n<point>DEADLINE: <2014-03-04 tue.>"
        (let ((org-inlinetask-min-level 3)) (org-at-planning-p))))
     (should-not
      (org-test-with-temp-text
-	 "* Headline\n*** Inlinetask\n<point>DEADLINE: <2014-03-04 tue.>"
+         "* Headline\n*** Inlinetask\n<point>DEADLINE: <2014-03-04 tue.>"
        (let ((org-inlinetask-min-level 3)) (org-at-planning-p))))
     (should-not
      (org-test-with-temp-text
-	 "* Headline\n*** Inlinetask\n*** END\n<point>DEADLINE: <2014-03-04 tue.>"
+         "* Headline\n*** Inlinetask\n*** END\n<point>DEADLINE: <2014-03-04 tue.>"
        (let ((org-inlinetask-min-level 3)) (org-at-planning-p))))))
 
 (ert-deftest test-org/add-planning-info ()
@@ -6752,21 +6752,21 @@ Paragraph<point>"
   (should
    (= 27
       (org-test-with-temp-text
-	  "* H1\n:DRAWER:\n:A: 1\n:END:\n* H2\n:PROPERTIES:\n:A: 1\n:END:"
-	(org-find-property "A"))))
+          "* H1\n:DRAWER:\n:A: 1\n:END:\n* H2\n:PROPERTIES:\n:A: 1\n:END:"
+        (org-find-property "A"))))
   ;; Return first entry found in buffer.
   (should
    (= 1
       (org-test-with-temp-text
-	  "* H1\n:PROPERTIES:\n:A: 1\n:END:\n* H2\n:PROPERTIES:\n:<point>A: 1\n:END:"
-	(org-find-property "A"))))
+          "* H1\n:PROPERTIES:\n:A: 1\n:END:\n* H2\n:PROPERTIES:\n:<point>A: 1\n:END:"
+        (org-find-property "A"))))
   ;; Only search visible part of the buffer.
   (should
    (= 31
       (org-test-with-temp-text
-	  "* H1\n:PROPERTIES:\n:A: 1\n:END:\n* H2\n:PROPERTIES:\n:<point>A: 1\n:END:"
-	(org-narrow-to-subtree)
-	(org-find-property "A"))))
+          "* H1\n:PROPERTIES:\n:A: 1\n:END:\n* H2\n:PROPERTIES:\n:<point>A: 1\n:END:"
+        (org-narrow-to-subtree)
+        (org-find-property "A"))))
   ;; With optional argument, only find entries with a specific value.
   (should-not
    (org-test-with-temp-text "* H\n:PROPERTIES:\n:A: 1\n:END:"
@@ -6774,14 +6774,14 @@ Paragraph<point>"
   (should
    (= 31
       (org-test-with-temp-text
-	  "* H1\n:PROPERTIES:\n:A: 1\n:END:\n* H2\n:PROPERTIES:\n:A: 2\n:END:"
-	(org-find-property "A" "2"))))
+          "* H1\n:PROPERTIES:\n:A: 1\n:END:\n* H2\n:PROPERTIES:\n:A: 2\n:END:"
+        (org-find-property "A" "2"))))
   ;; Use "nil" for explicit nil values.
   (should
    (= 31
       (org-test-with-temp-text
-	  "* H1\n:PROPERTIES:\n:A: 1\n:END:\n* H2\n:PROPERTIES:\n:A: nil\n:END:"
-	(org-find-property "A" "nil")))))
+          "* H1\n:PROPERTIES:\n:A: 1\n:END:\n* H2\n:PROPERTIES:\n:A: nil\n:END:"
+        (org-find-property "A" "nil")))))
 
 (ert-deftest test-org/entry-delete ()
   "Test `org-entry-delete' specifications."
@@ -6893,25 +6893,25 @@ Paragraph<point>"
    (equal
     "1 2"
     (org-test-with-temp-text
-	":PROPERTIES:\n:A: 1\n:END:\n* H\n:PROPERTIES:\n:A+: 2\n:END:"
+        ":PROPERTIES:\n:A: 1\n:END:\n* H\n:PROPERTIES:\n:A+: 2\n:END:"
       (org-entry-get (point-max) "A" t))))
   (should
    (equal
     "1 2"
     (org-test-with-temp-text
-	"* H\n:PROPERTIES:\n:A: 1\n:END:\n** H2\n:PROPERTIES:\n:A+: 2\n:END:"
+        "* H\n:PROPERTIES:\n:A: 1\n:END:\n** H2\n:PROPERTIES:\n:A+: 2\n:END:"
       (org-entry-get (point-max) "A" t))))
   (should
    (equal
     "1 2"
     (org-test-with-temp-text
-	":PROPERTIES:\n:A: 1\n:END:\n* H1\n* H2\n:PROPERTIES:\n:A+: 2\n:END:"
+        ":PROPERTIES:\n:A: 1\n:END:\n* H1\n* H2\n:PROPERTIES:\n:A+: 2\n:END:"
       (org-entry-get (point-max) "A" t))))
   (should
    (equal
     "1 2"
     (org-test-with-temp-text
-	"* H1\n:PROPERTIES:\n:A: 1\n:END:\n** H2.1\n** H2.2\n:PROPERTIES:\n:A+: 2\n:END:"
+        "* H1\n:PROPERTIES:\n:A: 1\n:END:\n** H2.1\n** H2.2\n:PROPERTIES:\n:A+: 2\n:END:"
       (org-entry-get (point-max) "A" t))))
   (should
    (equal "1"
@@ -6965,30 +6965,30 @@ Paragraph<point>"
   (should
    (equal "0~2"
           (org-test-with-temp-text
-           ":PROPERTIES:\n:A: 0\n:A+: 2\n:END:"
-           (let ((org-property-separators '((("A") . "~"))))
-             (org-entry-get (point) "A")))))
+              ":PROPERTIES:\n:A: 0\n:A+: 2\n:END:"
+            (let ((org-property-separators '((("A") . "~"))))
+              (org-entry-get (point) "A")))))
   ;; Default separator is single space
   (should
    (equal "0 2"
           (org-test-with-temp-text
-           ":PROPERTIES:\n:A: 0\n:B: 1\n:A+: 2\n:B+: 3\n:END:"
-           (let ((org-property-separators '((("B") . "~"))))
-             (org-entry-get (point) "A")))))
+              ":PROPERTIES:\n:A: 0\n:B: 1\n:A+: 2\n:B+: 3\n:END:"
+            (let ((org-property-separators '((("B") . "~"))))
+              (org-entry-get (point) "A")))))
   ;; Regular expression matching for separator
   (should
    (equal "0/2"
           (org-test-with-temp-text
-           ":PROPERTIES:\n:A: 0\n:A+: 2\n:END:"
-           (let ((org-property-separators '((("B") . "~") ("[AC]" . "/"))))
-             (org-entry-get (point) "A")))))
+              ":PROPERTIES:\n:A: 0\n:A+: 2\n:END:"
+            (let ((org-property-separators '((("B") . "~") ("[AC]" . "/"))))
+              (org-entry-get (point) "A")))))
   ;; Separator works with inheritance
   (should
    (equal "1~2"
           (org-test-with-temp-text
-           "* H\n:PROPERTIES:\n:A: 1\n:END:\n** H2\n:PROPERTIES:\n:A+: 2\n:END:"
-           (let ((org-property-separators '((("A") . "~"))))
-             (org-entry-get (point-max) "A" t))))))
+              "* H\n:PROPERTIES:\n:A: 1\n:END:\n** H2\n:PROPERTIES:\n:A+: 2\n:END:"
+            (let ((org-property-separators '((("A") . "~"))))
+              (org-entry-get (point-max) "A" t))))))
 
 (ert-deftest test-org/entry-properties ()
   "Test `org-entry-properties' specifications."
@@ -7387,13 +7387,13 @@ Paragraph<point>"
   (should
    (equal "cat1"
 	  (org-test-with-temp-text
-	   ":PROPERTIES:\n:CATEGORY: cat1\n:END:"
-           (org-get-category))))
+	      ":PROPERTIES:\n:CATEGORY: cat1\n:END:"
+            (org-get-category))))
   (should
    (equal "cat1"
 	  (org-test-with-temp-text
-	   "* H\n:PROPERTIES:\n:CATEGORY: cat1\n:END:"
-	   (org-get-category))))
+	      "* H\n:PROPERTIES:\n:CATEGORY: cat1\n:END:"
+	    (org-get-category))))
   ;; Even though property-inheritance is deactivated, category
   ;; property should be inherited.  As described in
   ;; `org-use-property-inheritance'.
@@ -7401,20 +7401,20 @@ Paragraph<point>"
    (equal "cat1"
           (let ((org-use-property-inheritance nil))
 	    (org-test-with-temp-text
-	     ":PROPERTIES:\n:CATEGORY: cat1\n:END:\n<point>* H"
-	     (org-get-category)))))
+	        ":PROPERTIES:\n:CATEGORY: cat1\n:END:\n<point>* H"
+	      (org-get-category)))))
   (should
    (equal "cat1"
           (let ((org-use-property-inheritance t))
 	    (org-test-with-temp-text
-	     ":PROPERTIES:\n:CATEGORY: cat1\n:END:\n<point>* H"
-	     (org-get-category)))))
+	        ":PROPERTIES:\n:CATEGORY: cat1\n:END:\n<point>* H"
+	      (org-get-category)))))
   (should
    (equal "cat2"
           (let ((org-use-property-inheritance t))
 	    (org-test-with-temp-text
-	     ":PROPERTIES:\n:CATEGORY: cat1\n:END:\n<point>* H\n:PROPERTIES:\n:CATEGORY: cat2\n:END:\n"
-	     (org-get-category))))))
+	        ":PROPERTIES:\n:CATEGORY: cat1\n:END:\n<point>* H\n:PROPERTIES:\n:CATEGORY: cat2\n:END:\n"
+	      (org-get-category))))))
 
 \f
 ;;; Refile
@@ -7530,19 +7530,19 @@ Paragraph<point>"
   ;; document title
   (should
    (equal '("T" "T/H1")
-     (org-test-with-temp-text-in-file "#+title: T\n* H1"
-      (let* ((org-refile-use-outline-path 'title)
-             (org-refile-targets `((nil :level . 1))))
-        (mapcar #'car (org-refile-get-targets))))))
+          (org-test-with-temp-text-in-file "#+title: T\n* H1"
+            (let* ((org-refile-use-outline-path 'title)
+                   (org-refile-targets `((nil :level . 1))))
+              (mapcar #'car (org-refile-get-targets))))))
   ;; When `org-refile-use-outline-path' is `title' validate that
   ;; deeper levels are correctly reported too (the same behaviour as
   ;; 'file)
   (should
    (equal '("T" "T/H1" "T/H1/H2" "T/H1/H2/H3" "T/H1")
-     (org-test-with-temp-text-in-file "#+title: T\n* H1\n** H2\n*** H3\n* H1"
-       (let ((org-refile-use-outline-path 'title)
-             (org-refile-targets `((nil :maxlevel . 3))))
-         (mapcar #'car (org-refile-get-targets))))))
+          (org-test-with-temp-text-in-file "#+title: T\n* H1\n** H2\n*** H3\n* H1"
+            (let ((org-refile-use-outline-path 'title)
+                  (org-refile-targets `((nil :maxlevel . 3))))
+              (mapcar #'car (org-refile-get-targets))))))
   ;; When `org-refile-use-outline-path' is `title' and document do not
   ;; have an extracted document title, return just the file name
   (should
@@ -7557,28 +7557,28 @@ Paragraph<point>"
   ;; a title
   (should
    (equal '("T" "T/H1")
-     (org-test-with-temp-text "#+title: T\n* H1\n** H2"
-      (let* ((org-refile-use-outline-path 'title)
-             (org-refile-targets `((nil :level . 1))))
-      (mapcar #'car (org-refile-get-targets))))))
+          (org-test-with-temp-text "#+title: T\n* H1\n** H2"
+            (let* ((org-refile-use-outline-path 'title)
+                   (org-refile-targets `((nil :level . 1))))
+              (mapcar #'car (org-refile-get-targets))))))
   ;; When `org-refile-use-outline-path' is `title' and there are two
   ;; title keywords in the file, titles are concatenated into a single
   ;; one.
   (should
    (equal '("T1 T2" "T1 T2/H1")
-     (org-test-with-temp-text "#+title: T1\n#+title: T2\n* H1\n** H2"
-       (let* ((org-refile-use-outline-path 'title)
-              (org-refile-targets `((nil :level . 1))))
-       (mapcar #'car (org-refile-get-targets))))))
+          (org-test-with-temp-text "#+title: T1\n#+title: T2\n* H1\n** H2"
+            (let* ((org-refile-use-outline-path 'title)
+                   (org-refile-targets `((nil :level . 1))))
+              (mapcar #'car (org-refile-get-targets))))))
   ;; When `org-refile-use-outline-path' is `title' and there are two
   ;; title keywords in the file, titles are concatenated into a single
   ;; one even if they are in the middle of the file.
   (should
    (equal '("T1 T2" "T1 T2/H1")
-     (org-test-with-temp-text "#+title: T1\n* H1\n** H2\n#+title: T2\n"
-       (let* ((org-refile-use-outline-path 'title)
-              (org-refile-targets `((nil :level . 1))))
-       (mapcar #'car (org-refile-get-targets)))))))
+          (org-test-with-temp-text "#+title: T1\n* H1\n** H2\n#+title: T2\n"
+            (let* ((org-refile-use-outline-path 'title)
+                   (org-refile-targets `((nil :level . 1))))
+              (mapcar #'car (org-refile-get-targets)))))))
 
 (ert-deftest test-org/refile ()
   "Test `org-refile' specifications."
@@ -8469,13 +8469,13 @@ Paragraph<point>"
     "* KWD2 H"
     (let ((org-todo-keywords '((sequence "KWD1" "KWD2" "DONE"))))
       (org-test-with-temp-text
-	  "* KWD2 H
+          "* KWD2 H
 :PROPERTIES:
 :REPEAT_TO_STATE: KWD2
 :END:
 <2012-03-29 Thu +2y>"
-	(org-todo "DONE")
-	(buffer-string)))))
+        (org-todo "DONE")
+        (buffer-string)))))
   ;; When switching to DONE state, update base date.  If there are
   ;; multiple repeated time stamps, update them all.
   (should
@@ -8490,9 +8490,9 @@ Paragraph<point>"
     "<2015-03-04 .* \\+1y>"
     (let ((org-todo-keywords '((sequence "TODO" "DONE"))))
       (org-test-with-temp-text
-	  "* TODO H\n<2012-03-29 Thu. +2y>\n<2014-03-04 Tue +1y>"
-	(org-todo "DONE")
-	(buffer-string)))))
+          "* TODO H\n<2012-03-29 Thu. +2y>\n<2014-03-04 Tue +1y>"
+        (org-todo "DONE")
+        (buffer-string)))))
   ;; Throw an error if repeater unit is the hour and no time is
   ;; provided in the timestamp.
   (should-error
@@ -8506,25 +8506,25 @@ Paragraph<point>"
     (regexp-quote "<2014-03-04 02:00 +8h>")
     (org-test-without-dow
      (org-test-at-time "<2014-03-04 02:35>"
-      (org-test-with-temp-text "* TODO H\n<2014-03-03 18:00 +8h>"
-	(org-todo "DONE")
-	(buffer-string))))))
+       (org-test-with-temp-text "* TODO H\n<2014-03-03 18:00 +8h>"
+	 (org-todo "DONE")
+	 (buffer-string))))))
   (should
    (string-match-p
     (regexp-quote "<2014-03-04 10:00 ++8h>")
     (org-test-without-dow
      (org-test-at-time "<2014-03-04 02:35>"
-      (org-test-with-temp-text "* TODO H\n<2014-03-03 18:00 ++8h>"
-	(org-todo "DONE")
-	(buffer-string))))))
+       (org-test-with-temp-text "* TODO H\n<2014-03-03 18:00 ++8h>"
+	 (org-todo "DONE")
+	 (buffer-string))))))
   (should
    (string-match-p
     (regexp-quote "<2014-03-04 10:35 .+8h>")
     (org-test-without-dow
      (org-test-at-time "<2014-03-04 02:35>"
-      (org-test-with-temp-text "* TODO H\n<2014-03-03 18:00 .+8h>"
-	(org-todo "DONE")
-	(buffer-string))))))
+       (org-test-with-temp-text "* TODO H\n<2014-03-03 18:00 .+8h>"
+	 (org-todo "DONE")
+	 (buffer-string))))))
   ;; Handle `org-extend-today-until'.
   (should
    (string-match-p
@@ -8532,75 +8532,75 @@ Paragraph<point>"
     (let ((org-extend-today-until 4))
       (org-test-without-dow
        (org-test-at-time "<2014-03-04 02:35>"
-        (org-test-with-temp-text "* TODO H\n<2014-03-03 ++1d>"
-	  (org-todo "DONE")
-	  (buffer-string)))))))
+         (org-test-with-temp-text "* TODO H\n<2014-03-03 ++1d>"
+	   (org-todo "DONE")
+	   (buffer-string)))))))
   (should
    (string-match-p
     (regexp-quote "<2014-03-06 17:00 ++1d>")
     (let ((org-extend-today-until 4))
       (org-test-without-dow
        (org-test-at-time "<2014-03-05 18:00>"
-        (org-test-with-temp-text "* TODO H\n<2014-03-04 17:00 ++1d>"
-	  (org-todo "DONE")
-	  (buffer-string)))))))
+         (org-test-with-temp-text "* TODO H\n<2014-03-04 17:00 ++1d>"
+	   (org-todo "DONE")
+	   (buffer-string)))))))
   (should
    (string-match-p
     (regexp-quote "<2014-03-04 10:00 ++8h>")
     (let ((org-extend-today-until 4))
       (org-test-without-dow
        (org-test-at-time "<2014-03-04 02:35>"
-        (org-test-with-temp-text "* TODO H\n<2014-03-03 18:00 ++8h>"
-	  (org-todo "DONE")
-	  (buffer-string)))))))
+         (org-test-with-temp-text "* TODO H\n<2014-03-03 18:00 ++8h>"
+	   (org-todo "DONE")
+	   (buffer-string)))))))
   (should
    (string-match-p
     (regexp-quote "<2014-03-04 18:00 .+1d>")
     (let ((org-extend-today-until 4))
       (org-test-without-dow
        (org-test-at-time "<2014-03-04 02:35>"
-        (org-test-with-temp-text "* TODO H\n<2014-03-03 18:00 .+1d>"
-	  (org-todo "DONE")
-	  (buffer-string)))))))
+         (org-test-with-temp-text "* TODO H\n<2014-03-03 18:00 .+1d>"
+	   (org-todo "DONE")
+	   (buffer-string)))))))
   (should
    (string-match-p
     (regexp-quote "<2014-03-04 10:35 .+8h>")
     (let ((org-extend-today-until 4))
       (org-test-without-dow
        (org-test-at-time "<2014-03-04 02:35>"
-        (org-test-with-temp-text "* TODO H\n<2014-03-03 18:00 .+8h>"
-	  (org-todo "DONE")
-	  (buffer-string)))))))
+         (org-test-with-temp-text "* TODO H\n<2014-03-03 18:00 .+8h>"
+	   (org-todo "DONE")
+	   (buffer-string)))))))
   ;; Do not repeat inactive time stamps with a repeater.
   (should-not
    (string-match-p
     "\\[2014-03-29 .* \\+2y\\]"
     (let ((org-todo-keywords '((sequence "TODO" "DONE"))))
       (org-test-with-temp-text
-	  "* TODO H\n[2012-03-29 Thu. +2y]"
-	(org-todo "DONE")
-	(buffer-string)))))
+          "* TODO H\n[2012-03-29 Thu. +2y]"
+        (org-todo "DONE")
+        (buffer-string)))))
   ;; Do not repeat commented time stamps.
   (should-not
    (string-prefix-p
     "<2015-03-04 .* \\+1y>"
     (let ((org-todo-keywords '((sequence "TODO" "DONE"))))
       (org-test-with-temp-text
-	  "* TODO H\n<2012-03-29 Thu +2y>\n# <2014-03-04 Tue +1y>"
-	(org-todo "DONE")
-	(buffer-string)))))
+          "* TODO H\n<2012-03-29 Thu +2y>\n# <2014-03-04 Tue +1y>"
+        (org-todo "DONE")
+        (buffer-string)))))
   (should-not
    (string-prefix-p
     "<2015-03-04 .* \\+1y>"
     (let ((org-todo-keywords '((sequence "TODO" "DONE"))))
       (org-test-with-temp-text
-	  "* TODO H
+          "* TODO H
 <2012-03-29 Thu. +2y>
 #+BEGIN_EXAMPLE
 <2014-03-04 Tue +1y>
 #+END_EXAMPLE"
-	(org-todo "DONE")
-	(buffer-string)))))
+        (org-todo "DONE")
+        (buffer-string)))))
   ;; When `org-log-repeat' is non-nil or there is a CLOCK in the
   ;; entry, record time of last repeat.
   (should-not
@@ -8640,9 +8640,9 @@ Paragraph<point>"
     "^SCHEDULED:"
     (let ((org-todo-keywords '((sequence "TODO" "DONE"))))
       (org-test-with-temp-text
-	  "* TODO H\nSCHEDULED: <2014-03-04 Tue>\n<2012-03-29 Thu +2y>"
-	(org-todo "DONE")
-	(buffer-string)))))
+          "* TODO H\nSCHEDULED: <2014-03-04 Tue>\n<2012-03-29 Thu +2y>"
+        (org-todo "DONE")
+        (buffer-string)))))
   ;; Properly advance repeater even when a clock entry is specified
   ;; and `org-log-repeat' is nil.
   (should
@@ -8651,11 +8651,11 @@ Paragraph<point>"
     (let ((org-log-repeat nil)
 	  (org-todo-keywords '((sequence "TODO" "DONE"))))
       (org-test-with-temp-text
-	  "* TODO H
+          "* TODO H
 SCHEDULED: <2012-03-29 Thu +2y>
 CLOCK: [2012-03-29 Thu 10:00]--[2012-03-29 Thu 16:40] =>  6:40"
-	(org-todo "DONE")
-	(buffer-string)))))
+        (org-todo "DONE")
+        (buffer-string)))))
   ;; Make sure that logbook state change record does not get
   ;; duplicated when `org-log-repeat' `org-log-done' are non-nil.
   (should
@@ -8695,11 +8695,11 @@ SCHEDULED: <2021-06-15 Tue +1d>"
   (should
    (string=
     (format
-    "* DONE task
+     "* DONE task
 CLOSED: %s"
-    (org-test-with-temp-text ""
-      (org-insert-timestamp (current-time) t t)
-      (buffer-string)))
+     (org-test-with-temp-text ""
+       (org-insert-timestamp (current-time) t t)
+       (buffer-string)))
     (let ((org-log-done 'time)
           (org-log-done-with-time t)
           (org-todo-keywords '((sequence "TODO" "DONE"))))
@@ -8712,11 +8712,11 @@ CLOSED: %s"
   (should
    (string=
     (format
-    "* DONE task
+     "* DONE task
 CLOSED: %s"
-    (org-test-with-temp-text ""
-      (org-insert-timestamp (current-time) nil t)
-      (buffer-string)))
+     (org-test-with-temp-text ""
+       (org-insert-timestamp (current-time) nil t)
+       (buffer-string)))
     (let ((org-log-done 'time)
           (org-log-done-with-time nil)
           (org-todo-keywords '((sequence "TODO" "DONE"))))
@@ -8745,12 +8745,12 @@ CLOSED: %s"
   (should
    (string=
     (format
-    "#+STARTUP: logdone
+     "#+STARTUP: logdone
 * DONE task
 CLOSED: %s"
-    (org-test-with-temp-text ""
-      (org-insert-timestamp (current-time) t t)
-      (buffer-string)))
+     (org-test-with-temp-text ""
+       (org-insert-timestamp (current-time) t t)
+       (buffer-string)))
     (let ((org-log-done nil)
           (org-log-done-with-time t)
           (org-todo-keywords '((sequence "TODO" "DONE"))))
@@ -8783,14 +8783,14 @@ CLOSED: %s"
   (should
    (string=
     (format
-    "* DONE task
+     "* DONE task
 CLOSED: %s
 :PROPERTIES:
 :LOGGING: logdone
 :END:"
-    (org-test-with-temp-text ""
-      (org-insert-timestamp (current-time) t t)
-      (buffer-string)))
+     (org-test-with-temp-text ""
+       (org-insert-timestamp (current-time) t t)
+       (buffer-string)))
     (let ((org-log-done nil)
           (org-log-done-with-time t)
           (org-todo-keywords '((sequence "TODO" "DONE"))))
@@ -9334,27 +9334,27 @@ two
 * One
 "
     (org-test-with-temp-text
-     "* One
+        "* One
 <point>* Two
 two
 "
-     (call-interactively #'org-cut-subtree)
-     (goto-char (point-min))
-     (call-interactively #'org-paste-subtree)
-     (buffer-string))))
+      (call-interactively #'org-cut-subtree)
+      (goto-char (point-min))
+      (call-interactively #'org-paste-subtree)
+      (buffer-string))))
   (should
    (equal
     "* One
 * Two
 "
     (org-test-with-temp-text
-     "* One
+        "* One
 <point>* Two
 "
-     (call-interactively #'org-cut-subtree)
-     (backward-char)
-     (call-interactively #'org-paste-subtree)
-     (buffer-string)))))
+      (call-interactively #'org-cut-subtree)
+      (backward-char)
+      (call-interactively #'org-paste-subtree)
+      (buffer-string)))))
 
 (ert-deftest test-org/org--open-file-format-command ()
   "Test `org--open-file-format-command' helper for `org-open-file'."
-- 
2.42.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Fix indentation in test-org.el
  2023-11-25 11:13 [PATCH] Fix indentation in test-org.el Allen Li
@ 2023-12-04 14:38 ` Ihor Radchenko
  0 siblings, 0 replies; 2+ messages in thread
From: Ihor Radchenko @ 2023-12-04 14:38 UTC (permalink / raw)
  To: Allen Li; +Cc: emacs-orgmode

Allen Li <darkfeline@felesatra.moe> writes:

> The indentation in test-org.el is all over the place.  I've attached a
> patch fixing it.

We generally do not accept whitespace-only changes.
Instead, we prefer to fix whitespace together with other _functional_
change.

This is because such changes make it harder to use git blame.
See the discussion in https://yhetil.org/emacs-devel/E1k8aul-0001mr-Mg@fencepost.gnu.org/

Canceled.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-12-04 14:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-25 11:13 [PATCH] Fix indentation in test-org.el Allen Li
2023-12-04 14:38 ` Ihor Radchenko

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).