Function: org-footnote-goto-definition

org-footnote-goto-definition is an interactive and byte-compiled function defined in org-footnote.el.gz.

Signature

(org-footnote-goto-definition LABEL &optional LOCATION)

Documentation

Move point to the definition of the footnote LABEL.

LOCATION, when non-nil specifies the buffer position of the definition.

Throw an error if there is no definition or if it cannot be reached from current narrowed part of buffer. Return a non-nil value if point was successfully moved.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-footnote.el.gz
(defun org-footnote-goto-definition (label &optional location)
  "Move point to the definition of the footnote LABEL.

LOCATION, when non-nil specifies the buffer position of the
definition.

Throw an error if there is no definition or if it cannot be
reached from current narrowed part of buffer.  Return a non-nil
value if point was successfully moved."
  (interactive "sLabel: ")
  (let* ((label (org-footnote-normalize-label label))
	 (def-start (or location (nth 1 (org-footnote-get-definition label)))))
    (cond
     ((not def-start)
      (user-error "Cannot find definition of footnote %s" label))
     ((or (> def-start (point-max)) (< def-start (point-min)))
      (user-error "Definition is outside narrowed part of buffer")))
    (org-mark-ring-push)
    (goto-char def-start)
    (looking-at (format "\\[fn:%s[]:]" (regexp-quote label)))
    (goto-char (match-end 0))
    (org-fold-show-context 'link-search)
    (when (derived-mode-p 'org-mode)
      (message "%s" (substitute-command-keys
		     "Edit definition and go back with \
`\\[org-mark-ring-goto]' or, if unique, with `\\[org-ctrl-c-ctrl-c]'.")))
    t))