Function: bib-edit-citation
bib-edit-citation is a byte-compiled function defined in bib-cite.el.
Signature
(bib-edit-citation)
Documentation
Do the edit of cite info. Return t if found cite key, nil otherwise.
Find and and put edit point in bib file associated with a BibTeX citation
under cursor from \bibliography input file.
In a multi-entry cite command, the cursor should be on the actual cite key
desired (otherwise a random entry will be selected).
e.g.: \cite{Wadhams81,Bourke.et.al87,SchneiderBudeus94}
^Display-this-citation
Source Code
;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/bib-cite.el
(defun bib-edit-citation ()
"Do the edit of cite info. Return t if found cite key, nil otherwise.
Find and and put edit point in bib file associated with a BibTeX citation
under cursor from \\bibliography input file.
In a multi-entry cite command, the cursor should be on the actual cite key
desired (otherwise a random entry will be selected).
e.g.: \\cite{Wadhams81,Bourke.et.al87,SchneiderBudeus94}
^Display-this-citation"
(let ((the-keys-obarray (bib-get-citekeys-obarray)) ;1st in case of error
(bib-buffer (bib-get-bibliography t))
(the-key)(the-file))
(save-excursion
(mapatoms ;Do this for each cite-key found...
(lambda (cite-key)
(setq the-key (symbol-name cite-key)))
the-keys-obarray)
(set-buffer bib-buffer)
(goto-char (point-min))
(if (not (re-search-forward
(concat "@[^{(]+[{(][\t ]*" (regexp-quote the-key) "[ ,\n]")
nil t))
(progn
(kill-buffer bib-buffer)
(error "Sorry, could not find bib entry for %s" the-key))
(re-search-backward "%%%Filename: \\([^\n]*\\)" nil t)
(setq the-file (match-string 1))
(kill-buffer bib-buffer)))
;;; (find-file the-file)
(funcall bib-switch-to-buffer-function (find-file-noselect the-file))
(goto-char (point-min)) ;V2.19 fix
(re-search-forward (concat "@[^{(]+[{(][\t ]*"
(regexp-quote the-key)
"[ ,\n]") nil t)))