From: 童俊翔 <tongjunxiang@gmail.com>
To: Org mode <emacs-orgmode@gnu.org>
Subject: open pdfs in subdirectories in org-ref
Date: Sat, 24 Sep 2016 00:07:08 +0800 [thread overview]
Message-ID: <CAJt_njQotVhSayb7vCUPhRcNQDEMHng3ZW2GeWeOwV6iTxeytA@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 755 bytes --]
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!
[-- Attachment #2: Type: text/html, Size: 2915 bytes --]
next reply other threads:[~2016-09-23 16:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-23 16:07 童俊翔 [this message]
2016-09-24 2:11 ` open pdfs in subdirectories in org-ref Adam Porter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJt_njQotVhSayb7vCUPhRcNQDEMHng3ZW2GeWeOwV6iTxeytA@mail.gmail.com \
--to=tongjunxiang@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).