From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Kiermeier Subject: Re: Problem with org-ref Date: Thu, 24 Dec 2015 16:34:48 +1030 Message-ID: References: <9B7FD49A-1A5F-42D3-9D9F-72BB151AF28C@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11390e2e1f0bef05279ea0ee Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42006) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aBz1m-0004St-Ri for emacs-orgmode@gnu.org; Thu, 24 Dec 2015 01:05:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aBz1k-0003ce-Uc for emacs-orgmode@gnu.org; Thu, 24 Dec 2015 01:05:30 -0500 Received: from mail-qg0-x22f.google.com ([2607:f8b0:400d:c04::22f]:36635) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aBz1k-0003cX-NY for emacs-orgmode@gnu.org; Thu, 24 Dec 2015 01:05:28 -0500 Received: by mail-qg0-x22f.google.com with SMTP id e32so140298qgf.3 for ; Wed, 23 Dec 2015 22:05:28 -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" --001a11390e2e1f0bef05279ea0ee Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi John, thanks for the quick feedback and fix. Yes, the version that comes with GitHub (on Windows) works when set this way, though I had to specify slightly differently (i.e quotes & backslashes): (setq pdftotext-executable "C:/Users/andre_000/AppData/Local/GitHub/PortableGit_c7e0cbde92ba565cb218a5= 21411d0e854079a28c/mingw32/bin/pdftotext.exe") But now the following error occurs, after inserting the new bibtex entry and creating a new note (in the notes file): org-ref-open-bibtex-notes: Wrong type argument: stringp, nil Turning debugging on yields the following: Debugger entered--Lisp error: (wrong-type-argument stringp nil) file-name-as-directory(nil) org-ref-open-bibtex-notes() doi-utils-insert-bibtex-entry-from-doi("10.1016/j.vetpar.2010.10.058") doi-utils-add-bibtex-entry-from-doi("10.1016/j.vetpar.2010.10.058" "c:/Users/andre_000/Dropbox/_biblio/refs.bib") org-ref-pdf-dnd-protocol("file:C%3A/Users/andre_000/Dropbox/Consulting/Proj= ects/RedMeat/MLA_Beef_Measles-C_bovis/literature/VetPara_McFadden_2011.pdf" private) byte-code(" \306 \211 \203% Looks like something is still not quite right with the ":" in the pathname. =E2=80=8BCheers, Andreas=E2=80=8B On 24 December 2015 at 12:03, John Kitchin wrote: > I tested part of this on Windows in a git bash shell: > > $ pdftotext -v > pdftotext version 0.14.5 > Copyright 2005-2010 The Poppler Developers - > http://poppler.freedesktop.org > Copyright 1996-2004 Glyph & Cog, LLC > > and then this works: > $ pdftotext.exe kitchin-2015-examp.pdf - | grep DOI > ACS Catal., Just Accepted Manuscript =E2=80=A2 DOI: 10.1021/acscatal.5b00= 538 =E2=80=A2 > Publicati > on Date (Web): 11 May 2015 > readers and citable by the Digital Object Identifier (DOI=C2=AE). =E2=80= =9CJust > Accepted=E2=80=9D is > an optional service offered > sharing site which assigned the data set a DOI. 19 An alternative data > repositor > y could be an > institutional data repository which also provides a DOI for citing. It > remains t > o be seen if > stores that provide a citable DOI for the data set. The point is that thi= s > appro > ach is very > > However, I see that in emacs, it appears another pdftotext is getting > used, which does not work. > ~/Desktop $ pdftotext -v > pdftotext version 2.03 > Copyright 1996-2003 Glyph & Cog, LLC > > that is the same version that runs in a cmd shell. > > The version that seems to work for me is at "C:\Program Files > (x86)\Git\bin\pdftotext". > > I added a variable to set the location of this program, and then rely on > the executable path. It was a little tricky to set this right, note the > escaped quotes. > > #+BEGIN_SRC emacs-lisp > (setq pdftotext-executable "\"C:/Program Files (x86)/Git/bin/pdftotext\""= ) > #+END_SRC > > > It turned out there was another issue with the uri in the drag-n-drop > needing to be unescaped on windows because of the : in the path, which is > also done now. > > I pushed these out. hopefully that makes some progress for you! or at > least gives some hints on where to look for the problem. > > Merry Xmas! > > 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, Dec 23, 2015 at 6:56 PM, Andreas Kiermeier < > andreas.kiermeier@gmail.com> wrote: > >> Hi John, >> similar doi problem here. >> My configuration is: >> >> - Windows 10 >> - GNU Emacs 24.5.1 (i686-pc-mingw32) of 2015-04-11 on LEG570 >> - Miktex (up-to-date) with pdftotext v0.32..0 >> - org-ref v 0.5.0 (from melpa) >> >> Running pdftotext from the command line works and produces a text file >> with doi info. >> Let me know what I can do to help to test things. >> Thanks. >> Andreas >> PS: Thank you for org-ref ... an awesome Xmas present! >> >> >> On 24 December 2015 at 08:00, John Kitchin >> wrote: >> >>> Thanks! Do you know if you have pdftotext working on your machine? The >>> pdf drag-n-drop works by converting the pdf to text, and than matching = a >>> pattern to find a doi. If none is found, you get the message you noted.= The >>> url dnd works similarly, but there are a bunch of recipes for what to m= atch >>> depending on the base of the url. >>> >>> I did that on a Mac, and I haven't tested it on a windows or Linux >>> machine. >>> >>> 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, Dec 23, 2015 at 4:22 PM, marvin doyley >>> wrote: >>> >>>> Hi John, >>>> >>>> I am playing with org-ref, the melpa version. >>>> >>>> Everything works fine except, one thing. When I drag a pdf to an empt= y >>>> bibtex file it doesn=E2=80=99t extract the doi ( no doi found in the f= ile:///). >>>> I tried it pdf you used in your video (Examples of Effective Data Sha= ring >>>> in Scientific Publishing), but I got the same error. Dragging the url = to >>>> the bibtex file also doesn=E2=80=99t works for me. >>>> >>>> cheers, >>>> M >>>> >>>> PS by the way, your video was excellent :) >>>> >>> >>> >> > --001a11390e2e1f0bef05279ea0ee Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi John,

