X-Git-Url: https://git.donarmstrong.com/?p=org-ref.git;a=blobdiff_plain;f=org-ref.el;h=87deb290285bd15b47a05e8535faadba807b627f;hp=27d04f88994df22173a7456affe85afbef88e62b;hb=81c855c66c5650dbbcab6b47be8e6a18b8be3431;hpb=adf9336b73c609722c97a25045a0f4bebb984416 diff --git a/org-ref.el b/org-ref.el index 27d04f8..87deb29 100644 --- a/org-ref.el +++ b/org-ref.el @@ -334,7 +334,7 @@ You will see a message in the minibuffer when on a cite, ref or label link." (setq org-ref-ref-re - "ref:\\([a-zA-Z0-9-_:]*,?\\)*") + "\\(eq\\)?ref:\\([a-zA-Z0-9-_:]*,?\\)*") (defface org-ref-cite-face @@ -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) @@ -1753,7 +1768,7 @@ get a lot of options. LINK-STRING is used by the link function." choice 2)))))) -;; ** Generation of the cite links +;; *** Generation of the cite links (defmacro org-ref-make-completion-function (type) "Macro to make a link completion function for a link of TYPE." `(defun ,(intern (format "org-%s-complete-link" type)) (&optional arg)