From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Kiermeier Subject: Re: Problem with org-ref Date: Sat, 26 Dec 2015 15:22:05 +1030 Message-ID: References: <9B7FD49A-1A5F-42D3-9D9F-72BB151AF28C@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113b39eabda80f0527c5d72e Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33264) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aCgqW-0001ty-2n for emacs-orgmode@gnu.org; Fri, 25 Dec 2015 23:52:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aCgqU-0005ZD-5R for emacs-orgmode@gnu.org; Fri, 25 Dec 2015 23:52:48 -0500 Received: from mail-qg0-x232.google.com ([2607:f8b0:400d:c04::232]:34565) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aCgqT-0005Z5-VZ for emacs-orgmode@gnu.org; Fri, 25 Dec 2015 23:52:46 -0500 Received: by mail-qg0-x232.google.com with SMTP id 6so40584045qgy.1 for ; Fri, 25 Dec 2015 20:52:45 -0800 (PST) In-Reply-To: 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: John Kitchin Cc: "emacs-orgmode@gnu.org" --001a113b39eabda80f0527c5d72e Content-Type: text/plain; charset=UTF-8 Magic! Thanks a lot, John. On 26 December 2015 at 12:06, John Kitchin wrote: > That sounds ok. I pushed a change that sort of does what you ask for. If > the "calculated" pdf doesn't exist then you should get prompted for a pdf, > and pressing enter for the default (no pdf) should not add a pdf link. > > 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 Fri, Dec 25, 2015 at 7:03 PM, Andreas Kiermeier < > andreas.kiermeier@gmail.com> wrote: > >> Thanks John. >> >> Yes, that was the case, because I had no intention of downloading the >> pdfs. So I had set >> >> (setq doi-utils-download-pdf nil) >> >> and left org-ref-pdf-directory nil. Setting it to a valid directory gets >> rid of the error. Thanks. >> >> I would find it useful (given that I've disabled auto-download) if I was >> prompted for the location of the pdf. That way I could either (a) provide a >> link to the pdf wherever I've stored it, or (b) not provide a link (yet). >> Just a thought. >> >> Thanks again for all your help. >> >> Andreas >> >> On 26 December 2015 at 00:37, John Kitchin >> wrote: >> >>> What about the value of org-ref-pdf-directory. This seems to be where >>> your error is coming from. Your debugger info suggests it is set to nil. >>> >>> Debugger entered--Lisp error: (wrong-type-argument stringp nil) >>> file-name-as-directory(nil) >>> org-ref-open-bibtex-notes() >>> doi-utils-insert-bibtex-entry-fr >>> >>> 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 Thu, Dec 24, 2015 at 10:16 PM, Andreas Kiermeier < >>> andreas.kiermeier@gmail.com> wrote: >>> >>>> I've set the HOME environment variable to >>>> "C:/Users/andre_000/Documents" and hence need the .. to get into the >>>> Dropbox folder. >>>> >>>> Executing (find-file org-ref-bibliography-notes) does find and open >>>> the correct notes file. >>>> >>>> Using an absolute path, as in: >>>> >>>> (setq org-ref-bibliography-notes >>>> "C:/Users/andre_000/Dropbox/_biblio/org-ref/bibnotes.org" >>>> org-ref-default-bibliography >>>> '("C:/Users/andre_000/Dropbox/_biblio/refs.bib")) >>>> >>>> results in the same error. >>>> >>>> After dropping a PDF file into the .bib file I end up with the >>>> following additional entry (for example) in the bibnotes.org file. I >>>> thought I'd include it just to ensure that nothing gets chopped of - this >>>> entry correctly reflect the PDF. >>>> >>>> ** TODO 2007 - Taenia Saginata in Europe >>>> :PROPERTIES: >>>> :Custom_ID: dorny_2007 >>>> :AUTHOR: Dorny \& Praet >>>> :JOURNAL: Veterinary Parasitology >>>> :YEAR: 2007 >>>> :VOLUME: 149 >>>> :PAGES: 22-24 >>>> :DOI: 10.1016/j.vetpar.2007.07.004 >>>> :URL: http://dx.doi.org/10.1016/j.vetpar.2007.07.004 >>>> :END: >>>> >>>> Does the notes file need a specific set up in terms of headers etc? >>>> >>>> >>>> -- >>>> Dr Andreas Kiermeier | Director >>>> Statistical Process Improvement Consulting and Training Pty Ltd >>>> Mbl: +61 (4)23 028 565 | Email: andreas.kiermeier@gmail.com >>>> Australia >>>> >>>> On 25 December 2015 at 13:17, John Kitchin >>>> wrote: >>>> >>>>> That is an odd looking path. On Mac that would expand to something like >>>>> >>>>> /Users/Dropbox/_biblio/org-ref/bibnotes.org >>>>> >>>>> and on linux >>>>> >>>>> /home/Dropbox/_biblio/org-ref/bibnotes.org >>>>> >>>>> usually you should not have permission for that, and neither make sense >>>>> to me. >>>>> >>>>> Does (file-exists-p org-ref-bibliography-notes) return true? >>>>> >>>>> or alternatively does (find-file org-ref-bibliography-notes) actually >>>>> open a writable file? >>>>> >>>>> I would think this is what you want (unless you have some unusual setup >>>>> and permissions): >>>>> >>>>> (setq org-ref-bibliography-notes "~/Dropbox/_biblio/org-ref/ >>>>> bibnotes.org" >>>>> org-ref-default-bibliography '("~/Dropbox/_biblio/refs.bib")) >>>>> >>>>> i.e. no .. in the path. >>>>> >>>>> Andreas Kiermeier writes: >>>>> >>>>> > Hi John, >>>>> > >>>>> > I've set it at follows (based on your setup) in my init.el file: >>>>> > >>>>> > (setq org-ref-bibliography-notes "~/../Dropbox/_biblio/org-ref/ >>>>> bibnotes.org" >>>>> > org-ref-default-bibliography >>>>> '("~/../Dropbox/_biblio/refs.bib")) >>>>> > >>>>> > So, non-nil. >>>>> > >>>>> > Andreas >>>>> > >>>>> > On 25 December 2015 at 00:45, John Kitchin >>>>> wrote: >>>>> > >>>>> >> >>>>> >> On Thu, Dec 24, 2015 at 1:04 AM, Andreas Kiermeier < >>>>> >> andreas.kiermeier@gmail.com> wrote: >>>>> >> >>>>> >>> org-ref-open-bibtex-notes() >>>>> >> >>>>> >> >>>>> >> That looks like a different error that occurs in >>>>> org-ref-open-bibtex-notes(). >>>>> >> Up to that point everything looks normal. >>>>> >> >>>>> >> What do you have your org-ref-bibliography-notes variable set to? >>>>> The >>>>> >> default value is nil which would cause that error. >>>>> >> >>>>> >> >>>>> >> >>>>> >> 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 >>>>> >> >>>>> >> >>>>> >>>>> -- >>>>> 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 >>>>> >>>> >>>> >>> >> > --001a113b39eabda80f0527c5d72e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Magic!
Thanks a= lot, John.

On 2= 6 December 2015 at 12:06, John Kitchin <jkitchin@andrew.cmu.edu&= gt; wrote:
That s= ounds ok. I pushed a change that sort of does what you ask for. If the &quo= t;calculated" pdf doesn't exist then you should get prompted for a= pdf, and pressing enter for the default (no pdf) should not add a pdf link= .=C2=A0

John

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

On Fri, Dec 25, 2015 at 7:03 PM, Andreas Kie= rmeier <andreas.kiermeier@gmail.com> wrote:
Thanks John.

Yes, that was t= he case, because I had no intention of downloading the pdfs. So I had set
<= br>
(setq doi-utils-download-pdf nil)

and lef= t=C2=A0org-ref-pdf-directory nil. Setting it to a valid directory gets rid = of the error. Thanks.

I would find it useful (give= n that I've disabled auto-download) if I was prompted for the location = of the pdf. That way I could either (a) provide a link to the pdf wherever = I've stored it, or (b) not provide a link (yet). Just a thought.
<= div>
Thanks again for all your help.

Andreas

=
On 26= December 2015 at 00:37, John Kitchin <jkitchin@andrew.cmu.edu&g= t; wrote:
What ab= out the value of=C2=A0org-ref-pdf-directory. This seems to be where your er= ror is coming from. Your debugger info suggests it is set to nil.

<= /div>
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
=C2=A0 f= ile-name-as-directory(nil)
=C2=A0 org-ref-open-bibtex-notes()
=C2=A0 doi-util= s-insert-bibtex-entry-fr
=
John
=
-----------------------------------
Professor John Kitchin=C2=A0
= Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon= University
Pittsburgh, PA 15213
412-268-7803
<= /div>
On Thu, Dec 24, 2015 at 10:= 16 PM, Andreas Kiermeier <andreas.kiermeier@gmail.com> wrote:
I've set th= e HOME environment variable to "C:/Users/andre_000/Documents" and= hence need the .. to get into the Dropbox folder.

Executing=C2=A0= (find-file or= g-ref-bibliography-notes) does find and open the correct notes file.=

<= /div>
Using an absolute path, as in:

(setq org-ref-bibliography-notes "C:/Users= /andre_000/Dropbox/_biblio/org-ref/bibnotes.org"
=C2= =A0 =C2=A0 =C2=A0 org-ref-default-bibliography '("C:/Users/andre_0= 00/Dropbox/_biblio/refs.bib"))
results in the same error.

Afte= r dropping a PDF file into the .bib file I end up with the following additi= onal entry (for example) in the bibnotes.org file. I thought I'd include it just to ensure t= hat nothing gets chopped of - this entry correctly reflect the PDF.

** TODO 2007 - Taenia Saginata in Europe
=C2=A0:PROPERTIES:
=C2=A0 :Custom_ID: dorny_2007
=C2=A0 :AUTHOR: Dorny \& Praet
= =C2=A0 :JOURNAL: Veterinary Parasitology
=C2=A0 :YEAR: 2007<= /div>
=C2=A0 :VOLUME: 149
=
=C2=A0 :PAGES: 22-24
=C2=A0 :DOI: 10.1016/j.vetpar.2007.07.004=
=C2=A0:END:

Does the notes file need a sp= ecific set up in terms of headers etc?
=

--
Dr Andreas Kiermeier | Directo= r
Statistical Process Improvement Consulting and Training Pty Ltd
Mbl: +61 (4)23 028 565 | Email: andreas.kiermeier@gmail.com
Australia


On 25 December 2015 at 13:17, John Kitchin <= span dir=3D"ltr"><jkitchin@andrew.cmu.edu> wrote:
That is an odd looking path. On Mac that would expand to some= thing like

/Users/Dropbox/_biblio/org-ref/bibnotes.org

and on linux

/home/Dropbox/_biblio/org-ref/bibnotes.org

usually you should not have permission for that, and neither make sense
to me.

Does (file-exists-p org-ref-bibliography-notes) return true?

or alternatively does (find-file org-ref-bibliography-notes) actually
open a writable file?

I would think this is what you want (unless you have some unusual setup
and permissions):

(setq org-ref-bibliography-notes "~/Dropbox/_biblio/org-ref/bibnotes.org= "
=C2=A0 =C2=A0 =C2=A0 =C2=A0org-ref-default-bibliography '("~/Dropb= ox/_biblio/refs.bib"))

i.e. no .. in the path.

Andreas Kiermeier writes:

> Hi John,
>
> I've set it at follows (based on your setup) in my init.el file: >
> (setq org-ref-bibliography-notes "~/../Dropbox/_biblio/org-ref/bibnotes= .org"
>=C2=A0 =C2=A0 =C2=A0 =C2=A0org-ref-default-bibliography '("~/.= ./Dropbox/_biblio/refs.bib"))
>
> So, non-nil.
>
> Andreas
>
> On 25 December 2015 at 00:45, John Kitchin <jkitchin@andrew.cmu.edu> wrote= :
>
>>
>> On Thu, Dec 24, 2015 at 1:04 AM, Andreas Kiermeier <
>> a= ndreas.kiermeier@gmail.com> wrote:
>>
>>> org-ref-open-bibtex-notes()
>>
>>
>> That looks like a different error that occurs in=C2=A0 org-ref-ope= n-bibtex-notes().
>> Up to that point everything looks normal.
>>
>> What do you have your org-ref-bibliography-notes variable set to? = The
>> default value is nil which would cause that error.
>>
>>
>>
>> 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
>>
>>

--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-2= 68-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu





--001a113b39eabda80f0527c5d72e--