Once again I am submitting a patch series to fix a bunch of compile time
warnings in our tests.  I think we are about 7 more patches from being
completely warning free.

Tests pass after each commit on Emacs 30.  Test pass on the final commit on
emacs 28, and 29.

Let me know what you think.

>From 29a4a3a19ae9de5abd66a59586c46ddc828302ca Mon Sep 17 00:00:00 2001
From: Morgan Smith <[email protected]>
Date: Wed, 23 Jul 2025 14:24:14 -0400
Subject: [PATCH 01/13] Change uses of deprecated
 `org-export-before-processing-hook'

* lisp/ox.el (Commentary, org-export--annotate-info):
* testing/lisp/test-org-table.el (test-org-table/to-generic):
* testing/lisp/test-ox.el (test-org-export/before-processing-hook):
Switch uses of `org-export-before-processing-hook' to
`org-export-before-processing-functions'.
---
 lisp/ox.el                     | 4 ++--
 testing/lisp/test-org-table.el | 2 +-
 testing/lisp/test-ox.el        | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/lisp/ox.el b/lisp/ox.el
index 29f416fc4..bc0c9a885 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -2175,7 +2175,7 @@ org-export-expand
 ;; Filters properties are installed in communication channel with
 ;; `org-export-install-filters' function.
 ;;
