Hello,

I have decided to spend my time fixing compile time warnings in the test
files.  If you think that would be a waste of time, I'd have to agree.

I did find some minor things that might actually be important though.
The first 4 patches are legitimate improvements to the codebase in my
opinion.

The remaining 11 patches don't really do anything except silence
warnings.

Locally I have probably another 15 patches not included here to actually
get the number of warnings down to 0.  I figured I'd submit these first
before prettying those up.

Once we do have the number of warnings down to 0, then we might be able
to use the byte compiler to ensure our tests run as expected.  Ensuring
that return values are actually used could be a big help.

Thanks,

Morgan

>From 5cbe1a5f1718e9b9e12520cd8b91168baa99651a Mon Sep 17 00:00:00 2001
From: Morgan Smith <morgan.j.sm...@outlook.com>
Date: Wed, 23 Jul 2025 13:24:37 -0400
Subject: [PATCH 01/15] Testing: Add missing `should's

* testing/lisp/test-ob-scheme.el (test-ob-scheme/tables):
* testing/lisp/test-org-tempo.el (test-org-tempo/completion):
* testing/lisp/test-org.el (test-org/edit-headline):
Add a missing `should'.
---
 testing/lisp/test-ob-scheme.el | 9 +++++----
 testing/lisp/test-org-tempo.el | 5 +++--
 testing/lisp/test-org.el       | 9 +++++----
 3 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/testing/lisp/test-ob-scheme.el b/testing/lisp/test-ob-scheme.el
index 79ce2b453..0fb79ad53 100644
--- a/testing/lisp/test-ob-scheme.el
+++ b/testing/lisp/test-ob-scheme.el
@@ -32,16 +32,17 @@
 
 (ert-deftest test-ob-scheme/tables ()
   "Test table output."
-  (equal "#+begin_src scheme
+  (should
+   (equal "#+begin_src scheme
 '(1 2 3)
 #+end_src
 
 #+RESULTS:
 | 1 | 2 | 3 |
 "
-	 (org-test-with-temp-text "#+begin_src scheme\n'(1 2 3)\n#+end_src"
-	   (org-babel-execute-maybe)
-	   (buffer-string))))
+	  (org-test-with-temp-text "#+begin_src scheme\n'(1 2 3)\n#+end_src"
+	    (org-babel-execute-maybe)
+	    (buffer-string)))))
 
 (ert-deftest test-ob-scheme/verbatim ()
   "Test verbatim output."
diff --git a/testing/lisp/test-org-tempo.el b/testing/lisp/test-org-tempo.el
index 7382b6dc4..800fef234 100644
--- a/testing/lisp/test-org-tempo.el
+++ b/testing/lisp/test-org-tempo.el
@@ -53,11 +53,12 @@ test-org-tempo/completion
 	    (org-cycle)
 	    (buffer-string))))
   ;; Tempo should not expand unknown snippets
-  (equal (org-test-with-temp-text "<k"
+  (should
+   (equal (org-test-with-temp-text "<k"
 	    (org-tempo-setup)
 	    (call-interactively 'org-cycle)
 	    (buffer-string))
-	 "<k"))
+	  "<k")))
 
 (ert-deftest test-org-tempo/space-first-line ()
   "Test space on first line after expansion."
diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el
index 36dea35b7..627c6a90f 100644
--- a/testing/lisp/test-org.el
+++ b/testing/lisp/test-org.el
@@ -3196,10 +3196,11 @@ test-org/edit-headline
 	    (org-edit-headline "B")
 	    (buffer-string))))
   ;; Handle tags.
-  (equal "* B :tag:"
-	 (org-test-with-temp-text "* A :tag:"
-	   (let ((org-tags-column 4)) (org-edit-headline "B"))
-	   (buffer-string))))
+  (should
+   (equal "* B :tag:"
+	  (org-test-with-temp-text "* A :tag:"
+	    (let ((org-tags-column 4)) (org-edit-headline "B"))
+	    (buffer-string)))))
 
 
 
-- 
2.50.1

>From 7954ad095c34d44b8f1fd577e4ca2cc23dd99d9f Mon Sep 17 00:00:00 2001
From: Morgan Smith <morgan.j.sm...@outlook.com>
Date: Wed, 23 Jul 2025 14:11:53 -0400
Subject: [PATCH 02/15] * testing/lisp/test-org-attach-git.el: Remove git annex
 directory

* testing/lisp/test-org-attach-git.el
(test-org-attach-git/with-annex): Add missing unwindform to delete the
directory afterwards.
---
 testing/lisp/test-org-attach-git.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/testing/lisp/test-org-attach-git.el b/testing/lisp/test-org-attach-git.el
index e8b41fe8c..6b949afb5 100644
--- a/testing/lisp/test-org-attach-git.el
+++ b/testing/lisp/test-org-attach-git.el
@@ -37,7 +37,8 @@ test-org-attach-git/with-annex
              (shell-command "git config --global user.name \"John Doe\"")
 	     (shell-command "git init")
 	     (shell-command "git annex init")
