From: John Kitchin Date: Sun, 15 Mar 2015 22:23:45 +0000 (-0400) Subject: add bibliographystyle completion X-Git-Url: https://git.donarmstrong.com/?p=org-ref.git;a=commitdiff_plain;h=81c855c66c5650dbbcab6b47be8e6a18b8be3431 add bibliographystyle completion --- diff --git a/org-ref.el b/org-ref.el index 939b8ee..87deb29 100644 --- a/org-ref.el +++ b/org-ref.el @@ -748,11 +748,26 @@ Format according to the type in `org-ref-bibliography-entry-format'." ;; write out the latex bibliography command (format "\\bibliographystyle{%s}" keyword))))) + +(defun org-bibliographystyle-complete-link (&optional arg) + "Completion function for bibliographystyle link. +ARG does nothing." + (format "bibliographystyle:%s" (ido-completing-read + "style: " + '("unsrt" "plain" "alpha" + ;; natbib + ;; https://www.sharelatex.com/learn/Natbib_bibliography_styles + "dinat" "humannat" "plainnat" + "abbrnat" "unsrtnat" "rusnat" + "ksfhnat")))) + + (defun org-bibliography-complete-link (&optional arg) "Completion function for bibliography link. ARG does nothing." (format "bibliography:%s" (read-file-name "enter file: " nil nil t))) + (defun org-ref-insert-bibliography-link () "Insert a bibliography with completion." (interactive)