Function: org-footnote-all-labels

org-footnote-all-labels is a byte-compiled function defined in org-footnote.el.gz.

Signature

(org-footnote-all-labels)

Documentation

List all defined footnote labels used throughout the buffer.

This function ignores narrowing, if any.

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-footnote.el.gz
(defun org-footnote-all-labels ()
  "List all defined footnote labels used throughout the buffer.
This function ignores narrowing, if any."
  (org-with-wide-buffer
   (goto-char (point-min))
   (let (all)
     (while (re-search-forward org-footnote-re nil t)
       (backward-char)
       (let ((context (org-element-context)))
	 (when (org-element-type-p
                context '(footnote-definition footnote-reference))
	   (let ((label (org-element-property :label context)))
	     (when label (cl-pushnew label all :test #'equal))))))
     all)))