-	     ,@body)))))
+	     ,@body))
+       (delete-directory tmpdir 'recursive))))
 
 (ert-deftest test-org-attach-git/use-annex ()
   (test-org-attach-git/with-annex
-- 
2.50.1

>From b0705f5485ee4584a86f8d89d24643ba14288981 Mon Sep 17 00:00:00 2001
From: Morgan Smith <morgan.j.sm...@outlook.com>
Date: Wed, 23 Jul 2025 13:17:12 -0400
Subject: [PATCH 03/15] Change uses of deprecated `org-show-context(-detail)'

* doc/org-manual.org: Add `org-fold-show-context-detail' to vindex.
* doc/org-guide.org:
* lisp/ol.el:
* lisp/org-agenda.el:
* lisp/org-compat.el:
* lisp/org-fold.el:
* testing/lisp/test-org-fold.el:
* testing/lisp/test-org.el:
* testing/org-test.el:
Change all uses of `org-show-context' to `org-fold-show-context'.
Change all uses of `org-show-context-detail' to
`org-fold-show-context-detail'.
---
 doc/org-guide.org             | 2 +-
 doc/org-manual.org            | 5 +++--
 lisp/ol.el                    | 2 +-
 lisp/org-agenda.el            | 2 +-
 lisp/org-compat.el            | 2 +-
 lisp/org-fold.el              | 2 +-
 testing/lisp/test-org-fold.el | 4 ++--
 testing/lisp/test-org.el      | 4 ++--
 testing/org-test.el           | 8 ++++----
 9 files changed, 16 insertions(+), 15 deletions(-)

diff --git a/doc/org-guide.org b/doc/org-guide.org
index cc7155c61..5e59fb025 100644
--- a/doc/org-guide.org
+++ b/doc/org-guide.org
@@ -2657,7 +2657,7 @@ * Footnotes
 [fn:2] If you do not want the line to be split, customize the variable
 ~org-M-RET-may-split-line~.
 
-[fn:3] See also the variable ~org-show-context-detail~ to decide how
+[fn:3] See also the variable ~org-fold-show-context-detail~ to decide how
 much context is shown around each match.
 
 [fn:4] The corresponding in-buffer setting is =#+STARTUP: logdone=.
diff --git a/doc/org-manual.org b/doc/org-manual.org
index 5a4045271..05299bbf9 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -1028,12 +1028,13 @@ ** Sparse Trees
 #+cindex: folding, sparse trees
 #+cindex: occur, command
 
+#+vindex: org-fold-show-context-detail
 #+vindex: org-show-context-detail
 An important feature of Org mode is the ability to construct /sparse
 trees/ for selected information in an outline tree, so that the entire
 document is folded as much as possible, but the selected information
 is made visible along with the headline structure above it[fn:: See
-also the variable ~org-show-context-detail~ to decide how much context
+also the variable ~org-fold-show-context-detail~ to decide how much context
 is shown around each match.].  Just try it out and you will see
 immediately how it works.
 
@@ -11001,7 +11002,7 @@ *** Setting options for custom commands
          ((org-agenda-sorting-strategy '(priority-down))
           (org-agenda-prefix-format "  Mixed: ")))
         ("U" tags-tree "+boss-urgent"
-         ((org-show-context-detail 'minimal)))
+         ((org-fold-show-context-detail 'minimal)))
         ("N" search ""
          ((org-agenda-files '("~org/notes.org"))
           (org-agenda-text-search-extra-files nil)))))
diff --git a/lisp/ol.el b/lisp/ol.el
index 9ee080e0e..7888230ac 100644
--- a/lisp/ol.el
+++ b/lisp/ol.el
@@ -1636,7 +1636,7 @@ org-link-search
 When AVOID-POS is given, ignore matches near that position.
 
 When optional argument STEALTH is non-nil, do not modify
-visibility around point, thus ignoring `org-show-context-detail'
+visibility around point, thus ignoring `org-fold-show-context-detail'
 variable.
 
 When optional argument NEW-HEADING-CONTAINER is an element, any
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index a10ae1888..3497a9763 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -9665,7 +9665,7 @@ org-agenda-cycle-counter
 (defun org-agenda-cycle-show (&optional n)
   "Show the current entry in another window, with default settings.
 
-Default settings are taken from `org-show-context-detail'.  When
+Default settings are taken from `org-fold-show-context-detail'.  When
 use repeatedly in immediate succession, the remote entry will
 cycle through visibility
 
diff --git a/lisp/org-compat.el b/lisp/org-compat.el
index 189b0ac1d..4173a495a 100644
--- a/lisp/org-compat.el
+++ b/lisp/org-compat.el
@@ -1902,7 +1902,7 @@ org--ecb-show-context
 ;;;; Simple
 
 (defun org-mark-jump-unhide (&rest _)
-  "Make the point visible with `org-show-context' after jumping to the mark."
+  "Make the point visible with `org-fold-show-context' after jumping to the mark."
   (when (and (derived-mode-p 'org-mode)
 	     (org-invisible-p))
     (org-fold-show-context 'mark-goto)))
diff --git a/lisp/org-fold.el b/lisp/org-fold.el
index 4b97d9455..ddc666d51 100644
--- a/lisp/org-fold.el
+++ b/lisp/org-fold.el
@@ -651,7 +651,7 @@ org-fold-show-set-visibility
   "Set visibility around point according to DETAIL.
 DETAIL is either nil, `minimal', `local', `ancestors',
 `ancestors-full', `lineage', `tree', `canonical' or t.  See
-`org-show-context-detail' for more information."
+`org-fold-show-context-detail' for more information."
   ;; Show current heading and possibly its entry, following headline
   ;; or all children.
   (if (and (org-at-heading-p) (not (eq detail 'local)))
diff --git a/testing/lisp/test-org-fold.el b/testing/lisp/test-org-fold.el
index 809738f6c..8e08a7ca3 100644
--- a/testing/lisp/test-org-fold.el
+++ b/testing/lisp/test-org-fold.el
@@ -713,7 +713,7 @@ test-org-fold/org-fold-display-inline-images
 ** Subheading 2
 [[file:%s]]" org-logo-image org-logo-image org-logo-image)
       (org-overview)
-      (org-show-subtree)
+      (org-fold-show-subtree)
       (org-fold-subtree t)
       (run-hook-with-args 'org-cycle-hook 'folded)
       (should-not org-link-preview-overlays)
@@ -721,7 +721,7 @@ test-org-fold/org-fold-display-inline-images
        (cl-every
         (lambda (ov) (overlay-get ov 'org-image-overlay))
         (overlays-in (point-min) (point-max))))
-      (org-show-subtree)
+      (org-fold-show-subtree)
       (run-hook-with-args 'org-cycle-hook 'subtree)
       (should org-link-preview-overlays)
       (should
diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el
index 627c6a90f..9c0d74f3d 100644
--- a/testing/lisp/test-org.el
+++ b/testing/lisp/test-org.el
@@ -4231,10 +4231,10 @@ test-org/previous-visible-heading
    (org-test-with-temp-text "* Main\n** H1\nFoo\n** H2\nBar\n** H3\nBaz"
      (org-overview)
      (search-forward "H1")
-     (org-show-context 'minimal)
+     (org-fold-show-context 'minimal)
      (org-cycle)
      (search-forward "H3")
-     (org-show-context 'minimal)
+     (org-fold-show-context 'minimal)
      ;; At this point, buffer displays, with point at "|",
      ;;
      ;; * Main
diff --git a/testing/org-test.el b/testing/org-test.el
index 95bf23520..46ec56608 100644
--- a/testing/org-test.el
+++ b/testing/org-test.el
@@ -130,8 +130,8 @@ org-test-at-id
 	     (setq to-be-removed (current-buffer))
 	     (condition-case nil
 		 (progn
-		   (org-show-subtree)
-		   (org-show-all '(blocks)))
+		   (org-fold-show-subtree)
+		   (org-fold-show-all '(blocks)))
 	       (error nil))
 	     (save-restriction ,@body)))
        (unless (or visited-p (not to-be-removed))
@@ -154,8 +154,8 @@ org-test-in-example-file
 	 (condition-case nil
 	     (progn
 	       (outline-next-visible-heading 1)
-	       (org-show-subtree)
-	       (org-show-all '(blocks)))
+	       (org-fold-show-subtree)
+	       (org-fold-show-all '(blocks)))
 	   (error nil))
 	 (setq results (save-restriction ,@body))))
      (unless visited-p
-- 
2.50.1

>From 46b4f70a900036fc4569cf965ec135bc39231149 Mon Sep 17 00:00:00 2001
From: Morgan Smith <morgan.j.sm...@outlook.com>
Date: Wed, 23 Jul 2025 14:09:35 -0400
Subject: [PATCH 04/15] Change uses of deprecated
 `org-export-before-parsing-hook'

* doc/org-manual.org: Add `org-export-before-parsing-functions' to
vindex.
* lisp/org-attach.el:
* lisp/ox.el:
* testing/lisp/test-org-table.el:
* testing/lisp/test-ox.el:
Change all uses of `org-export-before-parsing-hook' to
`org-export-before-parsing-functions'.
---
 doc/org-manual.org             | 1 +
 lisp/org-attach.el             | 2 +-
 lisp/ox.el                     | 4 ++--
 testing/lisp/test-org-table.el | 2 +-
 testing/lisp/test-ox.el        | 6 +++---
 5 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index 05299bbf9..dbe754239 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -16750,6 +16750,7 @@ *** Export hooks
 #+vindex: org-export-before-processing-hook
 #+vindex: org-export-before-processing-functions
 #+vindex: org-export-before-parsing-hook
+#+vindex: org-export-before-parsing-functions
 The export process executes two hooks before the actual exporting
 begins.  The first hook, ~org-export-before-processing-functions~,
 runs before any expansions of macros, Babel code, and include keywords
diff --git a/lisp/org-attach.el b/lisp/org-attach.el
index 267f19c86..881890b8b 100644
--- a/lisp/org-attach.el
+++ b/lisp/org-attach.el
@@ -772,7 +772,7 @@ org-attach-expand
 
 (defun org-attach-expand-links (_)
   "Expand links in current buffer.
-It is meant to be added to `org-export-before-parsing-hook'."
+It is meant to be added to `org-export-before-parsing-functions'."
   (save-excursion
     (while (re-search-forward "attachment:" nil t)
       (let ((link (org-element-context)))
diff --git a/lisp/ox.el b/lisp/ox.el
index d95e031e8..f6063c4ca 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -2176,7 +2176,7 @@ org-export-expand
 ;; `org-export-install-filters' function.
 ;;
 ;; Eventually, two hooks (`org-export-before-processing-hook' and
-;; `org-export-before-parsing-hook') are run at the beginning of the
+;; `org-export-before-parsing-functions') are run at the beginning of the
 ;; export process and just before parsing to allow for heavy structure
 ;; modifications.
 
@@ -3128,7 +3128,7 @@ org-export--annotate-info
     ;; before parsing.
     (goto-char (point-min))
     (save-excursion
-      (run-hook-with-args 'org-export-before-parsing-hook
+      (run-hook-with-args 'org-export-before-parsing-functions
                           (org-export-backend-name backend)))
     (unless (eq modified-tick (buffer-chars-modified-tick))
       (org-set-regexps-and-options)
diff --git a/testing/lisp/test-org-table.el b/testing/lisp/test-org-table.el
index b56d55576..e6fc64abb 100644
--- a/testing/lisp/test-org-table.el
+++ b/testing/lisp/test-org-table.el
@@ -1613,7 +1613,7 @@ test-org-table/to-generic
    (equal
     "a\nb"
     (let* ((fun-list (list (lambda (_backend) (search-forward "a") (insert "hook"))))
-	   (org-export-before-parsing-hook fun-list)
+	   (org-export-before-parsing-functions fun-list)
 	   (org-export-before-processing-hook fun-list))
       (orgtbl-to-generic (org-table-to-lisp "| a |\n|---|\n| b |")
 			 '(:hline nil)))))
diff --git a/testing/lisp/test-ox.el b/testing/lisp/test-ox.el
index 0cc46f84e..279642d94 100644
--- a/testing/lisp/test-ox.el
+++ b/testing/lisp/test-ox.el
@@ -1871,12 +1871,12 @@ test-org-export/before-processing-hook
 			(org-element-property :end object)))))))))
 	(org-export-as (org-test-default-backend)))))))
 
-(ert-deftest test-org-export/before-parsing-hook ()
-  "Test `org-export-before-parsing-hook'."
+(ert-deftest test-org-export/before-parsing-functions ()
+  "Test `org-export-before-parsing-functions'."
   (should
    (equal "Body 1\nBody 2\n"
 	  (org-test-with-temp-text "* Headline 1\nBody 1\n* Headline 2\nBody 2"
-	    (let ((org-export-before-parsing-hook
+	    (let ((org-export-before-parsing-functions
 		   '((lambda (backend)
 		       (goto-char (point-min))
 		       (while (re-search-forward org-outline-regexp-bol nil t)
-- 
2.50.1

>From ccc6037c7fbff45bf033a4924a744bf400c39749 Mon Sep 17 00:00:00 2001
From: Morgan Smith <morgan.j.sm...@outlook.com>
Date: Wed, 23 Jul 2025 14:12:28 -0400
Subject: [PATCH 05/15] Testing: Change use of deprecated `org-flag-subtree'

* testing/lisp/test-org-inlinetask.el
(test-org-inlinetask/folding-directly-consecutive-tasks/1): Use
`org-fold-subtree' instead of deprecated `org-flag-subtree'.
---
 testing/lisp/test-org-inlinetask.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testing/lisp/test-org-inlinetask.el b/testing/lisp/test-org-inlinetask.el
index e31a148a5..fd2a62bd8 100644
--- a/testing/lisp/test-org-inlinetask.el
+++ b/testing/lisp/test-org-inlinetask.el
@@ -147,7 +147,7 @@ test-org-inlinetask/folding-directly-consecutive-tasks/1
 p4
 *************** END
 "
-     (org-flag-subtree t)
+     (org-fold-subtree t)
      (org-cycle)
      (and
       (not (invisible-p (1- (search-forward "p1"))))
-- 
2.50.1

>From f48f15b257aa38e3385978848fe06a4dcc3bf119 Mon Sep 17 00:00:00 2001
From: Morgan Smith <morgan.j.sm...@outlook.com>
Date: Wed, 23 Jul 2025 14:13:05 -0400
Subject: [PATCH 06/15] Testing: Change use of deprecated `org-hide-block-all'

* testing/lisp/test-org-list.el
(test-org-list/move-item-up-contents-visibility): Use
`org-fold-hide-block-all' instead of `org-hide-block-all'.
---
 testing/lisp/test-org-list.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testing/lisp/test-org-list.el b/testing/lisp/test-org-list.el
index db45e66b8..092d960f6 100644
--- a/testing/lisp/test-org-list.el
+++ b/testing/lisp/test-org-list.el
@@ -824,7 +824,7 @@ test-org-list/move-item-up-contents-visibility
   #+BEGIN_CENTER
   Text2
   #+END_CENTER"
-    (org-hide-block-all)
+    (org-fold-hide-block-all)
     (let ((invisible-property-1
 	   (progn
 	     (search-forward "Text1")
-- 
2.50.1

>From 160ccc51ef46011002475e9341a5177c100a4558 Mon Sep 17 00:00:00 2001
From: Morgan Smith <morgan.j.sm...@outlook.com>
Date: Wed, 23 Jul 2025 14:24:38 -0400
Subject: [PATCH 07/15] Testing: Change use of deprecated
 `org-hide-block-toggle'

* testing/lisp/test-org-fold.el (test-org-fold/hide-block-toggle-maybe)
(test-org-fold-with-default-template): Use
`org-fold-hide-block-toggle' instead of `org-hide-block-toggle'.
---
 testing/lisp/test-org-fold.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/testing/lisp/test-org-fold.el b/testing/lisp/test-org-fold.el
index 8e08a7ca3..d9e42bb10 100644
--- a/testing/lisp/test-org-fold.el
+++ b/testing/lisp/test-org-fold.el
@@ -120,9 +120,9 @@ test-org-fold/hide-block-toggle-maybe
   "Test `org-fold-hide-block-toggle' specifications."
   (should
    (org-test-with-temp-text "#+BEGIN: dynamic\nContents\n#+END:"
-     (org-hide-block-toggle)))
+     (org-fold-hide-block-toggle)))
   (should-error
-   (org-test-with-temp-text "Paragraph" (org-hide-block-toggle))))
+   (org-test-with-temp-text "Paragraph" (org-fold-hide-block-toggle))))
 
 (ert-deftest test-org-fold/org-fold-hide-entry ()
   "Test `org-fold-hide-entry' specifications."
@@ -590,7 +590,7 @@ test-org-fold-with-default-template
        (search-forward "FOLDED-DRAWER")
        (org-hide-drawer-toggle t)
        (search-forward "begin_src")
-       (org-hide-block-toggle t)
+       (org-fold-hide-block-toggle t)
        (goto-char 1)
        ,@body)))
 
-- 
2.50.1

>From df3efa9f72f3ee60b45b32b28bca1ec27d6bd280 Mon Sep 17 00:00:00 2001
From: Morgan Smith <morgan.j.sm...@outlook.com>
Date: Wed, 23 Jul 2025 14:33:54 -0400
Subject: [PATCH 08/15] Testing: Change use of deprecated
 `org-hide-drawer-toggle'

* testing/lisp/test-org-fold.el (test-org-fold-with-default-template):
Use `org-fold-hide-drawer-toggle' instead of `org-hide-drawer-toggle'.
---
 testing/lisp/test-org-fold.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testing/lisp/test-org-fold.el b/testing/lisp/test-org-fold.el
index d9e42bb10..dd28a905b 100644
--- a/testing/lisp/test-org-fold.el
+++ b/testing/lisp/test-org-fold.el
@@ -588,7 +588,7 @@ test-org-fold-with-default-template
 "
        (org-cycle)
        (search-forward "FOLDED-DRAWER")
-       (org-hide-drawer-toggle t)
+       (org-fold-hide-drawer-toggle t)
        (search-forward "begin_src")
        (org-fold-hide-block-toggle t)
        (goto-char 1)
-- 
2.50.1

>From f9419288ab791a09e5ec088b99e222bbac37cdbc Mon Sep 17 00:00:00 2001
From: Morgan Smith <morgan.j.sm...@outlook.com>
Date: Wed, 23 Jul 2025 13:20:55 -0400
Subject: [PATCH 09/15] Testing: Use pos-(bol|eol) instead of deprecated
 point-at-(bol|eol)

* testing/lisp/test-ob-R.el:
* testing/lisp/test-ob-emacs-lisp.el:
* testing/lisp/test-ob-lob.el:
* testing/lisp/test-ob-python.el:
* testing/lisp/test-ob.el:
* testing/lisp/test-org-list.el:
* testing/lisp/test-org.el:
* testing/lisp/test-ox.el:
Replace all instances of `point-at-bol' with `pos-bol'.
Replace all instances of `point-at-eol with `pos-eol.
---
 testing/lisp/test-ob-R.el          |  4 +-
 testing/lisp/test-ob-emacs-lisp.el |  8 ++--
 testing/lisp/test-ob-lob.el        |  2 +-
 testing/lisp/test-ob-python.el     |  2 +-
 testing/lisp/test-ob.el            | 62 +++++++++++++++---------------
 testing/lisp/test-org-list.el      | 14 +++----
 testing/lisp/test-org.el           |  8 ++--
 testing/lisp/test-ox.el            |  2 +-
 8 files changed, 51 insertions(+), 51 deletions(-)

diff --git a/testing/lisp/test-ob-R.el b/testing/lisp/test-ob-R.el
index cecdc7de8..aa905d21c 100644
--- a/testing/lisp/test-ob-R.el
+++ b/testing/lisp/test-ob-R.el
@@ -99,13 +99,13 @@ test-ob-R/results-file
      (goto-char (point-min)) (org-babel-execute-maybe)
      (org-babel-goto-named-result "TESTSRC") (forward-line 1)
      (should (string= "[[file:junk/test.org]]"
-		      (buffer-substring-no-properties (point-at-bol) (point-at-eol))))
+		      (buffer-substring-no-properties (pos-bol) (pos-eol))))
      (goto-char (point-min)) (forward-line 1)
      (insert "#+header: :session\n")
      (goto-char (point-min)) (org-babel-execute-maybe)
      (org-babel-goto-named-result "TESTSRC") (forward-line 1)
      (should (string= "[[file:junk/test.org]]"
-		      (buffer-substring-no-properties (point-at-bol) (point-at-eol)))))))
+		      (buffer-substring-no-properties (pos-bol) (pos-eol)))))))
 
 
 
diff --git a/testing/lisp/test-ob-emacs-lisp.el b/testing/lisp/test-ob-emacs-lisp.el
index 6661e5928..4fcedbc7c 100644
--- a/testing/lisp/test-ob-emacs-lisp.el
+++ b/testing/lisp/test-ob-emacs-lisp.el
@@ -35,7 +35,7 @@ ob-emacs-lisp/commented-last-block-line-no-var
     (should
      (string=
       ""
-      (buffer-substring-no-properties (point-at-bol) (point-at-eol)))))
+      (buffer-substring-no-properties (pos-bol) (pos-eol)))))
   (org-test-with-temp-text-in-file "
 #+begin_src emacs-lisp
 \"some text\";;
@@ -48,7 +48,7 @@ ob-emacs-lisp/commented-last-block-line-no-var
     (should
      (string=
       ": some text"
-      (buffer-substring-no-properties (point-at-bol) (point-at-eol))))))
+      (buffer-substring-no-properties (pos-bol) (pos-eol))))))
 
 (ert-deftest ob-emacs-lisp/commented-last-block-line-with-var ()
   (org-test-with-temp-text-in-file "
@@ -61,7 +61,7 @@ ob-emacs-lisp/commented-last-block-line-with-var
     (forward-line)
     (should (string=
 	     ""
-	     (buffer-substring-no-properties (point-at-bol) (point-at-eol))))))
+	     (buffer-substring-no-properties (pos-bol) (pos-eol))))))
 
 (ert-deftest ob-emacs-lisp/commented-last-block-line ()
   (should
@@ -83,7 +83,7 @@ ob-emacs-lisp/dynamic-lexical-execute
 		(org-babel-execute-maybe)
 		(re-search-forward "results" nil t)
 		(re-search-forward ": " nil t)
-		(buffer-substring-no-properties (point) (point-at-eol)))))
+		(buffer-substring-no-properties (point) (pos-eol)))))
 
     (should (string= "dynamic" (execute "
 #+begin_src emacs-lisp :lexical no :results verbatim
diff --git a/testing/lisp/test-ob-lob.el b/testing/lisp/test-ob-lob.el
index 188fee4c0..67efa181f 100644
--- a/testing/lisp/test-ob-lob.el
+++ b/testing/lisp/test-ob-lob.el
@@ -61,7 +61,7 @@ test-ob-lob/call-with-header-arguments
       (org-test-at-id "fab7e291-fde6-45fc-bf6e-a485b8bca2f0"
 	(move-beginning-of-line 1)
 	(forward-line 6)
-	(message (buffer-substring (point-at-bol) (point-at-eol)))
+	(message (buffer-substring (pos-bol) (pos-eol)))
 	(should
 	 (string= "testing" (org-babel-execute-src-block
 			     nil (org-babel-lob-get-info))))
diff --git a/testing/lisp/test-ob-python.el b/testing/lisp/test-ob-python.el
index 415f877ac..5eeb063f5 100644
--- a/testing/lisp/test-ob-python.el
+++ b/testing/lisp/test-ob-python.el
@@ -275,7 +275,7 @@ test-ob-python/async-inline-session-output
 		    (string= expected-full
 			     (progn
 			       (sleep-for 0.200)
-                               (buffer-substring-no-properties (point-at-bol) (point-at-eol))))))))))
+                               (buffer-substring-no-properties (pos-bol) (pos-eol))))))))))
 
 (ert-deftest test-ob-python/async-named-output ()
   ;; Disable the test on older Emacs as built-in python.el sometimes
diff --git a/testing/lisp/test-ob.el b/testing/lisp/test-ob.el
index 870296acf..1c90b11d1 100644
--- a/testing/lisp/test-ob.el
+++ b/testing/lisp/test-ob.el
@@ -203,8 +203,8 @@ test-ob/simple-variable-resolution
     (should (= 4 (org-babel-execute-src-block)))
     (forward-line 5)
     (should (string= ": 4" (buffer-substring
-			    (point-at-bol)
-			    (point-at-eol)))))
+			    (pos-bol)
+			    (pos-eol)))))
   ;; Test reading lists.
   (org-test-with-temp-text-in-file "
 
@@ -223,8 +223,8 @@ test-ob/simple-variable-resolution
     (should (string=
              "| simple | list |"
              (buffer-substring
-	      (point-at-bol)
-	      (point-at-eol))))))
+	      (pos-bol)
+	      (pos-eol))))))
 
 (ert-deftest test-ob/block-content-resolution ()
   "Test block content resolution."
@@ -364,18 +364,18 @@ test-ob/inline-src_blk-default-results-replace-line-1
       (goto-char (point-min)) (org-babel-execute-maybe)
       (should (string=
                       (concat test-line " {{{results(=1=)}}}")
-       	       (buffer-substring-no-properties (point-at-bol) (point-at-eol))))
+       	       (buffer-substring-no-properties (pos-bol) (pos-eol))))
       (forward-char) (org-babel-execute-maybe)
       (should (string=
                       (concat test-line " {{{results(=1=)}}}")
-       	       (buffer-substring-no-properties (point-at-bol) (point-at-eol))))
+       	       (buffer-substring-no-properties (pos-bol) (pos-eol))))
       (re-search-forward "{{{")
      ;;(should-error (org-ctrl-c-ctrl-c))
       (backward-char 4) ;; last char of block body
       (org-babel-execute-maybe)
       (should (string=
                       (concat test-line " {{{results(=1=)}}}")
-       	       (buffer-substring-no-properties (point-at-bol) (point-at-eol)))))
+       	       (buffer-substring-no-properties (pos-bol) (pos-eol)))))
     ;; src_ follows space line 1...
     (let ((test-line " src_emacs-lisp{ 1 }"))
       (org-test-with-temp-text
@@ -384,11 +384,11 @@ test-ob/inline-src_blk-default-results-replace-line-1
 	(forward-char) (org-babel-execute-maybe)
 	(should (string=
 		 (concat test-line " {{{results(=1=)}}}")
-		 (buffer-substring-no-properties (point-at-bol) (point-at-eol))))
+		 (buffer-substring-no-properties (pos-bol) (pos-eol))))
 	(re-search-forward "{ 1 ") (org-babel-execute-maybe)
 	(should (string=
 		 (concat test-line " {{{results(=1=)}}}")
-		 (buffer-substring-no-properties (point-at-bol) (point-at-eol))))
+		 (buffer-substring-no-properties (pos-bol) (pos-eol))))
 	(forward-char 6)
 	(should-error (org-ctrl-c-ctrl-c))))
     ;; Results on a subsequent line are replaced.
