From 7642dfa9b388f9f32ad7ebdceb461609078f1718 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20A=2E=20Gomes?= Date: Thu, 7 Oct 2021 21:15:26 +0300 Subject: [PATCH 16/76] Deprecate org-babel-ref-goto-headline-id. --- 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 58bc5b25f..3f6f55c86 100644 --- a/lisp/ob-core.el +++ b/lisp/ob-core.el @@ -43,7 +43,7 @@ (declare-function org-at-item-p "org-list" ()) (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-headline-id "ob-ref" (id)) +(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-parse "ob-ref" (assignment)) (declare-function org-babel-ref-resolve "ob-ref" (ref)) @@ -2881,7 +2881,7 @@ block but are passed literally to the \"example-block\"." (let ((raw (org-babel-ref-resolve id))) (if (stringp raw) raw (format "%S" raw)))) ;; Return the contents of headings literally. - ((org-babel-ref-goto-headline-id id) + ((org-babel-ref-goto-heading-id id) (org-babel-ref-headline-body)) ;; Look for a source block named SOURCE-NAME. If ;; found, assume it is unique; do not look after diff --git a/lisp/ob-ref.el b/lisp/ob-ref.el index 04b797f0f..c728f282b 100644 --- a/lisp/ob-ref.el +++ b/lisp/ob-ref.el @@ -94,7 +94,7 @@ Emacs Lisp representation of the value of the variable." (org-babel-ref-resolve ref)) out)))))) -(defun org-babel-ref-goto-headline-id (id) +(defun org-babel-ref-goto-heading-id (id) (or (let ((h (org-find-property "CUSTOM_ID" id))) (when h (goto-char h))) (let* ((file (org-id-find-id-file id)) @@ -183,7 +183,7 @@ Emacs Lisp representation of the value of the variable." (throw :found v)) (_ (error "Reference not found"))))))) ;; Check for local or global headings by ID. - (when (org-babel-ref-goto-headline-id ref) + (when (org-babel-ref-goto-heading-id ref) (throw :found (org-babel-ref-headline-body))) ;; Check the Library of Babel. (let ((info (cdr (assq (intern ref) diff --git a/lisp/org-compat.el b/lisp/org-compat.el index cc3e14dad..ae0e3cdb7 100644 --- a/lisp/org-compat.el +++ b/lisp/org-compat.el @@ -340,6 +340,8 @@ Counting starts at 1." 'org-ascii-heading "9.5") (define-obsolete-variable-alias 'org-ascii-headline-spacing 'org-ascii-heading-spacing "9.5") +(define-obsolete-function-alias 'org-babel-ref-goto-headline-id + 'org-babel-ref-goto-heading-id "9.5") (defun org-in-fixed-width-region-p () "Non-nil if point in a fixed-width region." -- 2.33.0