-;; Eventually, two hooks (`org-export-before-processing-hook' and
+;; Eventually, two hooks (`org-export-before-processing-functions' and
 ;; `org-export-before-parsing-functions') are run at the beginning of the
 ;; export process and just before parsing to allow for heavy structure
 ;; modifications.
@@ -3100,7 +3100,7 @@ org-export--annotate-info
                                org-export-options-alist))))
         tree modified-tick)
     ;; Run first hook with current backend's name as argument.
-    (run-hook-with-args 'org-export-before-processing-hook
+    (run-hook-with-args 'org-export-before-processing-functions
                         (org-export-backend-name backend))
     (org-export-expand-include-keyword nil nil nil nil (plist-get info :expand-links))
     (org-export--delete-comment-trees)
diff --git a/testing/lisp/test-org-table.el b/testing/lisp/test-org-table.el
index e6fc64abb..076b37a8f 100644
--- a/testing/lisp/test-org-table.el
+++ b/testing/lisp/test-org-table.el
@@ -1614,7 +1614,7 @@ test-org-table/to-generic
     "a\nb"
     (let* ((fun-list (list (lambda (_backend) (search-forward "a") (insert "hook"))))
 	   (org-export-before-parsing-functions fun-list)
-	   (org-export-before-processing-hook fun-list))
+	   (org-export-before-processing-functions fun-list))
       (orgtbl-to-generic (org-table-to-lisp "| a |\n|---|\n| b |")
 			 '(:hline nil)))))
   ;; User-defined export filters are ignored.
diff --git a/testing/lisp/test-ox.el b/testing/lisp/test-ox.el
index ddf37a5f6..347a6dd97 100644
--- a/testing/lisp/test-ox.el
+++ b/testing/lisp/test-ox.el
@@ -1857,12 +1857,12 @@ test-org-export/expand-macro
 	    (buffer-string)))))
 
 (ert-deftest test-org-export/before-processing-hook ()
-  "Test `org-export-before-processing-hook'."
+  "Test `org-export-before-processing-functions'."
   (should
    (equal
     "#+macro: mac val\nTest\n"
     (org-test-with-temp-text "#+MACRO: mac val\n{{{mac}}} Test"
-      (let ((org-export-before-processing-hook
+      (let ((org-export-before-processing-functions
 	     '((lambda (backend)
 		 (while (re-search-forward "{{{" nil t)
 		   (let ((object (org-element-context)))

base-commit: df5628041dd2317f458e2903bc61fb985849c328
-- 
2.51.0

>From bc0587d7b1bf3896145b886d576e8bb5ac933a17 Mon Sep 17 00:00:00 2001
From: Morgan Smith <[email protected]>
Date: Wed, 23 Jul 2025 15:47:45 -0400
Subject: [PATCH 02/13] Use `org-link-store-props' over deprecated
 `org-store-link-props'

* doc/org-manual.org (Template expansion): Add `org-link-store-props'
vindex and use it in the main text.
---
 doc/org-manual.org | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index ff5a569d4..82a04ba71 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -8442,9 +8442,10 @@ **** Template expansion
   After completing the template, position point here.
 
 #+vindex: org-store-link-props
+#+vindex: org-link-store-props
 For specific link types, the following keywords are defined[fn:: If
 you define your own link types (see [[*Adding Hyperlink Types]]), any
-property you store with ~org-store-link-props~ can be accessed in
+property you store with ~org-link-store-props~ can be accessed in
 capture templates in a similar way.]:
 
 #+vindex: org-link-from-user-regexp
-- 
2.51.0

>From d035ba6b4bacde795d70e876a232c871277e0d66 Mon Sep 17 00:00:00 2001
From: Morgan Smith <[email protected]>
Date: Mon, 27 Oct 2025 15:13:21 -0400
Subject: [PATCH 03/13] Testing: Use advice to override time functions

When including files that have been compiled that run this macro one
would sometimes get the error "Invalid read syntax #<".

By using advice things seem to work without error now.

* testing/org-test.el (org-test-at-time): Advise time functions with
`add-function' instead of directly setting the functions with
`cl-letf'.
---
 testing/org-test.el | 102 ++++++++++++++++++++++++--------------------
 1 file changed, 56 insertions(+), 46 deletions(-)

diff --git a/testing/org-test.el b/testing/org-test.el
index 28e095440..c21c42835 100644
--- a/testing/org-test.el
+++ b/testing/org-test.el
@@ -507,52 +507,62 @@ org-test-at-time
 	    (,at (if (stringp ,tm)
 		     (org-time-string-to-time ,tm)
 		   ,tm)))
-       (cl-letf
-	   ;; Wrap builtins whose behavior can depend on the current time.
-	   (((symbol-function 'current-time)
-	     (lambda () ,at))
-	    ((symbol-function 'current-time-string)
-	     (lambda (&optional time &rest args)
-	       (apply ,(symbol-function 'current-time-string)
-		      (or time ,at) args)))
-	    ((symbol-function 'current-time-zone)
-	     (lambda (&optional time &rest args)
-	       (apply ,(symbol-function 'current-time-zone)
-		      (or time ,at) args)))
-	    ((symbol-function 'decode-time)
-	     (lambda (&optional time zone form)
-               (condition-case nil
-                   (funcall ,(symbol-function 'decode-time)
-			    (or time ,at) zone form)
-                 (wrong-number-of-arguments
-                  (funcall ,(symbol-function 'decode-time)
-			   (or time ,at))))))
-	    ((symbol-function 'encode-time)
-	     (lambda (time &rest args)
-	       (apply ,(symbol-function 'encode-time) (or time ,at) args)))
-	    ((symbol-function 'float-time)
-	     (lambda (&optional time)
-	       (funcall ,(symbol-function 'float-time) (or time ,at))))
-	    ((symbol-function 'format-time-string)
-	     (lambda (format &optional time &rest args)
-	       (apply ,(symbol-function 'format-time-string)
-		      format (or time ,at) args)))
-	    ((symbol-function 'set-file-times)
-	     (lambda (file &optional time)
-	       (funcall ,(symbol-function 'set-file-times) file (or time ,at))))
-	    ((symbol-function 'time-add)
-	     (lambda (a b) (funcall ,(symbol-function 'time-add)
-			       (or a ,at) (or b ,at))))
-	    ((symbol-function 'time-equal-p)
-	     (lambda (a b) (funcall ,(symbol-function 'time-equal-p)
-				    (or a ,at) (or b ,at))))
-	    ((symbol-function 'time-less-p)
-	     (lambda (a b) (funcall ,(symbol-function 'time-less-p)
-				    (or a ,at) (or b ,at))))
-	    ((symbol-function 'time-subtract)
-	     (lambda (a b) (funcall ,(symbol-function 'time-subtract)
-				    (or a ,at) (or b ,at)))))
-	 ,@body))))
+       (cl-flet
+           ((org-test-current-time (_fun &rest _args)
+              ,at)
+            (org-test-current-time-string (fun &optional time &rest args)
+              (apply fun
+                     (or time ,at) args))
+            (org-test-current-time-zone (fun &optional time &rest args)
+              (apply fun (or time ,at) args))
+            (org-test-decode-time (fun &optional time zone form)
+              (condition-case nil
+                  (funcall fun (or time ,at) zone form)
+                (wrong-number-of-arguments
+                 (funcall fun (or time ,at)))))
+            (org-test-encode-time (fun time &rest args)
+              (apply fun (or time ,at) args))
+            (org-test-float-time (fun &optional time)
+              (funcall fun (or time ,at)))
+            (org-test-format-time-string (fun format &optional time &rest args)
+              (apply fun format (or time ,at) args))
+            (org-test-set-file-times (fun file &optional time)
+              (funcall fun file (or time ,at)))
+            (org-test-time-add (fun a b)
+              (funcall fun (or a ,at) (or b ,at)))
+            (org-test-time-equal-p (fun a b)
+              (funcall fun (or a ,at) (or b ,at)))
+            (org-test-time-less-p (fun a b)
+              (funcall fun (or a ,at) (or b ,at)))
+            (org-test-time-subtract (fun a b)
+              (funcall fun (or a ,at) (or b ,at))))
+         (add-function :around (symbol-function 'current-time)        #'org-test-current-time)
+         (add-function :around (symbol-function 'current-time-string) #'org-test-current-time-string)
+         (add-function :around (symbol-function 'current-time-zone)   #'org-test-current-time-zone)
+         (add-function :around (symbol-function 'decode-time)         #'org-test-decode-time)
+         (add-function :around (symbol-function 'encode-time)         #'org-test-encode-time)
+         (add-function :around (symbol-function 'float-time)          #'org-test-float-time)
+         (add-function :around (symbol-function 'format-time-string)  #'org-test-format-time-string)
+         (add-function :around (symbol-function 'set-file-times)      #'org-test-set-file-times)
+         (add-function :around (symbol-function 'time-add)            #'org-test-time-add)
+         (add-function :around (symbol-function 'time-equal-p)        #'org-test-time-equal-p)
+         (add-function :around (symbol-function 'time-less-p)         #'org-test-time-less-p)
+         (add-function :around (symbol-function 'time-subtract)       #'org-test-time-subtract)
+
+         (unwind-protect
+             (progn ,@body)
+           (remove-function (symbol-function 'current-time)        #'org-test-current-time)
+           (remove-function (symbol-function 'current-time-string) #'org-test-current-time-string)
+           (remove-function (symbol-function 'current-time-zone)   #'org-test-current-time-zone)
+           (remove-function (symbol-function 'decode-time)         #'org-test-decode-time)
+           (remove-function (symbol-function 'encode-time)         #'org-test-encode-time)
+           (remove-function (symbol-function 'float-time)          #'org-test-float-time)
+           (remove-function (symbol-function 'format-time-string)  #'org-test-format-time-string)
+           (remove-function (symbol-function 'set-file-times)      #'org-test-set-file-times)
+           (remove-function (symbol-function 'time-add)            #'org-test-time-add)
+           (remove-function (symbol-function 'time-equal-p)        #'org-test-time-equal-p)
+           (remove-function (symbol-function 'time-less-p)         #'org-test-time-less-p)
+           (remove-function (symbol-function 'time-subtract)       #'org-test-time-subtract))))))
 
 (defmacro org-test-capture-warnings (&rest body)
   "Capture all warnings passed to `org-display-warning' within BODY."
-- 
2.51.0

>From 1f10fce83c61128b9db285592e2cd64fdf056000 Mon Sep 17 00:00:00 2001
From: Morgan Smith <[email protected]>
Date: Mon, 27 Oct 2025 14:06:42 -0400
Subject: [PATCH 04/13] Testing: Don't confuse local variable code with strings

* testing/lisp/test-org-footnote.el: Add a pagebreak character at the
end to silence the following message when compiling:
"Local variables list is not properly terminated".
---
 testing/lisp/test-org-footnote.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testing/lisp/test-org-footnote.el b/testing/lisp/test-org-footnote.el
index 0d7a93ce4..41268e20e 100644
--- a/testing/lisp/test-org-footnote.el
+++ b/testing/lisp/test-org-footnote.el
@@ -787,6 +787,6 @@ test-org-footnote/normalize
 	    (let ((org-footnote-section nil)) (org-footnote-normalize))
 	    (buffer-string)))))
 
-
+
 (provide 'test-org-footnote)
 ;;; test-org-footnote.el ends here
-- 
2.51.0

>From 40d8381550e49844dc1f02d4ecb2d306d44afca9 Mon Sep 17 00:00:00 2001
From: Morgan Smith <[email protected]>
Date: Thu, 16 Oct 2025 20:58:52 -0400
Subject: [PATCH 05/13] testing/lisp/test-ol.el(test-org-link/store-link): Fix
 variable typo

Let bind the variable `org-store-link-plist' instead of the function
`org-store-link-props' which wouldn't have done anything.
---
 testing/lisp/test-ol.el | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/testing/lisp/test-ol.el b/testing/lisp/test-ol.el
index 7f5e5ba72..47754b703 100644
--- a/testing/lisp/test-ol.el
+++ b/testing/lisp/test-ol.el
@@ -157,7 +157,7 @@ test-org-link/store-link
   ;; On a headline, link to that headline.  Use heading as the
   ;; description of the link.
   (should
-   (let (org-store-link-props org-stored-links)
+   (let (org-store-link-plist org-stored-links)
      (org-test-with-temp-text-in-file "* H1"
        (let ((file (buffer-file-name)))
 	 (equal (format "[[file:%s::*H1][H1]]" file)
@@ -165,32 +165,32 @@ test-org-link/store-link
   ;; On a headline, remove TODO and COMMENT keywords, priority cookie,
   ;; and tags.
   (should
-   (let (org-store-link-props org-stored-links)
+   (let (org-store-link-plist org-stored-links)
      (org-test-with-temp-text-in-file "* TODO H1"
        (let ((file (buffer-file-name)))
 	 (equal (format "[[file:%s::*H1][H1]]" file)
 		(org-store-link nil))))))
   (should
-   (let (org-store-link-props org-stored-links)
+   (let (org-store-link-plist org-stored-links)
      (org-test-with-temp-text-in-file "* COMMENT H1"
        (let ((file (buffer-file-name)))
 	 (equal (format "[[file:%s::*H1][H1]]" file)
 		(org-store-link nil))))))
   (should
-   (let (org-store-link-props org-stored-links)
+   (let (org-store-link-plist org-stored-links)
      (org-test-with-temp-text-in-file "* [#A] H1"
        (let ((file (buffer-file-name)))
 	 (equal (format "[[file:%s::*H1][H1]]" file)
 		(org-store-link nil))))))
   (should
-   (let (org-store-link-props org-stored-links)
+   (let (org-store-link-plist org-stored-links)
      (org-test-with-temp-text-in-file "* H1 :tag:"
        (let ((file (buffer-file-name)))
 	 (equal (format "[[file:%s::*H1][H1]]" file)
 		(org-store-link nil))))))
   ;; On a headline, remove any link from description.
   (should
-   (let (org-store-link-props org-stored-links)
+   (let (org-store-link-plist org-stored-links)
      (org-test-with-temp-text-in-file "* [[#l][d]]"
        (let ((file (buffer-file-name)))
 	 (equal (format "[[file:%s::*%s][d]]"
@@ -198,13 +198,13 @@ test-org-link/store-link
 			(org-link-escape "[[#l][d]]"))
 		(org-store-link nil))))))
   (should
-   (let (org-store-link-props org-stored-links)
+   (let (org-store-link-plist org-stored-links)
      (org-test-with-temp-text-in-file "* [[l]]"
        (let ((file (buffer-file-name)))
 	 (equal (format "[[file:%s::*%s][l]]" file (org-link-escape "[[l]]"))
 		(org-store-link nil))))))
   (should
-   (let (org-store-link-props org-stored-links)
+   (let (org-store-link-plist org-stored-links)
      (org-test-with-temp-text-in-file "* [[l1][d1]] [[l2][d2]]"
        (let ((file (buffer-file-name)))
 	 (equal (format "[[file:%s::*%s][d1 d2]]"
@@ -213,7 +213,7 @@ test-org-link/store-link
 		(org-store-link nil))))))
   ;; On a named element, link to that element.
   (should
-   (let (org-store-link-props org-stored-links)
+   (let (org-store-link-plist org-stored-links)
      (org-test-with-temp-text-in-file "#+NAME: foo\nParagraph"
        (let ((file (buffer-file-name)))
 	 (equal (format "[[file:%s::foo][foo]]" file)
-- 
2.51.0

>From 793f3c89ce99a5529384d388447cee76b6233c40 Mon Sep 17 00:00:00 2001
From: Morgan Smith <[email protected]>
Date: Mon, 4 Aug 2025 13:30:16 -0400
Subject: [PATCH 06/13] Testing: Fix variable typo

* testing/lisp/test-ox-html.el
(ox-html/plain-timestamps)
(ox-html/clock)
(ox-html/planning)
(ox-html/html5-fancy-timestamps):
Set the correct variable of `org-export-show-temporary-export-buffer'
instead of the non-existant one `org-export-show-temporary-buffer'.
---
 testing/lisp/test-ox-html.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/testing/lisp/test-ox-html.el b/testing/lisp/test-ox-html.el
index 679d89d22..5a8e7df3c 100644
--- a/testing/lisp/test-ox-html.el
+++ b/testing/lisp/test-ox-html.el
@@ -907,7 +907,7 @@ ox-html/plain-timestamps
 - [2025-02-17 Tue 17:00]--[2025-02-17 Fri 19:00]
 "
     (let ((export-buffer "*Test HTML Export")
-          (org-export-show-temporary-buffer nil))
+          (org-export-show-temporary-export-buffer nil))
       (org-export-to-buffer 'html export-buffer
         nil nil nil t)
       (with-current-buffer export-buffer
@@ -927,7 +927,7 @@ ox-html/clock
 :END:
 "
     (let ((export-buffer "*Test HTML Export")
-          (org-export-show-temporary-buffer nil)
+          (org-export-show-temporary-export-buffer nil)
           (org-export-with-drawers t)
           (org-export-with-clocks t))
       (org-export-to-buffer 'html export-buffer
@@ -944,7 +944,7 @@ ox-html/planning
 SCHEDULED: <2025-03-26 Wed> DEADLINE: <2025-03-27 Thu 13:00> CLOSED: [2025-03-25 Tue 19:09]
 "
     (let ((export-buffer "*Test HTML Export")
-          (org-export-show-temporary-buffer nil)
+          (org-export-show-temporary-export-buffer nil)
           (org-export-with-planning t))
       (org-export-to-buffer 'html export-buffer
         nil nil nil t)
@@ -961,7 +961,7 @@ ox-html/html5-fancy-timestamps
 <2025-06-25 Wed 19:10>
 "
    (let ((export-buffer "*Test HTML Export")
-         (org-export-show-temporary-buffer nil)
+         (org-export-show-temporary-export-buffer nil)
          (org-html-doctype "html5")
          (org-html-html5-fancy t))
      (org-export-to-buffer 'html export-buffer
-- 
2.51.0

>From 7e3e5e5646fa0469b02398bee0b97b20bf8f5dae Mon Sep 17 00:00:00 2001
From: Morgan Smith <[email protected]>
Date: Wed, 23 Jul 2025 13:20:55 -0400
Subject: [PATCH 07/13] Testing: Use line-(beginning|end)-position over
 point-at-(bol|eol)

`point-at-bol' and `point-at-eol' are obsolete since Emacs 29.1.

* testing/lisp/test-ob-R.el (test-ob-R/results-file):
* testing/lisp/test-ob-emacs-lisp.el
(ob-emacs-lisp/commented-last-block-line-no-var)
(ob-emacs-lisp/dynamic-lexical-execute):
* testing/lisp/test-ob-lob.el
(test-ob-lob/call-with-header-arguments):
* testing/lisp/test-ob-python.el
(test-ob-python/async-inline-session-output):
* testing/lisp/test-ob.el
(test-ob/simple-variable-resolution)
(test-ob/inline-src_blk-default-results-replace-line-1)
(test-ob/inline-src_blk-default-results-replace-line-2)
(test-ob/inline-src_blk-manual-results-replace)
(test-ob/inline-src_blk-results-silent)
(test-ob/inline-src_blk-results-raw)
(test-ob/commented-last-block-line-no-var)
(test-ob/commented-last-block-line-with-var)
(test-ob/remove-inline-result)
(test-ob-verify-result-and-removed-result):
* testing/lisp/test-org-list.el
(test-org-list/send-item)
(test-org-list/sort):
* testing/lisp/test-org.el (test-org/sort-entries):
* testing/lisp/test-ox.el (test-org-export/before-parsing-functions):

Replace all instances of `point-at-bol' with
`line-beginning-position'.

Replace all instances of `point-at-eol with `line-end-position'.
---
 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..b92b3e8f1 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 (line-beginning-position) (line-end-position))))
      (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 (line-beginning-position) (line-end-position)))))))
 
 
 
diff --git a/testing/lisp/test-ob-emacs-lisp.el b/testing/lisp/test-ob-emacs-lisp.el
index 6661e5928..2d8b4f42a 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 (line-beginning-position) (line-end-position)))))
   (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 (line-beginning-position) (line-end-position))))))
 
 (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 (line-beginning-position) (line-end-position))))))
 
 (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) (line-end-position)))))
 
     (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..5cd1b0ebe 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 (line-beginning-position) (line-end-position)))
 	(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..b770d1a90 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 (line-beginning-position) (line-end-position))))))))))
 
 (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 b786798d6..28118a8dd 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)))))