@@ -435,7 +435,7 @@ test-ob/inline-src_blk-default-results-replace-line-2
       (should (string=
 	       (concat test-line " {{{results(=x=)}}}")
 	       (buffer-substring-no-properties
-		(point-at-bol) (point-at-eol))))))
+		(pos-bol) (pos-eol))))))
   (let ((test-line "Some text prior to block src_emacs-lisp{ \"y\" }")
 	(org-babel-inline-result-wrap "=%s="))
     (org-test-with-temp-text
@@ -445,11 +445,11 @@ test-ob/inline-src_blk-default-results-replace-line-2
       (re-search-backward "src") (org-babel-execute-maybe)
       (should (string=
 	       (concat test-line " {{{results(=y=)}}} end")
-	       (buffer-substring-no-properties (point-at-bol) (point-at-eol))))
+	       (buffer-substring-no-properties (pos-bol) (pos-eol))))
       (re-search-forward "\" ") (org-babel-execute-maybe)
       (should (string=
 	       (concat test-line " {{{results(=y=)}}} end")
-	       (buffer-substring-no-properties (point-at-bol) (point-at-eol))))
+	       (buffer-substring-no-properties (pos-bol) (pos-eol))))
       (forward-char 3)
       (should-error (org-ctrl-c-ctrl-c)))))
 
@@ -467,7 +467,7 @@ test-ob/inline-src_blk-manual-results-replace
       (should (string=
               (concat test-line " {{{results(=x=)}}}")
       	       (buffer-substring-no-properties
-		(point-at-bol) (point-at-eol))))))
+		(pos-bol) (pos-eol))))))
   (let ((test-line (concat " Some text prior to block "
 			   "src_emacs-lisp[:results replace]{ \"y\" }"))
 	(org-babel-inline-result-wrap "=%s="))
@@ -477,11 +477,11 @@ test-ob/inline-src_blk-manual-results-replace
       (re-search-backward "src") (org-babel-execute-maybe)
       (should (string=
               (concat test-line " {{{results(=y=)}}} end")
-    	       (buffer-substring-no-properties (point-at-bol) (point-at-eol))))
+    	       (buffer-substring-no-properties (pos-bol) (pos-eol))))
       (re-search-forward "\" ") (org-babel-execute-maybe)
       (should (string=
               (concat test-line " {{{results(=y=)}}} end")
-    	       (buffer-substring-no-properties (point-at-bol) (point-at-eol))))
+    	       (buffer-substring-no-properties (pos-bol) (pos-eol))))
       (forward-char 3)
       (should-error (org-ctrl-c-ctrl-c)))))
 
