Function: org-cite-insert
org-cite-insert is an autoloaded, interactive and byte-compiled
function defined in oc.el.gz.
Signature
(org-cite-insert ARG)
Documentation
Insert a citation at point.
Insertion is done according to the processor set in org-cite-insert-processor.
ARG is the prefix argument received when calling interactively the function.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/org/oc.el.gz
;;;###autoload
(defun org-cite-insert (arg)
"Insert a citation at point.
Insertion is done according to the processor set in `org-cite-insert-processor'.
ARG is the prefix argument received when calling interactively the function."
(interactive "P")
(unless org-cite-insert-processor
(user-error "No processor set to insert citations"))
(org-cite-try-load-processor org-cite-insert-processor)
(let ((name org-cite-insert-processor))
(cond
((not (org-cite-get-processor name))
(user-error "Unknown processor %S" name))
((not (org-cite-processor-has-capability-p name 'insert))
(user-error "Processor %S cannot insert citations" name))
(t
(let ((context (org-element-context))
(insert (org-cite-processor-insert (org-cite-get-processor name))))
(cond
((org-element-type-p context '(citation citation-reference))
(funcall insert context arg))
((org-cite--allowed-p context)
(funcall insert nil arg))
(t
(user-error "Cannot insert a citation here"))))))))