emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] open pdfs in subdirectories in org-ref


From: 童俊翔
Subject: [O] open pdfs in subdirectories in org-ref
Date: Sat, 24 Sep 2016 00:07:08 +0800

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!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]