Function: org-bibtex-create

org-bibtex-create is an interactive and byte-compiled function defined in ol-bibtex.el.gz.

Signature

(org-bibtex-create &optional ARG UPDATE-HEADING)

Documentation

Create a new entry at the given level.

With a prefix ARG, query for optional fields as well. If UPDATE-HEADING is non-nil, add data to the headline of the entry at point.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/org/ol-bibtex.el.gz
(defun org-bibtex-create (&optional arg update-heading)
  "Create a new entry at the given level.
With a prefix ARG, query for optional fields as well.
If UPDATE-HEADING is non-nil, add data to the headline of the entry at
point."
  (interactive "P")
  (let* ((type (completing-read
		"Type: " (mapcar (lambda (type)
				   (substring (symbol-name (car type)) 1))
				 org-bibtex-types)
		nil nil (when update-heading
		      (org-bibtex-get org-bibtex-type-property-name))))
	 (type (if (keywordp type) type (intern (concat ":" type))))
	 (org-bibtex-treat-headline-as-title (if update-heading nil t)))
    (unless (assoc type org-bibtex-types)
      (error "Type:%s is not known" type))
    (if update-heading
	(org-back-to-heading)
      (org-insert-heading)
      (let ((title (org-bibtex-ask :title)))
	(insert title)
	(org-bibtex-put "TITLE" title)))
    (org-bibtex-put org-bibtex-type-property-name
		    (substring (symbol-name type) 1))
    (org-bibtex-fleshout type arg)
    (dolist (tag org-bibtex-tags) (org-toggle-tag tag 'on))))