From 8758611b7670699ecaf4335933666a5967f39065 Mon Sep 17 00:00:00 2001 From: John Kitchin Date: Tue, 19 May 2015 13:41:47 -0400 Subject: [PATCH] make the example user function more functional. shows how to add a function to open a pdf in emacs. --- org-ref.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/org-ref.el b/org-ref.el index a019182..72b4b52 100644 --- a/org-ref.el +++ b/org-ref.el @@ -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 -- 2.39.2