+			    (line-beginning-position)
+			    (line-end-position)))))
   ;; 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))))))
+	      (line-beginning-position)
+	      (line-end-position))))))
 
 (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 (line-beginning-position) (line-end-position))))
       (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 (line-beginning-position) (line-end-position))))
       (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 (line-beginning-position) (line-end-position)))))
     ;; 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 (line-beginning-position) (line-end-position))))
 	(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 (line-beginning-position) (line-end-position))))
 	(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))))))
+		(line-beginning-position) (line-end-position))))))
   (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 (line-beginning-position) (line-end-position))))
       (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 (line-beginning-position) (line-end-position))))
       (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))))))
+		(line-beginning-position) (line-end-position))))))
   (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 (line-beginning-position) (line-end-position))))
       (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 (line-beginning-position) (line-end-position))))
       (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))))))
+			(line-beginning-position) (line-end-position))))))
   (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))))
+			(line-beginning-position) (line-end-position))))
       (re-search-forward "\" ") (org-babel-execute-maybe)
       (should (string= (concat test-line " end")
 		       (buffer-substring-no-properties
-			(point-at-bol) (point-at-eol))))
+			(line-beginning-position) (line-end-position))))
       (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))))
+			(line-beginning-position) (line-end-position))))
       (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))))
+			(line-beginning-position) (line-end-position))))
       (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 (line-beginning-position) (line-end-position)))))
   (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 (line-beginning-position) (line-end-position))))))
 
 (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 (line-beginning-position) (line-end-position)))))
   (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 (line-beginning-position) (line-end-position))))))
 
 (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))))
