From 0367a4609671c314527b6afe3f9d498c0dbab691 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20A=2E=20Gomes?= Date: Sat, 9 Oct 2021 17:06:22 +0300 Subject: [PATCH 75/76] Deprecate org-bibtex-headline. --- lisp/ol-bibtex.el | 10 +++++----- lisp/org-compat.el | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lisp/ol-bibtex.el b/lisp/ol-bibtex.el index dd3b15300..47392b90e 100644 --- a/lisp/ol-bibtex.el +++ b/lisp/ol-bibtex.el @@ -353,7 +353,7 @@ and `org-tags-exclude-from-inheritance'." prop) value))) -(defun org-bibtex-headline () +(defun org-bibtex-heading () "Return a bibtex entry of the given heading as a string." (letrec ((val (lambda (key lst) (cdr (assoc key lst)))) (to (lambda (string) (intern (concat ":" string)))) @@ -436,7 +436,7 @@ and `org-tags-exclude-from-inheritance'." "Generate an autokey for the current heading." (org-bibtex-put org-bibtex-key-property (if org-bibtex-autogen-keys - (let* ((entry (org-bibtex-headline)) + (let* ((entry (org-bibtex-heading)) (key (with-temp-buffer (insert entry) @@ -581,7 +581,7 @@ ARG, when non-nil, is a universal prefix argument. See ;;; Bibtex <-> Org heading translation functions (defun org-bibtex (filename) "Export each heading in the current file to a bibtex entry. -Headings are exported using `org-bibtex-headline'." +Headings are exported using `org-bibtex-heading'." (interactive (list (read-file-name "Bibtex file: " nil nil nil @@ -595,7 +595,7 @@ Headings are exported using `org-bibtex-headline'." (remove nil (org-map-entries (lambda () (condition-case nil - (org-bibtex-headline) + (org-bibtex-heading) (error (throw 'bib (point))))))))) (with-temp-file filename (insert (mapconcat #'identity bibtex-entries "\n"))) @@ -751,7 +751,7 @@ Return the number of saved entries." (defun org-bibtex-export-to-kill-ring () "Export current heading to kill ring as bibtex entry." (interactive) - (let ((result (org-bibtex-headline))) + (let ((result (org-bibtex-heading))) (kill-new result) result)) (defun org-bibtex-search (string) diff --git a/lisp/org-compat.el b/lisp/org-compat.el index 62495d4ce..8ce17226c 100644 --- a/lisp/org-compat.el +++ b/lisp/org-compat.el @@ -346,6 +346,8 @@ Counting starts at 1." 'org-babel-ref-heading-body "9.5") (define-obsolete-function-alias 'org-beamer-headline 'org-beamer-heading "9.5") +(define-obsolete-function-alias 'org-bibtex-headline + 'org-bibtex-heading "9.5") (define-obsolete-variable-alias 'org-bibtex-headline-format-function 'org-bibtex-heading-format-function "9.5") (define-obsolete-variable-alias 'org-bibtex-treat-headline-as-title -- 2.33.0