From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: org-ref: various directories Date: Thu, 14 May 2015 07:28:25 -0400 Message-ID: References: <55539F59.1070302@uni-bonn.de> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b6d8d96a2f91d05160906c7 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43764) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsrJU-0007xg-L2 for emacs-orgmode@gnu.org; Thu, 14 May 2015 07:28:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YsrJT-00085p-CL for emacs-orgmode@gnu.org; Thu, 14 May 2015 07:28:28 -0400 Received: from mail-pa0-x232.google.com ([2607:f8b0:400e:c03::232]:32987) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsrJS-00085H-C6 for emacs-orgmode@gnu.org; Thu, 14 May 2015 07:28:27 -0400 Received: by pacwv17 with SMTP id wv17so82692873pac.0 for ; Thu, 14 May 2015 04:28:25 -0700 (PDT) In-Reply-To: <55539F59.1070302@uni-bonn.de> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Michael Giepen Cc: "emacs-orgmode@gnu.org" --047d7b6d8d96a2f91d05160906c7 Content-Type: text/plain; charset=UTF-8 The thing to do here is write a function that will take a bibtex key, and loop through your directories to find the pdf, and then return the full path to the pdf. Then customize the variable org-ref-get-pdf-filename-function to point to that function. https://github.com/jkitchin/org-ref/blob/master/org-ref.el#L122 Out of the box, org-ref expects all the pdfs to be named key.pdf and to be in a single directory. That is partly due to this library https://github.com/jkitchin/org-ref/blob/master/doi-utils.el which downloads pdfs for you from a doi in that format. John ----------------------------------- 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 On Wed, May 13, 2015 at 3:00 PM, Michael Giepen wrote: > Hello, > > I just cannot get org-ref to accept various directories: > > I tried > > (setq org-ref-pdf-directory (quote ( > "/home/mcg/thesis/library/folder1/" > "/home/mcg/thesis/library/folder2/" > "/home/mcg/thesis/library/folder3/" > ))) > > > It would also suffice if I could include subdirectories of > .../thesis/library/ > > > > --047d7b6d8d96a2f91d05160906c7 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
The thing to do here is write a function that will take a = bibtex key, and loop through your directories to find the pdf, and then ret= urn the full path to the pdf. Then customize the variable=C2=A0org-ref-get-pdf-filename-function to point to t= hat function.


Out of the b= ox, org-ref expects all the pdfs to be named key.pdf and to be in a single = directory. That is partly due to this library=C2=A0https://github.com/jkitchi= n/org-ref/blob/master/doi-utils.el which downloads pdfs for you from a = doi in that format.

John

-----------------------------------
Professor John Kitchin= =C2=A0
Doherty Hall A207F
Department of Chemical Engineering
Carne= gie Mellon University
Pittsburgh, PA 15213
412-268-7803

On Wed, May 13, 2015 at 3:00 PM, Michael Gie= pen <mgiepen@uni-bonn.de> wrote:
Hello,

I just cannot get org-ref to accept various directories:

I tried

(setq org-ref-pdf-directory (quote (
"/home/mcg/thesis/library/folder1/"
"/home/mcg/thesis/library/folder2/"
"/home/mcg/thesis/library/folder3/"
)))


It would also suffice if I could include subdirectories of .../thesis/libra= ry/




--047d7b6d8d96a2f91d05160906c7--