thanks for the quick feedback and fix. Yes, the vers= ion that comes with GitHub (on Windows) works when set this way, though I h= ad to specify slightly differently (i.e quotes & backslashes):

(= setq pdftotext-executable "C:/Users/andre_000/AppData/Local/GitHub/Por= tableGit_c7e0cbde92ba565cb218a521411d0e854079a28c/mingw32/bin/pdftotext.exe= ")

But now the following = error occurs, after inserting the new bibtex entry and creating a new note = (in the notes file):

org-ref= -open-bibtex-notes: Wrong type argument: stringp, nil

Turning debugging on yields the following:

D= ebugger entered--Lisp error: (wrong-type-argument stringp nil)
=C2=A0 file-name-as-directory(nil)
=C2=A0 org-ref-open-bibtex-notes()
=C2=A0 doi-utils-insert-bibtex-entry-from-doi("10.1016/j.vet= par.2010.10.058")
=C2=A0 doi-utils-a= dd-bibtex-entry-from-doi("10.1016/j.vetpar.2010.10.058" "c:/= Users/andre_000/Dropbox/_biblio/refs.bib")
=C2=A0 org-ref-pdf-dnd-protocol("file:C%3A/Users/andre_000/Drop= box/Consulting/Projects/RedMeat/MLA_Beef_Measles-C_bovis/literature/VetPara= _McFadden_2011.pdf" private)
=C2=A0 = byte-code(" \306 \211 \203%

Looks like something is still not quite right with the ":&q= uot; in the pathname.

=E2=80=8BCheers,

Andr= eas=E2=80=8B

On 24 De= cember 2015 at 12:03, John Kitchin <jkitchin@andrew.cmu.edu><= /span> wrote:
I tested p= art of this on Windows in a git bash shell:

$ p= dftotext -v
pdftotext version 0.14.5
Copyright 2005-201= 0 The Poppler Developers - http://poppler.freedesktop.org
Copyright 1996-20= 04 Glyph & Cog, LLC

and then this works:=
$ pdftotext.exe kitchin-2015-examp.pdf - | grep DOI
ACS Catal., Just Accepted Manuscript =E2=80=A2 DOI: 10.1021/acscatal.5b0= 0538 =E2=80=A2 Publicati
on Date (Web): 11 May 2015
rea= ders and citable by the Digital Object Identifier (DOI=C2=AE). =E2=80=9CJus= t Accepted=E2=80=9D is
an optional service offered
shar= ing site which assigned the data set a DOI. 19 An alternative data reposito= r
y could be an
institutional data repository which als= o provides a DOI for citing. It remains t
o be seen if
= stores that provide a citable DOI for the data set. The point is that this = appro
ach is very

However, I see t= hat in emacs, it appears another pdftotext is getting used, which does not = work.
~/Desktop $ pdftotext -v
pdftotext version 2= .03
Copyright 1996-2003 Glyph & Cog, LLC

=
that is the same version that runs in a cmd shell.
The version that seems to work for me is at=C2=A0"C:\Progr= am Files (x86)\Git\bin\pdftotext".

I added a = variable to set the location of this program, and then rely on the executab= le path. It was a little tricky to set this right, note the escaped quotes.=

#+BEGIN_SRC emacs-lisp
(setq pdfto= text-executable "\"C:/Program Files (x86)/Git/bin/pdftotext\"= ;")
#+END_SRC


= It turned out there was another issue with the uri in the drag-n-drop needi= ng to be unescaped on windows because of the : in the path, which is also d= one now.=C2=A0

I pushed these out. hopefully that = makes some progress for you! or at least gives some hints on where to look = for the problem.

Merry Xmas!

John

-----------------------------------
Professor John = Kitchin=C2=A0
Doherty Hall A207F
Department of Chemical EngineeringCarnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
<= div dir=3D"ltr">@johnkitchin
http://kitchingroup.cheme.cmu.edu


On Wed, Dec 23, 2015 at 6:56 PM, Andreas Kie= rmeier <andreas.kiermeier@gmail.com> wrote:
Hi John,
similar doi problem here.<= /div>
= My configuration is:
  • Windows 10
  • GNU Emacs 24.5.1 (i686-pc-mingw32) of 2015-04-11 o= n LEG570
  • Miktex (up-to-date) with pdftotext v0.32..0
  • org-ref v 0.5.0 (from melpa)=
Running p= dftotext from the command line works and produces a text file with doi info= .
Let me know = what I can do to help to test things.
Thanks.
Andreas
PS: Thank you for org-ref ... an awesom= e Xmas present!


On 24 Decem= ber 2015 at 08:00, John Kitchin <jkitchin@andrew.cmu.edu> wrote:
Thanks! Do yo= u know if you have pdftotext working on your machine? The pdf drag-n-drop w= orks by converting the pdf to text, and than matching a pattern to find a d= oi. If none is found, you get the message you noted. The url dnd works simi= larly, but there are a bunch of recipes for what to match depending on the = base of the url.

I did that on a Mac, and I haven't = tested it on a windows or Linux machine.=C2=A0

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, Dec 23, 2015 at 4:22 PM, marvin doyl= ey <marvinpas@gmail.com> wrote:
Hi John,

I am playing wi= th org-ref, =C2=A0the melpa version.

Everything works fine except, o= ne thing.=C2=A0 When I drag a pdf to an empty bibtex file it doesn=E2=80=99= t extract the doi ( no doi found in the=C2=A0file:///). I tried it p= df you used =C2=A0in your video (Examples of Effective Data Sharing in Scie= ntific Publishing), but I got the same error. Dragging the url to the bibte= x file also doesn=E2=80=99t works for me.

cheers,
M

PS by the way, your video was excellent :)




--001a11390e2e1f0bef05279ea0ee--