@@ -491,7 +491,7 @@ test-ob/inline-src_blk-results-silent
       (org-babel-execute-maybe)
       (should (string= test-line
 		       (buffer-substring-no-properties
-			(point-at-bol) (point-at-eol))))))
+			(pos-bol) (pos-eol))))))
   (let ((test-line (concat " Some text prior to block src_emacs-lisp"
 			   "[ :results silent ]{ \"y\" }")))
     (org-test-with-temp-text
@@ -501,11 +501,11 @@ test-ob/inline-src_blk-results-silent
       (re-search-backward "src_") (org-babel-execute-maybe)
       (should (string= (concat test-line " end")
 		       (buffer-substring-no-properties
-			(point-at-bol) (point-at-eol))))
+			(pos-bol) (pos-eol))))
       (re-search-forward "\" ") (org-babel-execute-maybe)
       (should (string= (concat test-line " end")
 		       (buffer-substring-no-properties
-			(point-at-bol) (point-at-eol))))
+			(pos-bol) (pos-eol))))
       (forward-char 2)
       (should-error (org-ctrl-c-ctrl-c)))))
 
@@ -521,11 +521,11 @@ test-ob/inline-src_blk-results-raw
       (re-search-forward "src_") (org-babel-execute-maybe)
       (should (string= (concat test-line " the end")
 		       (buffer-substring-no-properties
-			(point-at-bol) (point-at-eol))))
+			(pos-bol) (pos-eol))))
       (re-search-forward "\" ") (org-babel-execute-maybe)
       (should (string= (concat test-line " the the end")
 		       (buffer-substring-no-properties
-			(point-at-bol) (point-at-eol))))
+			(pos-bol) (pos-eol))))
       (forward-char 2)
       (should-error (org-ctrl-c-ctrl-c)))))
 
@@ -1033,7 +1033,7 @@ test-ob/commented-last-block-line-no-var
     (should
      (string=
       ""
-      (buffer-substring-no-properties (point-at-bol) (point-at-eol)))))
+      (buffer-substring-no-properties (pos-bol) (pos-eol)))))
   (org-test-with-temp-text-in-file "
 #+begin_src emacs-lisp
 \"some text\";;
@@ -1045,7 +1045,7 @@ test-ob/commented-last-block-line-no-var
     (should
      (string=
       ": some text"
-      (buffer-substring-no-properties (point-at-bol) (point-at-eol))))))
+      (buffer-substring-no-properties (pos-bol) (pos-eol))))))
 
 (ert-deftest test-ob/commented-last-block-line-with-var ()
   (org-test-with-temp-text-in-file "
@@ -1058,7 +1058,7 @@ test-ob/commented-last-block-line-with-var
     (forward-line)
     (should (string=
 	     ""
-	     (buffer-substring-no-properties (point-at-bol) (point-at-eol)))))
+	     (buffer-substring-no-properties (pos-bol) (pos-eol)))))
   (org-test-with-temp-text-in-file "
 #+begin_src emacs-lisp :var a=2
 2;;
@@ -1069,7 +1069,7 @@ test-ob/commented-last-block-line-with-var
     (forward-line)
     (should (string=
 	     ": 2"
-	     (buffer-substring-no-properties (point-at-bol) (point-at-eol))))))
+	     (buffer-substring-no-properties (pos-bol) (pos-eol))))))
 
 (ert-deftest test-ob/org-babel-insert-result ()
   "Test `org-babel-insert-result' specifications."
@@ -1156,32 +1156,32 @@ test-ob/remove-inline-result
       (org-babel-execute-maybe)
       (should (string= inline-sb-res-dot
 		       (buffer-substring-no-properties
-			(point-at-bol) (point-at-eol))))
+			(pos-bol) (pos-eol))))
       ;; Delete whitespace and result.
       (org-babel-remove-inline-result)
       (should (string= inline-sb-dot
 		       (buffer-substring-no-properties
-			(point-at-bol) (point-at-eol))))
+			(pos-bol) (pos-eol))))
       ;; Add whitespace and result before dot.
       (search-forward inline-sb)
       (insert "     " inline-res)
-      (goto-char (point-at-bol))
+      (goto-char (pos-bol))
       ;; Remove whitespace and result.
       (org-babel-remove-inline-result)
       (should (string= inline-sb-dot
 		       (buffer-substring-no-properties
-			(point-at-bol) (point-at-eol))))
+			(pos-bol) (pos-eol))))
       ;; Add whitespace before dot.
       (search-forward inline-sb)
       (insert "     ")
-      (goto-char (point-at-bol))
+      (goto-char (pos-bol))
       ;; Add result before whitespace.
       (org-babel-execute-maybe)
       ;; Remove result - leave trailing whitespace and dot.
       (org-babel-remove-inline-result)
       (should (string= (concat inline-sb "     .")
 		       (buffer-substring-no-properties
-			(point-at-bol) (point-at-eol)))))))
+			(pos-bol) (pos-eol)))))))
 
 (ert-deftest test-ob/org-babel-remove-result--results-default ()
   "Test `org-babel-remove-result' with default :results."
@@ -1338,7 +1338,7 @@ test-ob-verify-result-and-removed-result
     (forward-line)
     (should (string= result
 		     (buffer-substring-no-properties
-		      (point-at-bol)
+		      (pos-bol)
 		      (- (point-max) 16))))
     (org-babel-previous-src-block) (org-babel-remove-result)
     (should (string= buffer-text
diff --git a/testing/lisp/test-org-list.el b/testing/lisp/test-org-list.el
index 092d960f6..f5ae4bfd3 100644
--- a/testing/lisp/test-org-list.el
+++ b/testing/lisp/test-org-list.el
@@ -1054,7 +1054,7 @@ test-org-list/send-item
               "- item1\n  - item1child\n- item2\n- item3\n- item4\n- item5\n"
             (re-search-forward "item3")
             (org-list-send-item (car (nth 0 (org-list-struct)))
-                                (point-at-bol) (org-list-struct))
+                                (pos-bol) (org-list-struct))
             (buffer-string))))
   ;; Delete
   (should
@@ -1062,7 +1062,7 @@ test-org-list/send-item
           (org-test-with-temp-text
               "- item1\n  - item1child\n- item2\n- item3\n- item4\n- item5\n"
             (re-search-forward "item3")
-            (org-list-send-item (point-at-bol)
+            (org-list-send-item (pos-bol)
                                 'delete (org-list-struct))
             (buffer-string))))
   ;; Kill
@@ -1070,7 +1070,7 @@ test-org-list/send-item
     (org-test-with-temp-text
         "- item1\n  - item1child\n- item2\n- item3\n  - item3child\n- item4\n- item5\n"
       (re-search-forward "item3")
-      (org-list-send-item (point-at-bol)
+      (org-list-send-item (pos-bol)
                           'kill (org-list-struct))
       (should (equal "- item1\n  - item1child\n- item2\n- item4\n- item5\n"
                      (buffer-string)))
@@ -1507,8 +1507,8 @@ test-org-list/sort
 	  (org-test-with-temp-text "- ccc\n- b\n- aa\n"
 	    (org-sort-list nil ?f
 			   (lambda ()
-			     (length (buffer-substring (point-at-bol)
-						       (point-at-eol))))
+			     (length (buffer-substring (pos-bol)
+						       (pos-eol))))
 			   #'<)
 	    (buffer-string))))
   (should
@@ -1516,8 +1516,8 @@ test-org-list/sort
 	  (org-test-with-temp-text "- ccc\n- b\n- aa\n"
 	    (org-sort-list nil ?F
 			   (lambda ()
-			     (length (buffer-substring (point-at-bol)
-						       (point-at-eol))))
+			     (length (buffer-substring (pos-bol)
+						       (pos-eol))))
 			   #'<)
 	    (buffer-string)))))
 
diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el
index 9c0d74f3d..66f0a14d6 100644
--- a/testing/lisp/test-org.el
+++ b/testing/lisp/test-org.el
@@ -3831,8 +3831,8 @@ test-org/sort-entries
 	  (org-test-with-temp-text "\n* ccc\n* b\n* aa\n"
 	    (org-sort-entries nil ?f
 			      (lambda ()
-				(length (buffer-substring (point-at-bol)
-							  (point-at-eol))))
+				(length (buffer-substring (pos-bol)
+							  (pos-eol))))
 			      #'<)
 	    (buffer-string))))
   (should
@@ -3840,8 +3840,8 @@ test-org/sort-entries
 	  (org-test-with-temp-text "\n* ccc\n* b\n* aa\n"
 	    (org-sort-entries nil ?F
 			      (lambda ()
-				(length (buffer-substring (point-at-bol)
-							  (point-at-eol))))
+				(length (buffer-substring (pos-bol)
+							  (pos-eol))))
 			      #'<)
 	    (buffer-string))))
   ;; Sort by TODO keyword.
diff --git a/testing/lisp/test-ox.el b/testing/lisp/test-ox.el
index 279642d94..5c8d96353 100644
--- a/testing/lisp/test-ox.el
+++ b/testing/lisp/test-ox.el
@@ -1881,7 +1881,7 @@ test-org-export/before-parsing-functions
 		       (goto-char (point-min))
 		       (while (re-search-forward org-outline-regexp-bol nil t)
 			 (delete-region
-			  (point-at-bol) (progn (forward-line) (point))))))))
+			  (pos-bol) (progn (forward-line) (point))))))))
 	      (org-export-as (org-test-default-backend)))))))
 
 
-- 
2.50.1

>From 662b46f116782791d6dc9366d00cc81a38c8f079 Mon Sep 17 00:00:00 2001
From: Morgan Smith <morgan.j.sm...@outlook.com>
Date: Wed, 23 Jul 2025 13:22:38 -0400
Subject: [PATCH 10/15] Testing: Change use of deprecated `org-get-indentation'

* testing/lisp/test-org.el:
Change uses of `org-get-indentation' to `current-indentation'.
---
 testing/lisp/test-org.el | 106 +++++++++++++++++++--------------------
 1 file changed, 53 insertions(+), 53 deletions(-)

diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el
index 66f0a14d6..9d17df722 100644
--- a/testing/lisp/test-org.el
+++ b/testing/lisp/test-org.el
@@ -1079,40 +1079,40 @@ test-org/indent-line
    (zerop
     (org-test-with-temp-text "%%(org-calendar-holiday)"
       (org-indent-line)
-      (org-get-indentation))))
+      (current-indentation))))
   (should
    (zerop
     (org-test-with-temp-text "[fn:1] fn"
       (let ((org-adapt-indentation t)) (org-indent-line))
-      (org-get-indentation))))
+      (current-indentation))))
   (should
    (zerop
     (org-test-with-temp-text "* H"
       (org-indent-line)
-      (org-get-indentation))))
+      (current-indentation))))
   ;; Do not indent before first headline.
   (should
    (zerop
     (org-test-with-temp-text ""
       (org-indent-line)
-      (org-get-indentation))))
+      (current-indentation))))
   ;; Indent according to headline level otherwise, unless
   ;; `org-adapt-indentation' is nil.
   (should
    (= 2
       (org-test-with-temp-text "* H\n<point>A"
 	(let ((org-adapt-indentation t)) (org-indent-line))
-	(org-get-indentation))))
+	(current-indentation))))
   (should
    (= 2
       (org-test-with-temp-text "* H\n<point>\nA"
 	(let ((org-adapt-indentation t)) (org-indent-line))
-	(org-get-indentation))))
+	(current-indentation))))
   (should
    (zerop
     (org-test-with-temp-text "* H\n<point>A"
       (let ((org-adapt-indentation nil)) (org-indent-line))
-      (org-get-indentation))))
+      (current-indentation))))
   ;; Indenting preserves point position.
   (should
    (org-test-with-temp-text "* H\nA<point>B"
@@ -1123,13 +1123,13 @@ test-org/indent-line
    (= 1
       (org-test-with-temp-text "* H\n<point> - A"
 	(let ((org-adapt-indentation t)) (org-indent-line))
-	(org-get-indentation))))
+	(current-indentation))))
   (should
    (= 1
       (org-test-with-temp-text
 	  "\\begin{equation}\n <point>1+1=2\n\\end{equation}"
 	(org-indent-line)
-	(org-get-indentation))))
+	(current-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
@@ -1138,39 +1138,39 @@ test-org/indent-line
    (= 4
       (org-test-with-temp-text "* H\n- A\n  - AA\n<point>"
 	(let ((org-adapt-indentation t)) (org-indent-line))
-	(org-get-indentation))))
+	(current-indentation))))
   (should
    (= 4
       (org-test-with-temp-text "* H\n- A\n  -\n\n<point>"
 	(let ((org-adapt-indentation t)) (org-indent-line))
-	(org-get-indentation))))
+	(current-indentation))))
   (should
    (zerop
     (org-test-with-temp-text "* H\n- A\n  - AA\n\n\n\n<point>"
       (let ((org-adapt-indentation t)) (org-indent-line))
-      (org-get-indentation))))
+      (current-indentation))))
   (should
    (= 4
       (org-test-with-temp-text "* H\n- A\n  - \n<point>"
 	(let ((org-adapt-indentation t)) (org-indent-line))
-	(org-get-indentation))))
+	(current-indentation))))
   (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))))
+	(current-indentation))))
   (should
    (= 2
       (org-test-with-temp-text "- A\n  B\n\n<point>"
 	(let ((org-adapt-indentation nil)) (org-indent-line))
-	(org-get-indentation))))
+	(current-indentation))))
   (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))))
+	(current-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.
@@ -1178,12 +1178,12 @@ test-org/indent-line
    (zerop
     (org-test-with-temp-text "* H\n[fn:1] Definition\n<point>"
       (let ((org-adapt-indentation t)) (org-indent-line))
-      (org-get-indentation))))
+      (current-indentation))))
   (should
    (zerop
     (org-test-with-temp-text "* H\n[fn:1] Definition\n\n\n\n<point>"
       (let ((org-adapt-indentation t)) (org-indent-line))
-      (org-get-indentation))))
+      (current-indentation))))
   ;; After the end of the contents of a greater element or other
   ;; block, indent like the beginning of the element.
   (mapcar (lambda (type)
@@ -1200,7 +1200,7 @@ test-org/indent-line
    (= 1
       (org-test-with-temp-text " Paragraph\n\n<point>"
 	(org-indent-line)
-	(org-get-indentation))))
+	(current-indentation))))
   ;; At the first line of an element, indent like previous element's
   ;; first line, ignoring footnotes definitions and inline tasks, or
   ;; according to parent.
@@ -1209,18 +1209,18 @@ test-org/indent-line
      (= 2
         (org-test-with-temp-text "A\n\n  B\n\nC<point>"
 	                         (org-indent-line)
-	                         (org-get-indentation))))
+	                         (current-indentation))))
     (should
      (= 1
         (org-test-with-temp-text " A\n\n[fn:1] B\n\n\nC<point>"
 	                         (org-indent-line)
-	                         (org-get-indentation))))
+	                         (current-indentation))))
     (should
      (= 1
         (org-test-with-temp-text
 	 " #+BEGIN_CENTER\n<point>  Contents\n#+END_CENTER"
 	 (org-indent-line)
-	 (org-get-indentation)))))
+	 (current-indentation)))))
   ;; Within code part of a source block, use language major mode if
   ;; `org-src-tab-acts-natively' is non-nil, only add
   ;; `org-edit-src-content-indentation' to lines with indentation that
@@ -1232,7 +1232,7 @@ test-org/indent-line
 	(let ((org-src-tab-acts-natively t)
 	      (org-edit-src-content-indentation 0))
 	  (org-indent-line))
-	(org-get-indentation))))
+	(current-indentation))))
   (should
    (= 2
       (org-test-with-temp-text
@@ -1241,7 +1241,7 @@ test-org/indent-line
 	      (org-edit-src-content-indentation 2))
 	  (org-indent-line))
         (forward-line -1)
-	(org-get-indentation))))
+	(current-indentation))))
   (should
    (= 1
       (org-test-with-temp-text
@@ -1249,14 +1249,14 @@ test-org/indent-line
 	(let ((org-src-tab-acts-natively nil)
 	      (org-edit-src-content-indentation 0))
 	  (org-indent-line))
-	(org-get-indentation))))
+	(current-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"
       (org-indent-line)
-      (org-get-indentation))))
+      (current-indentation))))
   ;; Align node properties according to `org-property-format'.  Handle
   ;; nicely empty values.
   (should
@@ -5893,7 +5893,7 @@ test-org/demote
 	      (org-adapt-indentation t))
 	  (org-demote))
 	(forward-line)
-	(org-get-indentation))))
+	(current-indentation))))
   (should
    (= 3
       (org-test-with-temp-text "* H\n  :PROPERTIES:\n  :FOO: Bar\n  :END:"
@@ -5901,7 +5901,7 @@ test-org/demote
 	      (org-adapt-indentation t))
 	  (org-demote))
 	(forward-line)
-	(org-get-indentation))))
+	(current-indentation))))
   (should-not
    (= 3
       (org-test-with-temp-text "* H\n  SCHEDULED: <2014-03-04 tue.>"
@@ -5909,7 +5909,7 @@ test-org/demote
 	      (org-adapt-indentation nil))
 	  (org-demote))
 	(forward-line)
-	(org-get-indentation))))
+	(current-indentation))))
   ;; When `org-adapt-indentation' is non-nil, shift all lines in
   ;; section accordingly.  Ignore, however, footnote definitions and
   ;; inlinetasks boundaries.
@@ -5920,7 +5920,7 @@ test-org/demote
 	      (org-adapt-indentation t))
 	  (org-demote))
 	(forward-line)
-	(org-get-indentation))))
+	(current-indentation))))
   (should
    (= 2
       (org-test-with-temp-text "* H\n  Paragraph"
@@ -5928,7 +5928,7 @@ test-org/demote
 	      (org-adapt-indentation nil))
 	  (org-demote))
 	(forward-line)
-	(org-get-indentation))))
+	(current-indentation))))
   (should
    (zerop
     (org-test-with-temp-text "* H\n[fn:1] def line 1\ndef line 2"
@@ -5936,7 +5936,7 @@ test-org/demote
 	    (org-adapt-indentation t))
 	(org-demote))
       (goto-char (point-max))
-      (org-get-indentation))))
+      (current-indentation))))
   (should
    (= 3
       (org-test-with-temp-text "* H\n[fn:1] Def.\n\n\n  After def."
@@ -5944,7 +5944,7 @@ test-org/demote
 	      (org-adapt-indentation t))
 	  (org-demote))
 	(goto-char (point-max))
-	(org-get-indentation))))
+	(current-indentation))))
   (when (featurep 'org-inlinetask)
     (should
      (zerop
@@ -5953,7 +5953,7 @@ test-org/demote
 	(org-test-with-temp-text "* H\n***** I\n***** END"
 	  (org-demote)
 	  (forward-line)
-	  (org-get-indentation))))))
+	  (current-indentation))))))
   (when (featurep 'org-inlinetask)
     (should
      (= 3
@@ -5962,7 +5962,7 @@ test-org/demote
 	  (org-test-with-temp-text "* H\n***** I\n  Contents\n***** END"
 	    (org-demote)
 	    (forward-line 2)
-	    (org-get-indentation))))))
+	    (current-indentation))))))
   ;; When `org-adapt-indentation' is non-nil, log drawers are
   ;; adjusted.
   (should
@@ -5999,7 +5999,7 @@ test-org/demote
 	    (org-src-preserve-indentation nil))
 	(org-demote))
       (forward-line 2)
-      (org-get-indentation))))
+      (current-indentation))))
   (should
    (zerop
     (org-test-with-temp-text "* H\n#+BEGIN_EXAMPLE\n(+ 1 1)\n#+END_EXAMPLE"
@@ -6007,7 +6007,7 @@ test-org/demote
 	    (org-src-preserve-indentation t))
 	(org-demote))
       (forward-line 2)
-      (org-get-indentation))))
+      (current-indentation))))
   (should
    (zerop
     (org-test-with-temp-text "* H\n#+BEGIN_SRC emacs-lisp\n(+ 1 1)\n#+END_SRC"
@@ -6015,7 +6015,7 @@ test-org/demote
 	    (org-src-preserve-indentation t))
 	(org-demote))
       (forward-line 2)
-      (org-get-indentation))))
+      (current-indentation))))
   (should
    (zerop
     (org-test-with-temp-text
@@ -6024,7 +6024,7 @@ test-org/demote
 	    (org-src-preserve-indentation nil))
 	(org-demote))
       (forward-line 2)
-      (org-get-indentation)))))
+      (current-indentation)))))
 
 (ert-deftest test-org/promote ()
   "Test `org-promote' specifications."
@@ -6077,7 +6077,7 @@ test-org/promote
 	      (org-adapt-indentation t))
 	  (org-promote))
 	(forward-line)
-	(org-get-indentation))))
+	(current-indentation))))
   (should
    (= 2
       (org-test-with-temp-text "** H\n   :PROPERTIES:\n   :FOO: Bar\n   :END:"
@@ -6085,7 +6085,7 @@ test-org/promote
 	      (org-adapt-indentation t))
 	  (org-promote))
 	(forward-line)
-	(org-get-indentation))))
+	(current-indentation))))
   (should-not
    (= 2
       (org-test-with-temp-text "** H\n   SCHEDULED: <2014-03-04 tue.>"
@@ -6093,7 +6093,7 @@ test-org/promote
 	      (org-adapt-indentation nil))
 	  (org-promote))
 	(forward-line)
-	(org-get-indentation))))
+	(current-indentation))))
   ;; When `org-adapt-indentation' is non-nil, shift all lines in
   ;; section accordingly.  Ignore, however, footnote definitions and
   ;; inlinetasks boundaries.
@@ -6104,7 +6104,7 @@ test-org/promote
 	      (org-adapt-indentation t))
 	  (org-promote))
 	(forward-line)
-	(org-get-indentation))))
+	(current-indentation))))
   (should-not
    (= 2
       (org-test-with-temp-text "** H\n   Paragraph"
@@ -6112,7 +6112,7 @@ test-org/promote
 	      (org-adapt-indentation nil))
 	  (org-promote))
 	(forward-line)
-	(org-get-indentation))))
+	(current-indentation))))
   (should
    (= 2
       (org-test-with-temp-text "** H\n   Paragraph\n[fn:1] line1\nline2"
@@ -6120,7 +6120,7 @@ test-org/promote
 	      (org-adapt-indentation t))
 	  (org-promote))
 	(forward-line)
-	(org-get-indentation))))
+	(current-indentation))))
   (when (featurep 'org-inlinetask)
     (should
      (zerop
@@ -6129,7 +6129,7 @@ test-org/promote
 	(org-test-with-temp-text "** H\n***** I\n***** END"
 	  (org-promote)
 	  (forward-line)
-	  (org-get-indentation))))))
+	  (current-indentation))))))
   (when (featurep 'org-inlinetask)
     (should
      (= 2
@@ -6138,7 +6138,7 @@ test-org/promote
 	  (org-test-with-temp-text "** H\n***** I\n   Contents\n***** END"
 	    (org-promote)
 	    (forward-line 2)
-	    (org-get-indentation))))))
+	    (current-indentation))))))
   ;; Give up shifting if it would break document's structure
   ;; otherwise.
   (should
@@ -6148,7 +6148,7 @@ test-org/promote
 	      (org-adapt-indentation t))
 	  (org-promote))
 	(forward-line)
-	(org-get-indentation))))
+	(current-indentation))))
   (should
    (= 3
       (org-test-with-temp-text "** H\n   Paragraph\n * list."
@@ -6156,7 +6156,7 @@ test-org/promote
 	      (org-adapt-indentation t))
 	  (org-promote))
 	(forward-line)
-	(org-get-indentation))))
+	(current-indentation))))
   ;; When `org-adapt-indentation' is non-nil, log drawers are
   ;; adjusted.
   (should
@@ -6204,7 +6204,7 @@ test-org/promote
 	    (org-odd-levels-only nil))
 	(org-promote))
       (forward-line)