+			(line-beginning-position) (line-end-position))))
       ;; Delete whitespace and result.
       (org-babel-remove-inline-result)
       (should (string= inline-sb-dot
 		       (buffer-substring-no-properties
-			(point-at-bol) (point-at-eol))))
+			(line-beginning-position) (line-end-position))))
       ;; Add whitespace and result before dot.
       (search-forward inline-sb)
       (insert "     " inline-res)
-      (goto-char (point-at-bol))
+      (goto-char (line-beginning-position))
       ;; Remove whitespace and result.
       (org-babel-remove-inline-result)
       (should (string= inline-sb-dot
 		       (buffer-substring-no-properties
-			(point-at-bol) (point-at-eol))))
+			(line-beginning-position) (line-end-position))))
       ;; Add whitespace before dot.
       (search-forward inline-sb)
       (insert "     ")
-      (goto-char (point-at-bol))
+      (goto-char (line-beginning-position))
       ;; 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)))))))
+			(line-beginning-position) (line-end-position)))))))
 
 (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)
+		      (line-beginning-position)
 		      (- (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..a3a526ba6 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))
+                                (line-beginning-position) (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 (line-beginning-position)
                                 '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 (line-beginning-position)
                           '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 (line-beginning-position)
+						       (line-end-position))))
 			   #'<)
 	    (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 (line-beginning-position)
+						       (line-end-position))))
 			   #'<)
 	    (buffer-string)))))
 
diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el
index 88c083def..d35f39b3c 100644
--- a/testing/lisp/test-org.el
+++ b/testing/lisp/test-org.el
@@ -3908,8 +3908,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 (line-beginning-position)
+							  (line-end-position))))
 			      #'<)
 	    (buffer-string))))
   (should
@@ -3917,8 +3917,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 (line-beginning-position)
+							  (line-end-position))))
 			      #'<)
 	    (buffer-string))))
   ;; Sort by TODO keyword.
diff --git a/testing/lisp/test-ox.el b/testing/lisp/test-ox.el
index 347a6dd97..5f0e26c73 100644
--- a/testing/lisp/test-ox.el
+++ b/testing/lisp/test-ox.el
@@ -1882,7 +1882,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))))))))
+			  (line-beginning-position) (progn (forward-line) (point))))))))
 	      (org-export-as (org-test-default-backend)))))))
 
 
-- 
2.51.0

>From 42f74bf1ec2a766dab690321f9334a9d889f750e Mon Sep 17 00:00:00 2001
From: Morgan Smith <[email protected]>
Date: Wed, 15 Oct 2025 17:57:24 -0400
Subject: [PATCH 08/13] Testing: Remove useless calls to `buffer-string'

* testing/lisp/test-ob-exp.el
(ob-exp/evaluate-all-executables-in-order):
* testing/lisp/test-ob-tangle.el
(ob-tangle/comment-links-numbering)
(ob-tangle/comment-links-relative-file)
(ob-tangle/comment-noweb-relative)
(ob-tangle/comment-noweb-absolute):
* testing/lisp/test-ob.el
(test-ob/replace-special-block-result):
Remove useless calls to `buffer-string'.
---
 testing/lisp/test-ob-exp.el    | 1 -
 testing/lisp/test-ob-tangle.el | 5 -----
 testing/lisp/test-ob.el        | 1 -
 3 files changed, 7 deletions(-)

diff --git a/testing/lisp/test-ob-exp.el b/testing/lisp/test-ob-exp.el
index 6749284d7..1706d8381 100644
--- a/testing/lisp/test-ob-exp.el
+++ b/testing/lisp/test-ob-exp.el
@@ -189,7 +189,6 @@ ob-exp/evaluate-all-executables-in-order
 	  (let ((org-export-use-babel t) *evaluation-collector*)
 	    (org-test-at-id "96cc7073-97ec-4556-87cf-1f9bffafd317"
 	      (org-narrow-to-subtree)
-	      (buffer-string)
 	      (org-test-with-expanded-babel-code *evaluation-collector*))))))
 
 (ert-deftest ob-exp/exports-inline ()
diff --git a/testing/lisp/test-ob-tangle.el b/testing/lisp/test-ob-tangle.el
index 2ab3950eb..8240aed30 100644
--- a/testing/lisp/test-ob-tangle.el
+++ b/testing/lisp/test-ob-tangle.el
@@ -135,7 +135,6 @@ ob-tangle/comment-links-numbering
            (org-babel-tangle)
            (with-temp-buffer
              (insert-file-contents "test-ob-tangle.el")
-             (buffer-string)
              (goto-char (point-min))
              (and (search-forward "[H:1]]" nil t)
                   (search-forward "[H:2]]" nil t))))
@@ -156,7 +155,6 @@ ob-tangle/comment-links-relative-file
 	   (org-babel-tangle)
 	   (with-temp-buffer
 	     (insert-file-contents "test-ob-tangle.el")
-	     (buffer-string)
 	     (goto-char (point-min))
 	     (search-forward
 	      (concat "[file:" (file-name-nondirectory file))
@@ -175,7 +173,6 @@ ob-tangle/comment-links-relative-file
 	   (org-babel-tangle)
 	   (with-temp-buffer
 	     (insert-file-contents "test-ob-tangle.el")
-	     (buffer-string)
 	     (goto-char (point-min))
 	     (search-forward (concat "[file:" file) nil t)))
        (delete-file "test-ob-tangle.el")))))
