make the example user function more functional.
authorJohn Kitchin <jkitchin@andrew.cmu.edu>
Tue, 19 May 2015 17:41:47 +0000 (13:41 -0400)
committerJohn Kitchin <jkitchin@andrew.cmu.edu>
Tue, 19 May 2015 17:41:47 +0000 (13:41 -0400)
shows how to add a function to open a pdf in emacs.

org-ref.el

index a019182..72b4b52 100644 (file)
@@ -3398,7 +3398,13 @@ This is a list of cons cells '((\"description\" . action)). The action function
 ;; example of adding your own function
 (add-to-list
  'org-ref-helm-user-candidates
- '("Example" . (lambda () (message-box "You did it!")))
+ '("Open pdf in emacs" . (lambda ()
+
+                          (find-file
+                           (concat
+                            org-ref-pdf-directory
+                            (car (org-ref-get-bibtex-key-and-file))
+                            ".pdf"))))
  t)
 
 ;;;###autoload