X-Git-Url: https://git.donarmstrong.com/?p=org-ref.git;a=blobdiff_plain;f=org-ref.el;h=939b8ee7102ee218574b0fac89f6616c3ec2177f;hp=430ae0e8806164032c4091b02ffb6b22170b7026;hb=8fdd53a3bd27b0027513093841036ef2253889b4;hpb=1966dbdc30a4c41858474c78d201e267928c6846 diff --git a/org-ref.el b/org-ref.el index 430ae0e..939b8ee 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 @@ -1753,7 +1753,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) @@ -3315,6 +3315,38 @@ _o_: Open entry _e_: Email entry and pdf (org-ref-open-citation-at-point) (email-bibtex-entry)) nil))) +;; * org-ref-help +(defun org-ref-help () + "Open the org-ref manual." + (interactive) + (find-file (expand-file-name + "org-ref.org" + (file-name-directory + (find-library-name "org-ref"))))) + +;; * org-ref menu +(defun org-ref-org-menu () + "Add org-ref menu to the Org menu." + + (easy-menu-change + '("Org") "org-ref" + '( ["Insert citation" org-ref-helm-insert-cite-link] + ["Insert ref" org-ref-helm-insert-ref-link] + ["Insert label" org-ref-helm-insert-label-link] + "--" + ["List of figures" org-ref-list-of-figures] + ["List of tables" org-ref-list-of-tables] + ["Extract bibtex entries" org-ref-extract-bibtex-entries] + ["Check org-file" org-ref] + "--" + ["Help" org-ref-help] + ["Customize org-ref" (customize-group 'org-ref)]) + "Show/Hide") + + (easy-menu-change '("Org") "--" nil "Show/Hide")) + +(add-hook 'org-mode-hook 'org-ref-org-menu) + ;; * The end (provide 'org-ref)