]> git.donarmstrong.com Git - org-ref.git/commitdiff
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 a0191829ed1dd69428cfacd1eaa6d5857a56da21..72b4b528d9741b8722b4377d751474e5f0b60542 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