I want to open pdfs in subdirectories in org-ref as described as
https://github.com/jkitchin/org-ref/issues/172
my .emacs is configued as following
(setq org-ref-open-pdf-function 'my/org-ref-open-pdf-at-point)
(defun my/org-ref-open-pdf-at-point ()
"Open the pdf for bibtex key under point if it exists."
(interactive)
(let* ((results (org-ref-get-bibtex-key-and-file))
(key (car results))
(pdf-file (funcall org-ref-get-pdf-filename-function key))
(pdf-other (bibtex-completion-find-pdf key)))
(cond ((file-exists-p pdf-file)
(org-open-file pdf-file))
(pdf-other
(org-open-file pdf-other))
(message "No PDF found for %s" key))))
But I failed. What is the problem? Thank you for your help!