fuxialexander / org-pdftools

A custom org link type for pdf-tools
GNU General Public License v3.0
331 stars 35 forks source link

different behavior between insert-note and insert-precise-note? #54

Open rdiaz02 opened 3 years ago

rdiaz02 commented 3 years ago

When using org-noter-pdftools I find no difference between i (org-noter-insert-note) and M-i (org-noter-insert-precise-note).

I find it counterintuitive that org-noter-insert-note asks the question You can click anywhere on the page to add a link to. Do you want to do that? : mimicking the behavior of org-noter's org-insert-note I was expecting that a link to the page, without further questions, be inserted in the org buffer. So I think I am misunderstanding something here.

fuxialexander commented 3 years ago

You can now set org-pdftools-use-isearch-link and org-pdftools-use-freestyle-annot to nil and use org-noter-pdftools-insert-precise-note for precise note and org-noter-insert-note otherwise.

rdiaz02 commented 3 years ago

Thanks. I think the variable is org-pdftools-use-freepointer-annot (not org-pdftools-use-freestyle-annot).

But still, I am confused (or something in my setup is wrong): when I set that variable to nil I am no longer asked any questions. But as far as I can see, all three of org-noter-pdftools-insert-precise-note, org-noter-insert-note, and org-noter-insert-precise-note behave identically (and no longer is a symbol inserted anywhere in the PDF to mark the location).

If I set org-pdftools-use-freepointer-annot to true then I am always asked questions (with the three of them), and they all behave identically (and a symbol is placed in the place I click).

If I mark text in the pdf, and then call each function, also the three functions behave similarly (they never ask for the location, regardless of the setting of org-pdftools-use-freepointer-annot).

As I said, I guess I am confused. I see no way to directly insert some note with arbitrary text that will allow to point to a precise location (asking me for the location) when I use insert-precise-note and to add a note just to a page, without asking for the location, when I use insert-note.

But I can just mark text in the PDF and press TAB (or i) and I get the text in the notes buffer, and if I click on it, I am brought to the location in the PDF, which is awesome. And I can add arbitrary text then.

I don't think any of this is worth your trouble, so I guess we can close this.

duzaichuan commented 3 years ago

org-noter-pdftools-insert-precise-note works as expected if org-pdftools-use-freestyle-annot is modified to org-pdftools-use-freepointer-annot in the definition of function org-noter-pdftools-insert-precise-note. There is no such a variable org-pdftools-use-freestyle-annot . I think "freestyle" might be a typo.