@@ -202,7 +199,6 @@ ob-tangle/comment-noweb-relative
           (org-babel-tangle)
           (with-temp-buffer
             (insert-file-contents "test-ob-tangle.el")
-            (buffer-string)
             (goto-char (point-min))
             (and
              (search-forward (concat ";; [[file:" (file-name-nondirectory file) "::inner") nil t)
@@ -231,7 +227,6 @@ ob-tangle/comment-noweb-absolute
 	   (org-babel-tangle)
 	   (with-temp-buffer
 	     (insert-file-contents "test-ob-tangle.el")
-	     (buffer-string)
 	     (goto-char (point-min))
              (and
               (search-forward (concat ";; [[file:" file "::inner") nil t)
diff --git a/testing/lisp/test-ob.el b/testing/lisp/test-ob.el
index 28118a8dd..4f5ed6ec3 100644
--- a/testing/lisp/test-ob.el
+++ b/testing/lisp/test-ob.el
@@ -687,7 +687,6 @@ test-ob/replace-special-block-result
 #+end_src"
      (org-babel-execute-src-block)
      (org-babel-execute-src-block)
-     (buffer-string)
      (search-forward "#+begin_special" nil nil 2))))
 
 (ert-deftest test-ob/catches-all-references ()
-- 
2.51.0

>From b4eb2abfd1ea232a78a62fd8807eb79c6ac66e69 Mon Sep 17 00:00:00 2001
From: Morgan Smith <[email protected]>
Date: Wed, 23 Jul 2025 14:33:01 -0400
Subject: [PATCH 09/13] Testing: Change use of
 `org-set-visibility-according-to-property'

`org-set-visibility-according-to-property' is an obsolete alias of
`org-cycle-set-visibility-according-to-property'.

* testing/lisp/test-org-fold.el
(test-org-fold/set-visibility-according-to-property): Change uses of
deprecated `org-set-visibility-according-to-property' to
`org-cycle-set-visibility-according-to-property'
---
 testing/lisp/test-org-fold.el | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/testing/lisp/test-org-fold.el b/testing/lisp/test-org-fold.el
index 42b195444..d1fbe4291 100644
--- a/testing/lisp/test-org-fold.el
+++ b/testing/lisp/test-org-fold.el
@@ -301,7 +301,7 @@ test-org-fold/copy-visible
 	        (current-kill 0 t)))))))
 
 (ert-deftest test-org-fold/set-visibility-according-to-property ()
-  "Test `org-set-visibility-according-to-property' specifications."
+  "Test `org-cycle-set-visibility-according-to-property' specifications."
   ;; "folded" state.
   (should
    (org-test-with-temp-text
@@ -311,7 +311,7 @@ test-org-fold/set-visibility-according-to-property
 :VISIBILITY: folded
 :END:
 ** <point>b"
-     (org-set-visibility-according-to-property)
+     (org-cycle-set-visibility-according-to-property)
      (invisible-p (point))))
   (org-test-with-temp-text
       "<point>
@@ -354,7 +354,7 @@ test-org-fold/set-visibility-according-to-property
 ** b
 <point>Contents
 ** c"
-     (org-set-visibility-according-to-property)
+     (org-cycle-set-visibility-according-to-property)
      (invisible-p (point))))
   (should
    (org-test-with-temp-text
@@ -366,7 +366,7 @@ test-org-fold/set-visibility-according-to-property
 ** b
 Contents
 *** <point>c"
-     (org-set-visibility-according-to-property)
+     (org-cycle-set-visibility-according-to-property)
      (invisible-p (point))))
   ;; "content" state.
   (should
@@ -379,7 +379,7 @@ test-org-fold/set-visibility-according-to-property
 ** b
 <point>Contents
 *** c"
-     (org-set-visibility-according-to-property)
+     (org-cycle-set-visibility-according-to-property)
      (invisible-p (point))))
   (should
    (org-test-with-temp-text
@@ -391,7 +391,7 @@ test-org-fold/set-visibility-according-to-property
 ** b
 Contents
 *** <point>c"
-     (org-set-visibility-according-to-property)
+     (org-cycle-set-visibility-according-to-property)
      (not (invisible-p (point)))))
   ;; "showall" state.
   (should
@@ -404,7 +404,7 @@ test-org-fold/set-visibility-according-to-property
 ** b
 <point>Contents
 *** c"
-     (org-set-visibility-according-to-property)
+     (org-cycle-set-visibility-according-to-property)
      (not (invisible-p (point)))))
   (should
    (org-test-with-temp-text
@@ -416,7 +416,7 @@ test-org-fold/set-visibility-according-to-property
 ** b
 Contents
 *** <point>c"
-     (org-set-visibility-according-to-property)
+     (org-cycle-set-visibility-according-to-property)
      (not (invisible-p (point)))))
   ;; When VISIBILITY properties are nested, do not alter parent
   ;; visibility unless necessary.
@@ -431,7 +431,7 @@ test-org-fold/set-visibility-according-to-property
 :PROPERTIES:
 :VISIBILITY: folded
 :END:"
