From a8a092f38c8b039042cd5d4073f2d6e1e94785e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20A=2E=20Gomes?= Date: Thu, 7 Oct 2021 21:18:47 +0300 Subject: [PATCH 17/76] Deprecate org-babel-ref-headline-body. --- lisp/ob-core.el | 4 ++-- lisp/ob-ref.el | 4 ++-- lisp/org-compat.el | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lisp/ob-core.el b/lisp/ob-core.el index 3f6f55c86..c25e3fd37 100644 --- a/lisp/ob-core.el +++ b/lisp/ob-core.el @@ -44,7 +44,7 @@ (declare-function org-at-table-p "org" (&optional table-type)) (declare-function org-babel-lob-execute-maybe "ob-lob" ()) (declare-function org-babel-ref-goto-heading-id "ob-ref" (id)) -(declare-function org-babel-ref-headline-body "ob-ref" ()) +(declare-function org-babel-ref-heading-body "ob-ref" ()) (declare-function org-babel-ref-parse "ob-ref" (assignment)) (declare-function org-babel-ref-resolve "ob-ref" (ref)) (declare-function org-babel-ref-split-args "ob-ref" (arg-string)) @@ -2882,7 +2882,7 @@ block but are passed literally to the \"example-block\"." (if (stringp raw) raw (format "%S" raw)))) ;; Return the contents of headings literally. ((org-babel-ref-goto-heading-id id) - (org-babel-ref-headline-body)) + (org-babel-ref-heading-body)) ;; Look for a source block named SOURCE-NAME. If ;; found, assume it is unique; do not look after ;; `:noweb-ref' header argument. diff --git a/lisp/ob-ref.el b/lisp/ob-ref.el index c728f282b..4a17dc8cf 100644 --- a/lisp/ob-ref.el +++ b/lisp/ob-ref.el @@ -107,7 +107,7 @@ Emacs Lisp representation of the value of the variable." (org-show-context) t)))) -(defun org-babel-ref-headline-body () +(defun org-babel-ref-heading-body () (save-restriction (org-narrow-to-subtree) (buffer-substring @@ -184,7 +184,7 @@ Emacs Lisp representation of the value of the variable." (_ (error "Reference not found"))))))) ;; Check for local or global headings by ID. (when (org-babel-ref-goto-heading-id ref) - (throw :found (org-babel-ref-headline-body))) + (throw :found (org-babel-ref-heading-body))) ;; Check the Library of Babel. (let ((info (cdr (assq (intern ref) org-babel-library-of-babel)))) diff --git a/lisp/org-compat.el b/lisp/org-compat.el index ae0e3cdb7..95b08e237 100644 --- a/lisp/org-compat.el +++ b/lisp/org-compat.el @@ -342,6 +342,8 @@ Counting starts at 1." 'org-ascii-heading-spacing "9.5") (define-obsolete-function-alias 'org-babel-ref-goto-headline-id 'org-babel-ref-goto-heading-id "9.5") +(define-obsolete-function-alias 'org-babel-ref-headline-body + 'org-babel-ref-heading-body "9.5") (defun org-in-fixed-width-region-p () "Non-nil if point in a fixed-width region." -- 2.33.0