-      (org-get-indentation))))
+      (current-indentation))))
   (should
    (zerop
     (org-test-with-temp-text
@@ -6214,7 +6214,7 @@ test-org/promote
 	    (org-odd-levels-only nil))
 	(org-promote))
       (forward-line)
-      (org-get-indentation))))
+      (current-indentation))))
   (should
    (zerop
     (org-test-with-temp-text
@@ -6224,7 +6224,7 @@ test-org/promote
 	    (org-odd-levels-only nil))
 	(org-promote))
       (forward-line)
-      (org-get-indentation))))
+      (current-indentation))))
   (should
    (zerop
     (org-test-with-temp-text
@@ -6234,7 +6234,7 @@ test-org/promote
 	    (org-odd-levels-only nil))
 	(org-promote))
       (forward-line)
-      (org-get-indentation)))))
+      (current-indentation)))))
 
 (ert-deftest test-org/org-get-valid-level ()
   "Test function `org-get-valid-level' specifications."
-- 
2.50.1

>From 9fed87163db8db8d4f2277b3271a68e65b568e20 Mon Sep 17 00:00:00 2001
From: Morgan Smith <morgan.j.sm...@outlook.com>
Date: Wed, 23 Jul 2025 14:09:58 -0400
Subject: [PATCH 11/15] Testing: Use '(system-name)' instead of deprecated
 'system-name'

* testing/lisp/test-ob-shell.el
(test-ob-shell/remote-with-stdin-or-cmdline): Use '(system-name)'
instead of deprecated 'system-name'.
---
 testing/lisp/test-ob-shell.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testing/lisp/test-ob-shell.el b/testing/lisp/test-ob-shell.el
index 880a710f6..afa7c4fcb 100644
--- a/testing/lisp/test-ob-shell.el
+++ b/testing/lisp/test-ob-shell.el
@@ -384,7 +384,7 @@ test-ob-shell/remote-with-stdin-or-cmdline
             (if (should (equal result expected))
               ;; FIXME: Fails with non-local exit on Emacs 26.
               (when (version<= "27" emacs-version)
-                (kill-matching-buffers (format "\\*tramp/mock\\s-%s\\*" system-name) t t))))))))
+                (kill-matching-buffers (format "\\*tramp/mock\\s-%s\\*" (system-name)) t t))))))))
 
 (ert-deftest test-ob-shell/results-table ()
   "Test :results table."
-- 
2.50.1

>From cbb958706dae84719a6e22aec1b8284f8fad60b9 Mon Sep 17 00:00:00 2001
From: Morgan Smith <morgan.j.sm...@outlook.com>
Date: Wed, 23 Jul 2025 14:11:28 -0400
Subject: [PATCH 12/15] Testing: Change use of deprecated
 `org-context-in-file-links'

* lisp/ol.el:
* testing/lisp/test-ol.el:
Use `org-link-context-for-files' instead of `org-context-in-file-links'.
---
 lisp/ol.el              |  2 +-
 testing/lisp/test-ol.el | 42 ++++++++++++++++++++---------------------
 2 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/lisp/ol.el b/lisp/ol.el
index 7888230ac..56c8ff43d 100644
--- a/lisp/ol.el
+++ b/lisp/ol.el
@@ -2424,7 +2424,7 @@ org-store-link
 	    (move-beginning-of-line 2)
 	    (set-mark (point)))))
     (setq org-store-link-plist nil)
