From: John Kitchin <jkitchin@andrew.cmu.edu>
To: "Georg W. Otto" <g.otto@ucl.ac.uk>
Cc: emacs-orgmode@gnu.org
Subject: Re: org-ref file path to pdf
Date: Thu, 08 Dec 2016 21:08:43 -0500 [thread overview]
Message-ID: <m2bmwl6ehg.fsf@Johns-MacBook-Air.local> (raw)
In-Reply-To: <m2wpfba9pz.fsf@georgotto.de>
I just pushed a feature that might get you back what you want.
You can now put [[file:%F][%f]] in the org-ref-note-title-format
variable, and it will put (concat org-ref-pdf-directory key ".pdf") in
for %F, and (concat key ".pdf") in for %f. There is unfortunately, no
check if the pdf actually exists though.
A second option is to write a function to add to a new hook variable:
org-ref-create-notes-hook
There is an example function in that that adds a cite link (which can
open a pdf), but if you wanted to you could write a function that would
add a file link to a pdf if it could find one.
I hope those help.
Georg W. Otto writes:
> John Kitchin <jkitchin@andrew.cmu.edu> writes:
>
>> This doesn't sound like something that should be happening I think. How
>> current is your org-ref?
>>
>> I do not use the notes feature so it does not get tested too often. You
>> may be able to control the format of the notes created with the variable
>> org-ref-note-title-format if you are using the default notes function
>> that adds a headline.
>>
>>
>
> my org ref version was 20160503 from elpa. I updated it to 20161129 and
> here the part of org-ref-open-bibtex-notes that inserts a link to the
> pdf is commented out. However I like this functionality, so I keep the
> older version of org-ref-open-bibtex-notes in my init file.
>
> Sorry about asking about a functionality that has been removed, but I
> still do not understand why it it does expand my ~/dir to
> /home/user/dir.
>
> My org-ref-open-bibtex-notes is set to adaptive.
>
> It might happen here, but I do not understand elisp enough to tell:
>
> (setq pdf (-first 'f-file?
> (--map (f-join it (concat key ".pdf"))
> (-flatten (list org-ref-pdf-directory)))))
>
> (if (file-exists-p pdf)
> (insert (format
> " [[file:%s][pdf]]\n\n"
> pdf)))
>
>
> Cheers,
>
> Georg
--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu
next prev parent reply other threads:[~2016-12-09 2:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-06 12:36 org-ref file path to pdf Georg W. Otto
2016-12-07 15:03 ` John Kitchin
2016-12-07 18:13 ` Georg W. Otto
2016-12-09 2:08 ` John Kitchin [this message]
2016-12-13 18:59 ` Georg W. Otto
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2bmwl6ehg.fsf@Johns-MacBook-Air.local \
--to=jkitchin@andrew.cmu.edu \
--cc=emacs-orgmode@gnu.org \
--cc=g.otto@ucl.ac.uk \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.