emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Andreas Kiermeier <andreas.kiermeier@gmail.com>
To: John Kitchin <jkitchin@andrew.cmu.edu>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: Problem with org-ref
Date: Thu, 24 Dec 2015 16:34:48 +1030	[thread overview]
Message-ID: <CAN7vk5SPYUpMUyNvUh81nEkcyMWnwNFj+eN1UtwjvcWNTE+1-w@mail.gmail.com> (raw)
In-Reply-To: <CAJ51ETrEBcS-r=XVB6uTRndovN-SwpYG7RBQMq5QC4vzQw3hGw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 5467 bytes --]

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_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:

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/Projects/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.

​Cheers,

Andreas​

On 24 December 2015 at 12:03, John Kitchin <jkitchin@andrew.cmu.edu> 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 • DOI: 10.1021/acscatal.5b00538 •
> Publicati
> on Date (Web): 11 May 2015
> readers and citable by the Digital Object Identifier (DOI®). “Just
> Accepted” 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 this
> 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 <jkitchin@andrew.cmu.edu>
>> 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 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.
>>>
>>> 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 <marvinpas@gmail.com>
>>> 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 empty
>>>> bibtex file it doesn’t extract the doi ( no doi found in the file:///).
>>>> I tried it pdf you used  in your video (Examples of Effective Data Sharing
>>>> in Scientific Publishing), but I got the same error. Dragging the url to
>>>> the bibtex file also doesn’t works for me.
>>>>
>>>> cheers,
>>>> M
>>>>
>>>> PS by the way, your video was excellent :)
>>>>
>>>
>>>
>>
>

[-- Attachment #2: Type: text/html, Size: 10422 bytes --]

  reply	other threads:[~2015-12-24  6:05 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-23 21:22 Problem with org-ref marvin doyley
2015-12-23 21:30 ` John Kitchin
2015-12-23 21:44   ` marvin doyley
2015-12-23 22:16   ` marvin doyley
2015-12-23 23:56   ` Andreas Kiermeier
2015-12-24  1:33     ` John Kitchin
2015-12-24  6:04       ` Andreas Kiermeier [this message]
2015-12-24 14:15         ` John Kitchin
2015-12-25  1:17           ` Andreas Kiermeier
2015-12-25  2:47             ` John Kitchin
2015-12-25  3:16               ` Andreas Kiermeier
2015-12-25 14:07                 ` John Kitchin
2015-12-26  0:03                   ` Andreas Kiermeier
2015-12-26  1:36                     ` John Kitchin
2015-12-26  4:52                       ` Andreas Kiermeier
  -- strict thread matches above, loose matches on Subject: below --
2020-07-20 13:09 problem " Johannes Brauer
2020-07-20 13:49 ` John Kitchin
2021-03-08 15:20 Problem " Marvin M. Doyley
2021-03-10  4:49 ` Kyle Meyer

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAN7vk5SPYUpMUyNvUh81nEkcyMWnwNFj+eN1UtwjvcWNTE+1-w@mail.gmail.com \
    --to=andreas.kiermeier@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=jkitchin@andrew.cmu.edu \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).