-    ;; Negate `org-context-in-file-links' when given a single universal arg.
+    ;; Negate `org-link-context-for-files' when given a single universal arg.
     (let ((org-link-context-for-files (org-xor org-link-context-for-files
                                                (equal arg '(4))))
           link desc search agenda-link) ;; description
diff --git a/testing/lisp/test-ol.el b/testing/lisp/test-ol.el
index 2888d565b..2942d58df 100644
--- a/testing/lisp/test-ol.el
+++ b/testing/lisp/test-ol.el
@@ -222,7 +222,7 @@ test-org-link/store-link
   (should
    (let ((org-stored-links nil)
 	 (org-id-link-to-org-use-id nil)
-	 (org-context-in-file-links t))
+	 (org-link-context-for-files t))
      (org-test-with-temp-text-in-file "* h1"
        (let ((file (buffer-file-name)))
 	 (equal (format "[[file:%s::*h1][h1]]" file)
@@ -231,26 +231,26 @@ test-org-link/store-link
   (should
    (let ((org-stored-links nil)
 	 (org-id-link-to-org-use-id nil)
-	 (org-context-in-file-links nil))
+	 (org-link-context-for-files nil))
      (org-test-with-temp-text-in-file "* h1"
        (let ((file (buffer-file-name)))
 	 (equal (format "[[file:%s]]" file file)
 		(org-store-link nil))))))
-  ;; C-u prefix reverses `org-context-in-file-links' in Org buffer.
+  ;; C-u prefix reverses `org-link-context-for-files' in Org buffer.
   (should
    (let ((org-stored-links nil)
 	 (org-id-link-to-org-use-id nil)
-	 (org-context-in-file-links nil))
+	 (org-link-context-for-files nil))
      (org-test-with-temp-text-in-file "* h1"
        (let ((file (buffer-file-name)))
 	 (equal (format "[[file:%s::*h1][h1]]" file)
 		(org-store-link '(4)))))))
-  ;; A C-u C-u does *not* reverse `org-context-in-file-links' in Org
+  ;; A C-u C-u does *not* reverse `org-link-context-for-files' in Org
   ;; buffer.
   (should
    (let ((org-stored-links nil)
 	 (org-id-link-to-org-use-id nil)
-	 (org-context-in-file-links nil))
+	 (org-link-context-for-files nil))
      (org-test-with-temp-text-in-file "* h1"
        (let ((file (buffer-file-name)))
 	 (equal (format "[[file:%s]]" file file)
@@ -267,13 +267,13 @@ test-org-link/store-link
   ;; Store file link to non-Org buffer, without context.
   (should
    (let ((org-stored-links nil)
-	 (org-context-in-file-links nil))
+	 (org-link-context-for-files nil))
      (org-test-with-temp-text-in-file "one\n<point>two"
        (fundamental-mode)
        (let ((file (buffer-file-name)))
 	 (equal (format "[[file:%s]]" file file)
 		(org-store-link nil))))))
-  ;; C-u prefix reverses `org-context-in-file-links' in non-Org
+  ;; C-u prefix reverses `org-link-context-for-files' in non-Org
   ;; buffer.
   (should
    (let ((org-stored-links nil)
@@ -283,11 +283,11 @@ test-org-link/store-link
        (let ((file (buffer-file-name)))
 	 (equal (format "[[file:%s::two]]" file)
 		(org-store-link '(4)))))))
-  ;; A C-u C-u does *not* reverse `org-context-in-file-links' in
+  ;; A C-u C-u does *not* reverse `org-link-context-for-files' in
   ;; non-Org buffer.
   (should
    (let ((org-stored-links nil)
-	 (org-context-in-file-links nil))
+	 (org-link-context-for-files nil))
      (org-test-with-temp-text-in-file "one\n<point>two"
        (fundamental-mode)
        (let ((file (buffer-file-name)))
@@ -296,7 +296,7 @@ test-org-link/store-link
   ;; Context does not include special search syntax.
   (should
    (let ((org-stored-links nil)
-	 (org-context-in-file-links t))
+	 (org-link-context-for-files t))
      (org-test-with-temp-text-in-file "(two)"
        (fundamental-mode)
        (let ((file (buffer-file-name)))
@@ -304,7 +304,7 @@ test-org-link/store-link
 		(org-store-link nil))))))
   (should
    (let ((org-stored-links nil)
-	 (org-context-in-file-links t))
+	 (org-link-context-for-files t))
      (org-test-with-temp-text-in-file "#two"
        (fundamental-mode)
        (let ((file (buffer-file-name)))
@@ -312,7 +312,7 @@ test-org-link/store-link
 		(org-store-link nil))))))
   (should
    (let ((org-stored-links nil)
-	 (org-context-in-file-links t))
+	 (org-link-context-for-files t))
      (org-test-with-temp-text-in-file "*two"
        (fundamental-mode)
        (let ((file (buffer-file-name)))
@@ -320,7 +320,7 @@ test-org-link/store-link
 		(org-store-link nil))))))
   (should
    (let ((org-stored-links nil)
-	 (org-context-in-file-links t))
+	 (org-link-context-for-files t))
      (org-test-with-temp-text-in-file "( two )"
        (fundamental-mode)
        (let ((file (buffer-file-name)))
@@ -328,7 +328,7 @@ test-org-link/store-link
 		(org-store-link nil))))))
   (should
    (let ((org-stored-links nil)
-	 (org-context-in-file-links t))
+	 (org-link-context-for-files t))
      (org-test-with-temp-text-in-file "# two"
        (fundamental-mode)
        (let ((file (buffer-file-name)))
@@ -336,7 +336,7 @@ test-org-link/store-link
 		(org-store-link nil))))))
   (should
    (let ((org-stored-links nil)
-	 (org-context-in-file-links t))
+	 (org-link-context-for-files t))
      (org-test-with-temp-text-in-file "#( two )"
        (fundamental-mode)
        (let ((file (buffer-file-name)))
@@ -344,7 +344,7 @@ test-org-link/store-link
 		(org-store-link nil))))))
   (should
    (let ((org-stored-links nil)
-	 (org-context-in-file-links t))
+	 (org-link-context-for-files t))
      (org-test-with-temp-text-in-file "#** ((## two) )"
        (fundamental-mode)
        (let ((file (buffer-file-name)))
@@ -352,7 +352,7 @@ test-org-link/store-link
 		(org-store-link nil))))))
   (should-not
    (let ((org-stored-links nil)
-	 (org-context-in-file-links t))
+	 (org-link-context-for-files t))
      (org-test-with-temp-text-in-file "(two"
        (fundamental-mode)
        (let ((file (buffer-file-name)))
@@ -362,21 +362,21 @@ test-org-link/store-link
   ;; data.
   (should
    (let ((org-stored-links nil)
-	 (org-context-in-file-links t))
+	 (org-link-context-for-files t))
      (org-test-with-temp-text-in-file "* TODO [#A] COMMENT foo :bar:"
        (let ((file (buffer-file-name)))
 	 (equal (format "[[file:%s::*foo][foo]]" file file)
 		(org-store-link nil))))))
   (should
    (let ((org-stored-links nil)
-	 (org-context-in-file-links t))
+	 (org-link-context-for-files t))
      (org-test-with-temp-text-in-file "* foo[33%]bar"
        (let ((file (buffer-file-name)))
 	 (equal (format "[[file:%s::*foo bar][foo bar]]" file file)
 		(org-store-link nil))))))
   (should
    (let ((org-stored-links nil)
-	 (org-context-in-file-links t))
+	 (org-link-context-for-files t))
      (org-test-with-temp-text-in-file "* [%][/]  foo [35%] bar[3/5]"
        (let ((file (buffer-file-name)))
 	 (equal (format "[[file:%s::*foo bar][foo bar]]" file file)
-- 
2.50.1

>From 499562a4c1b35e33af8d2089e350c7a8ded6dfed Mon Sep 17 00:00:00 2001
From: Morgan Smith <morgan.j.sm...@outlook.com>
Date: Wed, 23 Jul 2025 13:29:47 -0400
Subject: [PATCH 13/15] Testing: Call `format' with correct number of
 arguments.

* testing/lisp/test-ol.el: Remove extra erroneous arguments to `format'.
---
 testing/lisp/test-ol.el | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/testing/lisp/test-ol.el b/testing/lisp/test-ol.el
index 2942d58df..7f5e5ba72 100644
--- a/testing/lisp/test-ol.el
+++ b/testing/lisp/test-ol.el
@@ -234,7 +234,7 @@ test-org-link/store-link
 	 (org-link-context-for-files nil))
      (org-test-with-temp-text-in-file "* h1"
        (let ((file (buffer-file-name)))
-	 (equal (format "[[file:%s]]" file file)
+	 (equal (format "[[file:%s]]" file)
 		(org-store-link nil))))))
   ;; C-u prefix reverses `org-link-context-for-files' in Org buffer.
   (should
@@ -253,7 +253,7 @@ test-org-link/store-link
 	 (org-link-context-for-files nil))
      (org-test-with-temp-text-in-file "* h1"
        (let ((file (buffer-file-name)))
-	 (equal (format "[[file:%s]]" file file)
+	 (equal (format "[[file:%s]]" file)
 		(org-store-link '(16)))))))
   ;; Store file link to non-Org buffer, with context.
   (should
@@ -271,7 +271,7 @@ test-org-link/store-link
      (org-test-with-temp-text-in-file "one\n<point>two"
        (fundamental-mode)
        (let ((file (buffer-file-name)))
-	 (equal (format "[[file:%s]]" file file)
+	 (equal (format "[[file:%s]]" file)
 		(org-store-link nil))))))
   ;; C-u prefix reverses `org-link-context-for-files' in non-Org
   ;; buffer.
@@ -291,7 +291,7 @@ test-org-link/store-link
      (org-test-with-temp-text-in-file "one\n<point>two"
        (fundamental-mode)
        (let ((file (buffer-file-name)))
-	 (equal (format "[[file:%s]]" file file)
+	 (equal (format "[[file:%s]]" file)
 		(org-store-link '(16)))))))
   ;; Context does not include special search syntax.
   (should
@@ -300,7 +300,7 @@ test-org-link/store-link
      (org-test-with-temp-text-in-file "(two)"
        (fundamental-mode)
        (let ((file (buffer-file-name)))
-	 (equal (format "[[file:%s::two]]" file file)
+	 (equal (format "[[file:%s::two]]" file)
 		(org-store-link nil))))))
   (should
    (let ((org-stored-links nil)
@@ -308,7 +308,7 @@ test-org-link/store-link
      (org-test-with-temp-text-in-file "#two"
        (fundamental-mode)
        (let ((file (buffer-file-name)))
-	 (equal (format "[[file:%s::two]]" file file)
+	 (equal (format "[[file:%s::two]]" file)
 		(org-store-link nil))))))
   (should
    (let ((org-stored-links nil)
@@ -316,7 +316,7 @@ test-org-link/store-link
      (org-test-with-temp-text-in-file "*two"
        (fundamental-mode)
        (let ((file (buffer-file-name)))
-	 (equal (format "[[file:%s::two]]" file file)
+	 (equal (format "[[file:%s::two]]" file)
 		(org-store-link nil))))))
   (should
    (let ((org-stored-links nil)
@@ -324,7 +324,7 @@ test-org-link/store-link
      (org-test-with-temp-text-in-file "( two )"
        (fundamental-mode)
        (let ((file (buffer-file-name)))
-	 (equal (format "[[file:%s::two]]" file file)
+	 (equal (format "[[file:%s::two]]" file)
 		(org-store-link nil))))))
   (should
    (let ((org-stored-links nil)
@@ -332,7 +332,7 @@ test-org-link/store-link
      (org-test-with-temp-text-in-file "# two"
        (fundamental-mode)
        (let ((file (buffer-file-name)))
-	 (equal (format "[[file:%s::two]]" file file)
+	 (equal (format "[[file:%s::two]]" file)
 		(org-store-link nil))))))
   (should
    (let ((org-stored-links nil)
@@ -340,7 +340,7 @@ test-org-link/store-link
      (org-test-with-temp-text-in-file "#( two )"
        (fundamental-mode)
        (let ((file (buffer-file-name)))
-	 (equal (format "[[file:%s::two]]" file file)
+	 (equal (format "[[file:%s::two]]" file)
 		(org-store-link nil))))))
   (should
    (let ((org-stored-links nil)
@@ -348,7 +348,7 @@ test-org-link/store-link
      (org-test-with-temp-text-in-file "#** ((## two) )"
        (fundamental-mode)
        (let ((file (buffer-file-name)))
-	 (equal (format "[[file:%s::two]]" file file)
+	 (equal (format "[[file:%s::two]]" file)
 		(org-store-link nil))))))
   (should-not
    (let ((org-stored-links nil)
@@ -356,7 +356,7 @@ test-org-link/store-link
      (org-test-with-temp-text-in-file "(two"
        (fundamental-mode)
        (let ((file (buffer-file-name)))
-	 (equal (format "[[file:%s::two]]" file file)
+	 (equal (format "[[file:%s::two]]" file)
 		(org-store-link nil))))))
   ;; Context also ignore statistics cookies and special headlines
   ;; data.
@@ -365,21 +365,21 @@ test-org-link/store-link
 	 (org-link-context-for-files t))
      (org-test-with-temp-text-in-file "* TODO [#A] COMMENT foo :bar:"
        (let ((file (buffer-file-name)))
-	 (equal (format "[[file:%s::*foo][foo]]" file file)
+	 (equal (format "[[file:%s::*foo][foo]]" file)
 		(org-store-link nil))))))
   (should
    (let ((org-stored-links nil)
 	 (org-link-context-for-files t))
      (org-test-with-temp-text-in-file "* foo[33%]bar"
        (let ((file (buffer-file-name)))
-	 (equal (format "[[file:%s::*foo bar][foo bar]]" file file)
+	 (equal (format "[[file:%s::*foo bar][foo bar]]" file)
 		(org-store-link nil))))))
   (should
    (let ((org-stored-links nil)
 	 (org-link-context-for-files t))
      (org-test-with-temp-text-in-file "* [%][/]  foo [35%] bar[3/5]"
        (let ((file (buffer-file-name)))
-	 (equal (format "[[file:%s::*foo bar][foo bar]]" file file)
+	 (equal (format "[[file:%s::*foo bar][foo bar]]" file)
 		(org-store-link nil)))))))
 
 (ert-deftest test-org-link/precise-link-target ()
-- 
2.50.1

>From 2a66b20b14024a8fb03ae092f9598e447f2d66eb Mon Sep 17 00:00:00 2001
From: Morgan Smith <morgan.j.sm...@outlook.com>
Date: Wed, 23 Jul 2025 13:39:11 -0400
Subject: [PATCH 14/15] Testing: Do not modify constant lists

* testing/lisp/test-org-element.el:
* testing/lisp/test-org-num.el:
Make lists with `list' instead of quotes to avoid warnings of
modifications to constant lists.
---
 testing/lisp/test-org-element.el |  8 +++---
 testing/lisp/test-org-num.el     | 48 ++++++++++++++++----------------
 2 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/testing/lisp/test-org-element.el b/testing/lisp/test-org-element.el
index 807335ede..0b2b93630 100644
--- a/testing/lisp/test-org-element.el
+++ b/testing/lisp/test-org-element.el
@@ -301,7 +301,7 @@ test-org-element/class
   (should (eq 'object (org-element-class '(foo nil) '("secondary"))))
   (should
    (eq 'object
-       (let* ((datum '(foo nil))
+       (let* ((datum (list 'foo nil))
 	      (headline `(headline (:title (,datum) :secondary (:title)))))
 	 (org-element-put-property datum :parent headline)
 	 (org-element-class datum)))))
@@ -521,7 +521,7 @@ test-org-element/org-element-create
                    children))
     (should (equal (cddr (apply #'org-element-create 'bar nil children))
                    children)))
-  (let ((children '("foo" nil "bar")))
+  (let ((children (list "foo" nil "bar")))
     (should (equal (cddr (apply #'org-element-create 'bar nil children))
                    (delq nil children)))))
 
@@ -4546,14 +4546,14 @@ test-org-element/parse-buffer-visible
 	      (lambda (hl) (org-element-property :raw-value hl))))))
   (should
    (equal "Test"
-	  (let ((contents "Test"))
+	  (let ((contents (copy-sequence "Test")))
 	    (org-test-with-temp-text contents
 	      (add-text-properties 0 1 '(invisible t) contents)
 	      (org-element-map (org-element-parse-buffer nil t) 'plain-text
 		#'org-no-properties nil t)))))
   (should
    (equal "Test"
-	  (let ((contents "Test"))
+	  (let ((contents (copy-sequence "Test")))
 	    (org-test-with-temp-text (concat "- " contents)
 	      (add-text-properties 0 1 '(invisible t) contents)
 	      (org-element-map (org-element-parse-buffer nil t) 'plain-text
diff --git a/testing/lisp/test-org-num.el b/testing/lisp/test-org-num.el
index 1de7702d9..02883aadd 100644
--- a/testing/lisp/test-org-num.el
+++ b/testing/lisp/test-org-num.el
@@ -68,7 +68,7 @@ test-org-num/format-function
 (ert-deftest test-org-num/max-level ()
   "Test `org-num-max-level' option."
   (should
-   (equal (sort '("1.1 " "1 ") #'string-lessp)
+   (equal (sort (list "1.1 " "1 ") #'string-lessp)
           (org-test-with-temp-text "* H1\n** H2\n*** H3"
             (let ((org-num-max-level 2)) (org-num-mode 1))
             (sort
@@ -80,7 +80,7 @@ test-org-num/skip-numbering
   "Test various skip numbering parameters."
   ;; Skip commented headlines.
   (should
-   (equal (sort '(nil "1 ") #'string-lessp)
+   (equal (sort (list nil "1 ") #'string-lessp)
           (org-test-with-temp-text "* H1\n* COMMENT H2"
             (let ((org-num-skip-commented t)) (org-num-mode 1))
             (sort
@@ -88,7 +88,7 @@ test-org-num/skip-numbering
                      (overlays-in (point-min) (point-max)))
              #'string-lessp))))
   (should
-   (equal (sort '("2 " "1 ") #'string-lessp)
+   (equal (sort (list "2 " "1 ") #'string-lessp)
           (org-test-with-temp-text "* H1\n* COMMENT H2"
             (let ((org-num-skip-commented nil)) (org-num-mode 1))
             (sort
@@ -97,7 +97,7 @@ test-org-num/skip-numbering
              #'string-lessp))))
   ;; Skip commented sub-trees.
   (should
-   (equal (sort '(nil nil) #'string-lessp)
+   (equal (sort (list nil nil) #'string-lessp)
           (org-test-with-temp-text "* COMMENT H1\n** H2"
             (let ((org-num-skip-commented t)) (org-num-mode 1))
             (sort
@@ -106,7 +106,7 @@ test-org-num/skip-numbering
              #'string-lessp))))
   ;; Skip footnotes sections.
   (should
-   (equal (sort '(nil "1 ") #'string-lessp)
+   (equal (sort (list nil "1 ") #'string-lessp)
           (org-test-with-temp-text "* H1\n* FN"
             (let ((org-num-skip-footnotes t)
                   (org-footnote-section "FN"))
@@ -116,7 +116,7 @@ test-org-num/skip-numbering
                      (overlays-in (point-min) (point-max)))
              #'string-lessp))))
   (should
-   (equal (sort '("2 " "1 ") #'string-lessp)
+   (equal (sort (list "2 " "1 ") #'string-lessp)
           (org-test-with-temp-text "* H1\n* FN"
             (let ((org-num-skip-footnotes nil)
                   (org-footnote-section "FN"))
@@ -127,7 +127,7 @@ test-org-num/skip-numbering
              #'string-lessp))))
   ;; Skip tags, recursively.
   (should
-   (equal (sort '(nil "1 ") #'string-lessp)
+   (equal (sort (list nil "1 ") #'string-lessp)
           (org-test-with-temp-text "* H1\n* H2 :foo:"
             (let ((org-num-skip-tags '("foo"))) (org-num-mode 1))
             (sort
@@ -135,7 +135,7 @@ test-org-num/skip-numbering
                      (overlays-in (point-min) (point-max)))
              #'string-lessp))))
   (should
-   (equal (sort '(nil nil) #'string-lessp)
+   (equal (sort (list nil nil) #'string-lessp)
           (org-test-with-temp-text "* H1 :foo:\n** H2"
             (let ((org-num-skip-tags '("foo"))) (org-num-mode 1))
             (sort
@@ -144,7 +144,7 @@ test-org-num/skip-numbering
              #'string-lessp))))
   ;; Skip unnumbered sections.
   (should
-   (equal (sort '(nil "1 ") #'string-lessp)
+   (equal (sort (list nil "1 ") #'string-lessp)
           (org-test-with-temp-text
               "* H1\n* H2\n:PROPERTIES:\n:UNNUMBERED: t\n:END:"
             (let ((org-num-skip-unnumbered t)) (org-num-mode 1))
@@ -153,7 +153,7 @@ test-org-num/skip-numbering
                      (overlays-in (point-min) (point-max)))
              #'string-lessp))))
   (should
-   (equal (sort '("2 " "1 ") #'string-lessp)
+   (equal (sort (list "2 " "1 ") #'string-lessp)
           (org-test-with-temp-text
               "* H1\n* H2\n:PROPERTIES:\n:UNNUMBERED: t\n:END:"
             (let ((org-num-skip-unnumbered nil)) (org-num-mode 1))
@@ -162,7 +162,7 @@ test-org-num/skip-numbering
                      (overlays-in (point-min) (point-max)))
              #'string-lessp))))
   (should
-   (equal (sort '("2 " "1 ") #'string-lessp)
+   (equal (sort (list "2 " "1 ") #'string-lessp)
           (org-test-with-temp-text
               "* H1\n* H2\n:PROPERTIES:\n:UNNUMBERED: nil\n:END:"
             (let ((org-num-skip-unnumbered t)) (org-num-mode 1))
@@ -172,7 +172,7 @@ test-org-num/skip-numbering
              #'string-lessp))))
   ;; Skip unnumbered sub-trees.
   (should
-   (equal (sort '(nil nil) #'string-lessp)
+   (equal (sort (list nil nil) #'string-lessp)
           (org-test-with-temp-text
               "* H1\n:PROPERTIES:\n:UNNUMBERED: t\n:END:\n** H2"
             (let ((org-num-skip-unnumbered t)) (org-num-mode 1))
@@ -182,7 +182,7 @@ test-org-num/skip-numbering
              #'string-lessp))))
   ;; Do not choke on empty headlines.
   (should
-   (equal (sort '("1 ") #'string-lessp)
+   (equal (sort (list "1 ") #'string-lessp)
           (org-test-with-temp-text "* "
             (let ((org-num-skip-commented t)) (org-num-mode 1))
             (sort
@@ -190,7 +190,7 @@ test-org-num/skip-numbering
                      (overlays-in (point-min) (point-max)))
              #'string-lessp))))
   (should
-   (equal (sort '("1 ") #'string-lessp)
+   (equal (sort (list "1 ") #'string-lessp)
           (org-test-with-temp-text "* "
             (let ((org-num-skip-unnumbered t)) (org-num-mode 1))
             (sort
@@ -198,7 +198,7 @@ test-org-num/skip-numbering
                      (overlays-in (point-min) (point-max)))
              #'string-lessp))))
   (should
-   (equal (sort '("1 ") #'string-lessp)
+   (equal (sort (list "1 ") #'string-lessp)
           (org-test-with-temp-text "* "
             (let ((org-num-skip-footnotes t)) (org-num-mode 1))
             (sort
@@ -232,7 +232,7 @@ test-org-num/update
                          'after-string))))
   ;; Headlines created at END.
   (should
-   (equal (sort '("1 ") #'string-lessp)
+   (equal (sort (list "1 ") #'string-lessp)
           (org-test-with-temp-text "X<point> H"
             (org-num-mode 1)
             (insert "\n*")
@@ -241,7 +241,7 @@ test-org-num/update
                      (overlays-in (point-min) (point-max)))
              #'string-lessp))))
   (should
-   (equal (sort '("1 ") #'string-lessp)
+   (equal (sort (list "1 ") #'string-lessp)
           (org-test-with-temp-text "X<point>* H"
             (org-num-mode 1)
             (insert "\n")
@@ -251,7 +251,7 @@ test-org-num/update
              #'string-lessp))))
   ;; Headlines created between BEG and END.
   (should
-   (equal (sort '("1.1 " "1 ") #'string-lessp)
+   (equal (sort (list "1.1 " "1 ") #'string-lessp)
           (org-test-with-temp-text ""
             (org-num-mode 1)
             (insert "\n* H\n** H2")
@@ -261,7 +261,7 @@ test-org-num/update
              #'string-lessp))))
   ;; Change level of a headline.
   (should
-   (equal (sort '("0.1 ") #'string-lessp)
+   (equal (sort (list "0.1 ") #'string-lessp)
           (org-test-with-temp-text "* H"
             (org-num-mode 1)
             (insert "*")
@@ -270,7 +270,7 @@ test-org-num/update
                      (overlays-in (point-min) (point-max)))
              #'string-lessp))))
   (should
-   (equal (sort '("1 ") #'string-lessp)
+   (equal (sort (list "1 ") #'string-lessp)
           (org-test-with-temp-text "*<point>* H"
             (org-num-mode 1)
             (delete-char 1)
@@ -280,7 +280,7 @@ test-org-num/update
              #'string-lessp))))
   ;; Alter skip state.
   (should
-   (equal (sort '("1 ") #'string-lessp)
+   (equal (sort (list "1 ") #'string-lessp)
           (org-test-with-temp-text "* H :fo<point>o:"
             (let ((org-num-skip-tags '("foo")))
               (org-num-mode 1)
@@ -290,7 +290,7 @@ test-org-num/update
                      (overlays-in (point-min) (point-max)))
              #'string-lessp))))
   (should
-   (equal (sort '(nil) #'string-lessp)
+   (equal (sort (list nil) #'string-lessp)
           (org-test-with-temp-text "* H :fo<point>:"
             (let ((org-num-skip-tags '("foo")))
               (org-num-mode 1)
@@ -301,7 +301,7 @@ test-org-num/update
              #'string-lessp))))
   ;; Invalidate an overlay and insert new headlines.
   (should
-   (equal (sort '("1.2 " "1.1 " "1 ") #'string-lessp)
+   (equal (sort (list "1.2 " "1.1 " "1 ") #'string-lessp)
           (org-test-with-temp-text
               "* H\n:PROPERTIES:\n:UNNUMBE<point>RED: t\n:END:"
             (let ((org-num-skip-unnumbered t))
@@ -313,7 +313,7 @@ test-org-num/update
                #'string-lessp)))))
   ;; Invalidate two overlays: current headline and next one.
   (should
-   (equal (sort '("1 ") #'string-lessp)
+   (equal (sort (list "1 ") #'string-lessp)
           (org-test-with-temp-text
               "* H\n:PROPERTIES:\n:UNNUMBE<point>RED: t\n:END:\n** H2"
             (let ((org-num-skip-unnumbered t))
-- 
2.50.1

>From 89ee77295f43d924c62fe91d5e886ecc13959f61 Mon Sep 17 00:00:00 2001
From: Morgan Smith <morgan.j.sm...@outlook.com>
Date: Wed, 23 Jul 2025 13:39:30 -0400
Subject: [PATCH 15/15] Testing: Use `mapc' instead of `mapcar' when return
 value isn't used

* testing/lisp/test-ob.el
(test-ob/org-babel-remove-result--results-default):
* testing/lisp/test-org.el (test-org/indent-line):
Use `mapc' instead of `mapcar'.
---
 testing/lisp/test-ob.el  | 12 ++++++------
 testing/lisp/test-org.el | 16 ++++++++--------
 2 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/testing/lisp/test-ob.el b/testing/lisp/test-ob.el
index 1c90b11d1..0f73898da 100644
--- a/testing/lisp/test-ob.el
+++ b/testing/lisp/test-ob.el
@@ -1185,16 +1185,16 @@ test-ob/remove-inline-result
 
 (ert-deftest test-ob/org-babel-remove-result--results-default ()
   "Test `org-babel-remove-result' with default :results."
-  (mapcar (lambda (language)
-	    (test-ob-verify-result-and-removed-result
-	     "\n"
-	     (concat
-	      "* org-babel-remove-result
+  (mapc (lambda (language)
+	  (test-ob-verify-result-and-removed-result
+	   "\n"
+	   (concat
+	    "* org-babel-remove-result
 #+begin_src " language "
 #+end_src
 
 * next heading")))
-	  '("emacs-lisp")))
+	'("emacs-lisp")))
 
 (ert-deftest test-ob/org-babel-results-indented-wrap ()
   "Ensure that wrapped results are inserted correction when indented.
diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el
index 9d17df722..6ef387852 100644
--- a/testing/lisp/test-org.el
+++ b/testing/lisp/test-org.el
@@ -1186,14 +1186,14 @@ test-org/indent-line
       (current-indentation))))
   ;; After the end of the contents of a greater element or other
   ;; block, indent like the beginning of the element.
-  (mapcar (lambda (type)
-	    (should
-	     (= 1
-		(org-test-with-temp-text
-		    (format " #+BEGIN_%1$s\n  Contents\n<point>#+END_%1$s" type)
-		  (org-indent-line)
-		  (current-indentation)))))
-	  '("CENTER" "COMMENT" "EXAMPLE" "EXPORT" "SRC" "VERSE"))
+  (mapc (lambda (type)
+	  (should
+	   (= 1
+	      (org-test-with-temp-text
+		  (format " #+BEGIN_%1$s\n  Contents\n<point>#+END_%1$s" type)
+		(org-indent-line)
+		(current-indentation)))))
+	'("CENTER" "COMMENT" "EXAMPLE" "EXPORT" "SRC" "VERSE"))
   ;; On blank lines after a paragraph, indent like its last non-empty
   ;; line.
   (should
-- 
2.50.1

Reply via email to