-     (org-set-visibility-according-to-property)
+     (org-cycle-set-visibility-according-to-property)
      (invisible-p (point))))
   (should
    (org-test-with-temp-text
@@ -444,7 +444,7 @@ test-org-fold/set-visibility-according-to-property
 :PROPERTIES:
 :VISIBILITY: content
 :END:"
-     (org-set-visibility-according-to-property)
+     (org-cycle-set-visibility-according-to-property)
      (not (invisible-p (point))))))
 
 (ert-deftest test-org-fold/visibility-show-branches ()
-- 
2.51.0

>From 50b3916175a91aec77b7f387c00aac849c282bb1 Mon Sep 17 00:00:00 2001
From: Morgan Smith <[email protected]>
Date: Wed, 23 Jul 2025 13:40:13 -0400
Subject: [PATCH 10/13] Testing: Refactor org-table test

* testing/lisp/test-org-table.el
(test-org-table/org-table-calc-current-TBLFM-when-stop-because-of-error):
Don't duplicate the test string.  Don't create global variable `got'.
Don't print out the buffer-string (ert will do so if the test fails).
---
 testing/lisp/test-org-table.el | 17 ++++-------------
 1 file changed, 4 insertions(+), 13 deletions(-)

diff --git a/testing/lisp/test-org-table.el b/testing/lisp/test-org-table.el
index 076b37a8f..807ab7c84 100644
--- a/testing/lisp/test-org-table.el
+++ b/testing/lisp/test-org-table.el
@@ -1292,28 +1292,19 @@ test-org-table/org-table-calc-current-TBLFM
 
 (ert-deftest test-org-table/org-table-calc-current-TBLFM-when-stop-because-of-error ()
   "org-table-calc-current-TBLFM should preserve the input as it was."
-  (org-test-with-temp-text-in-file
-      "
-| 1 | 1 |
-| 2 | 2 |
-#+TBLFM: $2=$1*1
-#+TBLFM: $2=$1*2::$2=$1*2
-#+TBLFM: $2=$1*3
-"
-    (let ((expect "
+  (let ((expect "
 | 1 | 1 |
 | 2 | 2 |
 #+TBLFM: $2=$1*1
 #+TBLFM: $2=$1*2::$2=$1*2
 #+TBLFM: $2=$1*3
 "))
+    (org-test-with-temp-text-in-file
+        expect
       (goto-char (point-min))
       (forward-line 4)
       (should-error (org-table-calc-current-TBLFM))
-      (setq got (buffer-string))
-      (message "%s" got)
-      (should (string= got
-		       expect)))))
+      (should (string= (buffer-string) expect)))))
 
 
 ;;; Tables as Lisp
-- 
2.51.0

>From 8fcecd009a5e7feca1e0181d64e3ad16e849cda4 Mon Sep 17 00:00:00 2001
From: Morgan Smith <[email protected]>
Date: Wed, 23 Jul 2025 14:12:48 -0400
Subject: [PATCH 11/13] Testing: Suppress suspicious eq warning

* testing/lisp/test-org-element.el (test-org-element/copy): Suppress
suspicious eq warning
---
 testing/lisp/test-org-element.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/testing/lisp/test-org-element.el b/testing/lisp/test-org-element.el
index c082339c7..ecfa63a91 100644
--- a/testing/lisp/test-org-element.el
+++ b/testing/lisp/test-org-element.el
@@ -811,7 +811,9 @@ test-org-element/copy
   (should-not (org-element-copy nil))
   ;; Return a copy secondary strings.
   (should (equal '("text") (org-element-copy '("text"))))
-  (should-not (eq '("text") (org-element-copy '("text"))))
+  (with-suppressed-warnings ((suspicious eq))
+    (should-not
+     (eq '("text") (org-element-copy '("text")))))
   ;; Do not alter the source.
   (org-test-with-temp-text "*bold*"
     (let* ((source (org-element-context))
-- 
2.51.0

>From 8754c00db958c27ab4261bdff400c6487cbbbc3a Mon Sep 17 00:00:00 2001
From: Morgan Smith <[email protected]>
Date: Mon, 27 Oct 2025 15:23:42 -0400
Subject: [PATCH 12/13] Testing: Replace `eval-and-compile' with
 `eval-when-compile'

This was likely a typo that got copied and propagated.

The elisp Info page [[info:elisp#Eval During Compile]] states:
"Effectively `require' is automatically `eval-and-compile', the
package is loaded both when compiling and executing."

* testing/lisp/test-ob-lob.el:
* testing/lisp/test-ob.el:
* testing/lisp/test-org-agenda.el:
* testing/lisp/test-org-attach.el:
* testing/lisp/test-org-element.el:
* testing/lisp/test-org-fold.el:
* testing/lisp/test-org-timer.el:
* testing/lisp/test-org.el:
Replace "(eval-and-compile (require 'cl-lib))" with
"(eval-when-compile (require 'cl-lib))".
---
 testing/lisp/test-ob-lob.el      | 2 +-
 testing/lisp/test-ob.el          | 2 +-
 testing/lisp/test-org-agenda.el  | 2 +-
 testing/lisp/test-org-attach.el  | 2 +-
 testing/lisp/test-org-element.el | 2 +-
 testing/lisp/test-org-fold.el    | 2 +-
 testing/lisp/test-org-timer.el   | 2 +-
 testing/lisp/test-org.el         | 2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/testing/lisp/test-ob-lob.el b/testing/lisp/test-ob-lob.el
index 5cd1b0ebe..680f0335a 100644
--- a/testing/lisp/test-ob-lob.el
+++ b/testing/lisp/test-ob-lob.el
@@ -18,7 +18,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
-(eval-and-compile (require 'cl-lib))
+(eval-when-compile (require 'cl-lib))
 (require 'ob-lob)
 
 
diff --git a/testing/lisp/test-ob.el b/testing/lisp/test-ob.el
index 4f5ed6ec3..7e21e19f0 100644
--- a/testing/lisp/test-ob.el
+++ b/testing/lisp/test-ob.el
@@ -24,7 +24,7 @@
 (require 'org-src)
 (require 'ob-ref)
 (require 'org-table)
-(eval-and-compile (require 'cl-lib))
+(eval-when-compile (require 'cl-lib))
 
 (ert-deftest test-ob/indented-cached-org-bracket-link ()
   "When the result of a source block is a cached indented link it
diff --git a/testing/lisp/test-org-agenda.el b/testing/lisp/test-org-agenda.el
index 46ae94229..51e75102c 100644
--- a/testing/lisp/test-org-agenda.el
+++ b/testing/lisp/test-org-agenda.el
@@ -25,7 +25,7 @@
 
 (require 'org-test "../testing/org-test")
 (require 'org-agenda)
-(eval-and-compile (require 'cl-lib))
+(eval-when-compile (require 'cl-lib))
 
 
 ;; General auxiliaries
diff --git a/testing/lisp/test-org-attach.el b/testing/lisp/test-org-attach.el
index 4f0870bec..6a597752e 100644
--- a/testing/lisp/test-org-attach.el
+++ b/testing/lisp/test-org-attach.el
@@ -26,7 +26,7 @@
 
 (require 'org-test "../testing/org-test")
 (require 'org-attach)
-(eval-and-compile (require 'cl-lib))
+(eval-when-compile (require 'cl-lib))
 
 (ert-deftest test-org-attach/dir ()
   "Test `org-attach-get' specifications."
diff --git a/testing/lisp/test-org-element.el b/testing/lisp/test-org-element.el
index ecfa63a91..1bddb4053 100644
--- a/testing/lisp/test-org-element.el
+++ b/testing/lisp/test-org-element.el
@@ -19,7 +19,7 @@
 
 ;;; Code:
 
-(eval-and-compile (require 'cl-lib))
+(eval-when-compile (require 'cl-lib))
 
 (require 'org-element)
 (require 'org)
diff --git a/testing/lisp/test-org-fold.el b/testing/lisp/test-org-fold.el
index d1fbe4291..dcd5b784d 100644
--- a/testing/lisp/test-org-fold.el
+++ b/testing/lisp/test-org-fold.el
@@ -21,7 +21,7 @@
 
 ;;; Code:
 
-(eval-and-compile (require 'cl-lib))
+(eval-when-compile (require 'cl-lib))
 
 
 
diff --git a/testing/lisp/test-org-timer.el b/testing/lisp/test-org-timer.el
index bb2db5d56..1ec5afb04 100644
--- a/testing/lisp/test-org-timer.el
+++ b/testing/lisp/test-org-timer.el
@@ -21,7 +21,7 @@
 
 ;;; Code:
 
-(eval-and-compile (require 'cl-lib))
+(eval-when-compile (require 'cl-lib))
 (require 'org-timer)
 
 (defmacro test-org-timer/with-temp-text (text &rest body)
diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el
index d35f39b3c..0be682793 100644
--- a/testing/lisp/test-org.el
+++ b/testing/lisp/test-org.el
@@ -22,7 +22,7 @@
 
 ;;; Code:
 
-(eval-and-compile (require 'cl-lib))
+(eval-when-compile (require 'cl-lib))
 (eval-when-compile (require 'org-macs)) ;For `org-with-gensyms'.
 (require 'org)
 (require 'org-inlinetask)
-- 
2.51.0

>From f721ae6b4ed743154914d8aca8d42e84af164492 Mon Sep 17 00:00:00 2001
From: Morgan Smith <[email protected]>
Date: Wed, 23 Jul 2025 14:35:47 -0400
Subject: [PATCH 13/13] testing/lisp/test-ox.el: Suppress free variable
 warnings

These bindings are made using bind keywords in the org files.

* testing/lisp/test-ox.el (test-org-export/bind-keyword): Suppress
free variable warnings for "test-ox-var" and "variable".
---
 testing/lisp/test-ox.el | 100 +++++++++++++++++++++-------------------
 1 file changed, 52 insertions(+), 48 deletions(-)

diff --git a/testing/lisp/test-ox.el b/testing/lisp/test-ox.el
index 5f0e26c73..6a2b46943 100644
--- a/testing/lisp/test-ox.el
+++ b/testing/lisp/test-ox.el
@@ -94,58 +94,62 @@ test-org-export/org-export-copy-buffer
 (ert-deftest test-org-export/bind-keyword ()
   "Test reading #+BIND: keywords."
   ;; Test with `org-export-allow-bind-keywords' set to t.
-  (should
-   (org-test-with-temp-text "#+BIND: test-ox-var value"
-     (let ((org-export-allow-bind-keywords t))
-       (org-export-get-environment)
-       (eq test-ox-var 'value))))
-  ;; Test with `org-export-allow-bind-keywords' set to nil.
-  (should-not
-   (org-test-with-temp-text "#+BIND: test-ox-var value"
-     (let ((org-export-allow-bind-keywords nil))
-       (org-export-get-environment)
-       (boundp 'test-ox-var))))
-  ;; BIND keywords are case-insensitive.
-  (should
-   (org-test-with-temp-text "#+bind: test-ox-var value"
-     (let ((org-export-allow-bind-keywords t))
-       (org-export-get-environment)
-       (eq test-ox-var 'value))))
-  ;; Preserve order of BIND keywords.
-  (should
-   (org-test-with-temp-text "#+BIND: test-ox-var 1\n#+BIND: test-ox-var 2"
-     (let ((org-export-allow-bind-keywords t))
-       (org-export-get-environment)
-       (eq test-ox-var 2))))
-  ;; Read BIND keywords in setup files.
-  (should
-   (org-test-with-temp-text
-       (format "#+SETUPFILE: \"%s/examples/setupfile.org\"" org-test-dir)
-     (let ((org-export-allow-bind-keywords t))
-       (org-export-get-environment)
-       ;; `variable' is bound inside the setupfile.
-       (eq variable 'value))))
-  ;; Verify that bound variables are seen during export.
-  (should
-   (equal "Yes\n"
-	  (org-test-with-temp-text "#+BIND: test-ox-var value"
-	    (let ((org-export-allow-bind-keywords t))
-	      (org-export-as
-	       (org-export-create-backend
-		:transcoders
-		'((section . (lambda (s c i)
-			       (if (eq test-ox-var 'value) "Yes" "No"))))))))))
-  ;; Seen from elisp code blocks as well.
-  (should
-   (string-match-p "::: \"test value\""
-	           (org-test-with-temp-text "#+BIND: test-ox-var \"test value\"
+  (with-suppressed-warnings ((free-vars test-ox-var))
+    (should
+     (org-test-with-temp-text "#+BIND: test-ox-var value"
+       (let ((org-export-allow-bind-keywords t))
+         (org-export-get-environment)
+         (eq test-ox-var 'value))))
+    ;; Test with `org-export-allow-bind-keywords' set to nil.
+    (should-not
+     (org-test-with-temp-text "#+BIND: test-ox-var value"
+       (let ((org-export-allow-bind-keywords nil))
+         (org-export-get-environment)
+         (boundp 'test-ox-var))))
+    ;; BIND keywords are case-insensitive.
+    (should
+     (org-test-with-temp-text "#+bind: test-ox-var value"
+       (let ((org-export-allow-bind-keywords t))
+         (org-export-get-environment)
+         (eq test-ox-var 'value))))
+    ;; Preserve order of BIND keywords.
+    (should
+     (org-test-with-temp-text "#+BIND: test-ox-var 1\n#+BIND: test-ox-var 2"
+       (let ((org-export-allow-bind-keywords t))
+         (org-export-get-environment)
+         (eq test-ox-var 2))))
+    ;; Read BIND keywords in setup files.
+    (should
+     (org-test-with-temp-text
+         (format "#+SETUPFILE: \"%s/examples/setupfile.org\"" org-test-dir)
+       (let ((org-export-allow-bind-keywords t))
+         (org-export-get-environment)
+         ;; `variable' is bound inside the setupfile.
+         (with-suppressed-warnings ((free-vars variable))
+           (eq variable 'value)))))
+    ;; Verify that bound variables are seen during export.
+    (should
+     (equal
+      "Yes\n"
+      (org-test-with-temp-text "#+BIND: test-ox-var value"
+        (let ((org-export-allow-bind-keywords t))
+          (org-export-as
+           (org-export-create-backend
+            :transcoders
+            '((section . (lambda (s c i)
+                           (if (eq test-ox-var 'value) "Yes" "No"))))))))))
+    ;; Seen from elisp code blocks as well.
+    (should
+     (string-match-p
+      "::: \"test value\""
+      (org-test-with-temp-text "#+BIND: test-ox-var \"test value\"
 
 #+begin_src emacs-lisp :results value :exports results :eval yes
 (format \"::: %S\" test-ox-var)
 #+end_src"
-	             (let ((org-export-allow-bind-keywords t))
-	               (org-export-as
-	                (org-test-default-backend)))))))
+        (let ((org-export-allow-bind-keywords t))
+          (org-export-as
+           (org-test-default-backend))))))))
 
 (ert-deftest test-org-export/parse-option-keyword ()
   "Test reading all standard #+OPTIONS: items."
-- 
2.51.0

Reply via email to