From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Kiermeier <andreas.kiermeier@gmail.com> Subject: Re: Problem with org-ref Date: Sat, 26 Dec 2015 10:33:08 +1030 Message-ID: <CAN7vk5S2oEaTOHTamHk3m7+tfcckb=VoS-enTJpBA38sZwwwtA@mail.gmail.com> References: <9B7FD49A-1A5F-42D3-9D9F-72BB151AF28C@gmail.com> <CAJ51ETp6x_R7rFy0iTMg_cC2_T6U0fkCVvTp7ThMn8N2ESYj8Q@mail.gmail.com> <CAN7vk5TVWgv1s-P0hsSXOU3YP4_WfTR_UtQWWeiw1CvSWv-+iQ@mail.gmail.com> <CAJ51ETrEBcS-r=XVB6uTRndovN-SwpYG7RBQMq5QC4vzQw3hGw@mail.gmail.com> <CAN7vk5SPYUpMUyNvUh81nEkcyMWnwNFj+eN1UtwjvcWNTE+1-w@mail.gmail.com> <CAJ51ETq7pj5Ue+oa=Wj6Z3xtNdHT8U0q2dvfxkuR=oP5v34bvw@mail.gmail.com> <CAN7vk5Q17LtKZ18kFCcqx+ZCMWOqPSN-XLaPXg2WcJq+FUhKAA@mail.gmail.com> <m2si2rmehn.fsf@andrew.cmu.edu> <CAN7vk5R3P3aF550QJEND1no6O8DW5ada2nOewboP++TMK6Sv5A@mail.gmail.com> <CAJ51ETociL4hJfp69oJShCrGua30S7tQxrLyLM8May+b7PPeNQ@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113a6f605bc1750527c1ce55 Return-path: <emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org> Received: from eggs.gnu.org ([2001:4830:134:3::10]:55653) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <andreas.kiermeier@gmail.com>) id 1aCcKs-0000WX-FQ for emacs-orgmode@gnu.org; Fri, 25 Dec 2015 19:03:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <andreas.kiermeier@gmail.com>) id 1aCcKq-0005nT-HT for emacs-orgmode@gnu.org; Fri, 25 Dec 2015 19:03:50 -0500 Received: from mail-qg0-x234.google.com ([2607:f8b0:400d:c04::234]:33567) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <andreas.kiermeier@gmail.com>) id 1aCcKq-0005nN-BN for emacs-orgmode@gnu.org; Fri, 25 Dec 2015 19:03:48 -0500 Received: by mail-qg0-x234.google.com with SMTP id k90so192997076qge.0 for <emacs-orgmode@gnu.org>; Fri, 25 Dec 2015 16:03:48 -0800 (PST) In-Reply-To: <CAJ51ETociL4hJfp69oJShCrGua30S7tQxrLyLM8May+b7PPeNQ@mail.gmail.com> List-Id: "General discussions about Org-mode." <emacs-orgmode.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-orgmode>, <mailto:emacs-orgmode-request@gnu.org?subject=unsubscribe> List-Archive: <http://lists.gnu.org/archive/html/emacs-orgmode> List-Post: <mailto:emacs-orgmode@gnu.org> List-Help: <mailto:emacs-orgmode-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-orgmode>, <mailto:emacs-orgmode-request@gnu.org?subject=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 <jkitchin@andrew.cmu.edu> Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org> --001a113a6f605bc1750527c1ce55 Content-Type: text/plain; charset=UTF-8 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 <jkitchin@andrew.cmu.edu> 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 <jkitchin@andrew.cmu.edu> >> 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 <jkitchin@andrew.cmu.edu> >>> 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 >>> >> >> > --001a113a6f605bc1750527c1ce55 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-family:arial,he= lvetica,sans-serif;font-size:small">Thanks John.</div><div class=3D"gmail_d= efault" style=3D"font-family:arial,helvetica,sans-serif;font-size:small"><b= r></div><div class=3D"gmail_default" style=3D"font-family:arial,helvetica,s= ans-serif;font-size:small">Yes, that was the case, because I had no intenti= on of downloading the pdfs. So I had set</div><div class=3D"gmail_default" = style=3D"font-family:arial,helvetica,sans-serif;font-size:small"><br></div>= <div class=3D"gmail_default" style=3D"font-family:arial,helvetica,sans-seri= f;font-size:small"><div class=3D"gmail_default">(setq doi-utils-download-pd= f nil)</div><div><br></div><div>and left=C2=A0org-ref-pdf-directory nil. Se= tting it to a valid directory gets rid of the error. Thanks.</div><div><br>= </div><div>I would find it useful (given that I've disabled auto-downlo= ad) 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 provi= de a link (yet). Just a thought.</div><div><br></div><div>Thanks again for = all your help.</div><div><br></div><div>Andreas</div><div><br></div></div><= div class=3D"gmail_extra"><div class=3D"gmail_quote">On 26 December 2015 at= 00:37, John Kitchin <span dir=3D"ltr"><<a href=3D"mailto:jkitchin@andre= w.cmu.edu" target=3D"_blank">jkitchin@andrew.cmu.edu</a>></span> wrote:<= br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left= :1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">What about the value of= =C2=A0org-ref-pdf-directory. This seems to be where your error is coming fr= om. Your debugger info suggests it is set to nil.<div><br></div><div><div s= tyle=3D"font-family:arial,helvetica,sans-serif;font-size:13px">Debugger ent= ered--Lisp error: (wrong-type-argument stringp nil)</div><div style=3D"font= -family:arial,helvetica,sans-serif;font-size:13px">=C2=A0 file-name-as-dire= ctory(nil)</div><div style=3D"font-family:arial,helvetica,sans-serif;font-s= ize:13px">=C2=A0 org-ref-open-bibtex-notes()</div><div style=3D"font-family= :arial,helvetica,sans-serif;font-size:13px">=C2=A0 doi-utils-insert-bibtex-= entry-fr</div></div></div><div class=3D"gmail_extra"><span class=3D""><br c= lear=3D"all"><div><div><div dir=3D"ltr"><div><div dir=3D"ltr">John<br><br>-= ----------------------------------<br>Professor John Kitchin=C2=A0<br>Doher= ty Hall A207F<br>Department of Chemical Engineering<br>Carnegie Mellon Univ= ersity<br>Pittsburgh, PA 15213<br>412-268-7803</div><div dir=3D"ltr">@johnk= itchin<br><a href=3D"http://kitchingroup.cheme.cmu.edu" target=3D"_blank">h= ttp://kitchingroup.cheme.cmu.edu</a><br><br></div></div></div></div></div> <br></span><div><div class=3D"h5"><div class=3D"gmail_quote">On Thu, Dec 24= , 2015 at 10:16 PM, Andreas Kiermeier <span dir=3D"ltr"><<a href=3D"mail= to:andreas.kiermeier@gmail.com" target=3D"_blank">andreas.kiermeier@gmail.c= om</a>></span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"marg= in:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"= ><div style=3D"font-family:arial,helvetica,sans-serif;font-size:small">I= 9;ve set the HOME environment variable to "C:/Users/andre_000/Document= s" and hence need the .. to get into the Dropbox folder.<br></div><div= style=3D"font-family:arial,helvetica,sans-serif;font-size:small"><br></div= ><div style=3D"font-family:arial,helvetica,sans-serif;font-size:small">Exec= uting=C2=A0<span style=3D"font-size:12.8px;font-family:arial,sans-serif">(f= ind-file org-ref-bibliography-notes) does find and open the correct notes f= ile.</span></div><div style=3D"font-family:arial,helvetica,sans-serif;font-= size:small"><span style=3D"font-size:12.8px;font-family:arial,sans-serif"><= br></span></div><div><span style=3D"font-size:12.8px">Using an absolute pat= h, as in:</span></div><div><span style=3D"font-size:12.8px"><br></span></di= v><div><div style=3D"font-size:12.8px">(setq org-ref-bibliography-notes &qu= ot;C:/Users/andre_000/Dropbox/_biblio/org-ref/<a href=3D"http://bibnotes.or= g" target=3D"_blank">bibnotes.org</a>"</div><div style=3D"font-size:12= .8px">=C2=A0 =C2=A0 =C2=A0 org-ref-default-bibliography '("C:/User= s/andre_000/Dropbox/_biblio/refs.bib"))</div><div style=3D"font-size:1= 2.8px"><br></div><div style=3D"font-size:12.8px">results in the same error.= </div><div style=3D"font-size:12.8px"><br></div><div style=3D"font-size:12.= 8px">After dropping a PDF file into the .bib file I end up with the followi= ng additional entry (for example) in the <a href=3D"http://bibnotes.org" ta= rget=3D"_blank">bibnotes.org</a> file. I thought I'd include it just to= ensure that nothing gets chopped of - this entry correctly reflect the PDF= .</div><div style=3D"font-size:12.8px"><br></div><div><div><span style=3D"f= ont-size:12.8px">** TODO 2007 - Taenia Saginata in Europe</span></div><div>= <span style=3D"font-size:12.8px">=C2=A0:PROPERTIES:</span></div><div><span = style=3D"font-size:12.8px">=C2=A0 :Custom_ID: dorny_2007</span></div><div><= span style=3D"font-size:12.8px">=C2=A0 :AUTHOR: Dorny \& Praet</span></= div><div><span style=3D"font-size:12.8px">=C2=A0 :JOURNAL: Veterinary Paras= itology</span></div><div><span style=3D"font-size:12.8px">=C2=A0 :YEAR: 200= 7</span></div><div><span style=3D"font-size:12.8px">=C2=A0 :VOLUME: 149</sp= an></div><div><span style=3D"font-size:12.8px">=C2=A0 :PAGES: 22-24</span><= /div><div><span style=3D"font-size:12.8px">=C2=A0 :DOI: 10.1016/j.vetpar.20= 07.07.004</span></div><div><span style=3D"font-size:12.8px">=C2=A0 :URL: <a= href=3D"http://dx.doi.org/10.1016/j.vetpar.2007.07.004" target=3D"_blank">= http://dx.doi.org/10.1016/j.vetpar.2007.07.004</a></span></div><div><span s= tyle=3D"font-size:12.8px">=C2=A0:END:</span></div></div><div style=3D"font-= size:12.8px"><br></div><div style=3D"font-size:12.8px">Does the notes file = need a specific set up in terms of headers etc?</div></div><span><font colo= r=3D"#888888"><div style=3D"font-family:arial,helvetica,sans-serif;font-siz= e:small"><br></div></font></span></div><div class=3D"gmail_extra"><span><fo= nt color=3D"#888888"><br clear=3D"all"><div><div><div dir=3D"ltr"><font siz= e=3D"2" face=3D"arial, helvetica, sans-serif">-- <br>Dr Andreas Kiermeier |= Director<br> Statistical Process Improvement Consulting and Training Pty Ltd<br> Mbl: +61 (4)23 028 565 | Email: <a href=3D"mailto:andreas.kiermeier@gmail.c= om" target=3D"_blank">andreas.kiermeier@gmail.com</a> <br> Australia</font><br></div></div></div></font></span><div><div> <br><div class=3D"gmail_quote">On 25 December 2015 at 13:17, John Kitchin <= span dir=3D"ltr"><<a href=3D"mailto:jkitchin@andrew.cmu.edu" target=3D"_= blank">jkitchin@andrew.cmu.edu</a>></span> wrote:<br><blockquote class= =3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padd= ing-left:1ex">That is an odd looking path. On Mac that would expand to some= thing like<br> <br> /Users/Dropbox/_biblio/org-ref/<a href=3D"http://bibnotes.org" rel=3D"noref= errer" target=3D"_blank">bibnotes.org</a><br> <br> and on linux<br> <br> /home/Dropbox/_biblio/org-ref/<a href=3D"http://bibnotes.org" rel=3D"norefe= rrer" target=3D"_blank">bibnotes.org</a><br> <br> usually you should not have permission for that, and neither make sense<br> to me.<br> <br> Does (file-exists-p org-ref-bibliography-notes) return true?<br> <br> or alternatively does (find-file org-ref-bibliography-notes) actually<br> open a writable file?<br> <br> I would think this is what you want (unless you have some unusual setup<br> and permissions):<br> <br> (setq org-ref-bibliography-notes "~/Dropbox/_biblio/org-ref/<a href=3D= "http://bibnotes.org" rel=3D"noreferrer" target=3D"_blank">bibnotes.org</a>= "<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0org-ref-default-bibliography '("~/Dropb= ox/_biblio/refs.bib"))<br> <br> i.e. no .. in the path.<br> <div><div><br> Andreas Kiermeier writes:<br> <br> > Hi John,<br> ><br> > I've set it at follows (based on your setup) in my init.el file:<b= r> ><br> > (setq org-ref-bibliography-notes "~/../Dropbox/_biblio/org-ref/<a= href=3D"http://bibnotes.org" rel=3D"noreferrer" target=3D"_blank">bibnotes= .org</a>"<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0org-ref-default-bibliography '("~/.= ./Dropbox/_biblio/refs.bib"))<br> ><br> > So, non-nil.<br> ><br> > Andreas<br> ><br> > On 25 December 2015 at 00:45, John Kitchin <<a href=3D"mailto:jkitc= hin@andrew.cmu.edu" target=3D"_blank">jkitchin@andrew.cmu.edu</a>> wrote= :<br> ><br> >><br> >> On Thu, Dec 24, 2015 at 1:04 AM, Andreas Kiermeier <<br> >> <a href=3D"mailto:andreas.kiermeier@gmail.com" target=3D"_blank">a= ndreas.kiermeier@gmail.com</a>> wrote:<br> >><br> >>> org-ref-open-bibtex-notes()<br> >><br> >><br> >> That looks like a different error that occurs in=C2=A0 org-ref-ope= n-bibtex-notes().<br> >> Up to that point everything looks normal.<br> >><br> >> What do you have your org-ref-bibliography-notes variable set to? = The<br> >> default value is nil which would cause that error.<br> >><br> >><br> >><br> >> John<br> >><br> >> -----------------------------------<br> >> Professor John Kitchin<br> >> Doherty Hall A207F<br> >> Department of Chemical Engineering<br> >> Carnegie Mellon University<br> >> Pittsburgh, PA 15213<br> >> <a href=3D"tel:412-268-7803" value=3D"+14122687803" target=3D"_bla= nk">412-268-7803</a><br> >> @johnkitchin<br> >> <a href=3D"http://kitchingroup.cheme.cmu.edu" rel=3D"noreferrer" t= arget=3D"_blank">http://kitchingroup.cheme.cmu.edu</a><br> >><br> >><br> <br> --<br> Professor John Kitchin<br> Doherty Hall A207F<br> Department of Chemical Engineering<br> Carnegie Mellon University<br> Pittsburgh, PA 15213<br> <a href=3D"tel:412-268-7803" value=3D"+14122687803" target=3D"_blank">412-2= 68-7803</a><br> @johnkitchin<br> <a href=3D"http://kitchingroup.cheme.cmu.edu" rel=3D"noreferrer" target=3D"= _blank">http://kitchingroup.cheme.cmu.edu</a><br> </div></div></blockquote></div><br></div></div></div> </blockquote></div><br></div></div></div> </blockquote></div><br></div></div> --001a113a6f605bc1750527c1ce55--