X-Git-Url: https://git.donarmstrong.com/?p=org-ref.git;a=blobdiff_plain;f=org-ref.org;h=f01473b388c5fa6f1f25db89eb1b6d638ab5f4c2;hp=632f807648422160bafeb5e7fc24c13c9489daeb;hb=3dfba2deeaf9c0690527f9a351798af6bdb140ba;hpb=eb92f0312dda3a7a3e459e3b1bab033ba19bb1f8 diff --git a/org-ref.org b/org-ref.org index 632f807..f01473b 100644 --- a/org-ref.org +++ b/org-ref.org @@ -452,11 +452,15 @@ label:test `((t (:inherit org-link :foreground ,org-ref-ref-color))) "Face for ref links in org-ref.") - -(when org-ref-colorize-links +(defun org-ref-colorize-links () + "Colorize org-ref links." + (hi-lock-mode 1) (highlight-regexp org-ref-cite-re 'org-ref-cite-face) (highlight-regexp org-ref-label-re 'org-ref-label-face) (highlight-regexp org-ref-ref-re 'org-ref-ref-face)) + +(when org-ref-colorize-links + (add-hook 'org-mode-hook 'org-ref-colorize-links)) #+END_SRC #+RESULTS: @@ -1776,14 +1780,14 @@ We need some convenience functions to open act on the citation at point. These w (catch 'done (let ((url (bibtex-autokey-get-field "url"))) (when url - (browse-url url) + (browse-url (s-trim url)) (throw 'done nil))) (let ((doi (bibtex-autokey-get-field "doi"))) (when doi (if (string-match "^http" doi) (browse-url doi) - (browse-url (format "http://dx.doi.org/%s" doi))) + (browse-url (format "http://dx.doi.org/%s" (s-trim doi)))) (throw 'done nil)))))))) @@ -3699,10 +3703,6 @@ _o_: Open entry _e_: Email entry and pdf (email-bibtex-entry)) nil))) #+END_SRC -#+RESULTS: -: org-ref-cite-hydra/body - -cite:oberhofer-2013-first * End of code #+BEGIN_SRC emacs-lisp :tangle org-ref.el (provide 'org-ref)