From 81c855c66c5650dbbcab6b47be8e6a18b8be3431 Mon Sep 17 00:00:00 2001 From: John Kitchin Date: Sun, 15 Mar 2015 18:23:45 -0400 Subject: [PATCH 1/1] add bibliographystyle completion --- org-ref.el | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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) -- 2.39.2