[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Org Mode and PDF Notes!

From: Ramon Diaz-Uriarte
Subject: Re: [O] Org Mode and PDF Notes!
Date: Fri, 13 Nov 2015 01:39:30 +0100
User-agent: mu4e 0.9.13; emacs 24.5.1

On Thu, 12-11-2015, at 14:11, Matt Price <address@hidden> wrote:
>> >
>> > M-: (pdf-annot-get-annots) and look at the output in the *Messages*
>> > buffer.  Can you see any evidence of the the text? Can you share what you
>> > learned?
>> Nope, no evidence of the text. I get things such as
>> (((buffer . #<buffer Frank_2015_Commentary.pdf>) (page . 13) (edges
>> 0.113553 0.31717 0.868657 0.361746) (type . highlight) (id . annot-13-0)
>> (flags . 4) (color . "#ffff00") (contents . "") (modified 22081 45188)
>> (label . "TF201") (subject . "Highlight") (opacity . 1.0) ...)
>> so we get the location of the highlight (and its properties), but not the
>> textual contents. And this is the case whether I make the annotation with
>> EzPDF or Okular or, for that matter, with pdf-tools itself.
>> So it seems RepliGO is actually giving you a lot more by default :-)
> Try replacing
> (text (assoc-default 'subject annot))
> with
> (text (pdf-info-gettext page (assoc-default 'edges annot)))
> in the lambda function in pdf-annot-markups-as-org-text.  This will fail on
> cropped pdfs if you have added highlights using the most recent pdf-tools,
> which stores negative values in the 'edges field, but I've found it works
> otherwise.  I'd love to hear if it works for you too. (I know you're
> following the relevant bug report on the pdf-tools github repo).

It works! I get the highlighted text (I have just tried with a pdf I
highlighted with EzPDF, the one that, above, was giving just the location
and properties). And it still does the correct thing in your pdf (the one
from repligo).

Awesome! Thanks.


Ramon Diaz-Uriarte
Department of Biochemistry, Lab B-25
Facultad de Medicina
Universidad Autónoma de Madrid 
Arzobispo Morcillo, 4
28029 Madrid

Phone: +34-91-497-2412

Email: address@hidden


reply via email to

[Prev in Thread] Current Thread [Next in Thread]