branch: externals/org
commit 1267b81ec8fb552f0e7a6ab4bbb15efebbf45560
Author: Morgan Smith <[email protected]>
Commit: Ihor Radchenko <[email protected]>
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 7a110a98f9..ff5a569d4e 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -16750,6 +16750,7 @@ for usage and configuration details.
#+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 267f19c868..881890b8ba 100644
--- a/lisp/org-attach.el
+++ b/lisp/org-attach.el
@@ -772,7 +772,7 @@ Basically, this adds the path to the attachment directory."
(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 76af098d44..29f416fc4f 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -2176,7 +2176,7 @@ keywords before output."
;; `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 @@ still inferior to file-local settings."
;; 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 b56d555762..e6fc64abb6 100644
--- a/testing/lisp/test-org-table.el
+++ b/testing/lisp/test-org-table.el
@@ -1613,7 +1613,7 @@ See also `test-org-table/copy-field'."
(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 0cc46f84ed..279642d94b 100644
--- a/testing/lisp/test-ox.el
+++ b/testing/lisp/test-ox.el
@@ -1871,12 +1871,12 @@ Footnotes[fn:2], foot[fn:test] and [fn:inline:inline
footnote]
(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)