Function: reftex-echo-cite
reftex-echo-cite is a byte-compiled function defined in
reftex-dcr.el.gz.
Signature
(reftex-echo-cite KEY FILES ITEM)
Source Code
;; Defined in /usr/src/emacs/lisp/textmodes/reftex-dcr.el.gz
(defun reftex-echo-cite (key files item)
;; Display citation info in echo area.
(let* ((cache (assq 'bibview-cache (symbol-value reftex-docstruct-symbol)))
(cache-entry (assoc key (cdr cache)))
entry string buf (all-files files))
(if (and reftex-cache-cite-echo cache-entry)
;; We can just use the cache
(setq string (cdr cache-entry))
;; Need to look in the database
(unless reftex-revisit-to-echo
(setq files (reftex-visited-files files)))
(setq entry
(condition-case nil
(save-excursion
(reftex-pop-to-bibtex-entry key files nil nil item t))
(error
(if (and files (= (length all-files) (length files)))
(message "cite: no such database entry: %s" key)
(message "%s" (substitute-command-keys
(format reftex-no-info-message "cite"))))
nil)))
(when entry
(if item
(setq string (reftex-nicify-text entry))
(setq string (reftex-make-cite-echo-string
(reftex-parse-bibtex-entry entry)
reftex-docstruct-symbol)))))
(unless (or (null string) (equal string ""))
(message "cite: %s" string))
(when (setq buf (get-buffer " *Echo Area*"))
(with-current-buffer buf
(run-hooks 'reftex-display-copied-context-hook)))))