Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong type argument: listp, #s(org-noter-pdftools--location...) #96

Open
armindarvish opened this issue Jul 27, 2023 · 4 comments
Open

Comments

@armindarvish
Copy link

Org-noter-pdftools breaks org-noter! I am using https://github.com/org-noter/org-noter. and without org-noter-pdftools, it works just fine, but when I install org-noter-pdftools, then I cannot insert notes with long selection anymore, only if I select a short sections (3 words or so) I can make a note.
I get an erros like this:

I cannot insert note with long-selection, only short selection can cteate notes. org-noter-pdf--pretty-print-location-for-title: Wrong type argument: listp, #s(org-noter-pdftools--location ....

I thought the issues might be with the org-noter-set-start-location but no matter what I tried it fails. I even tried require org-noter-integration to use this file in org-noter\org-noter repo: (https://github.com/org-noter/org-noter/blob/master/other/org-noter-integration.el)[https://github.com/org-noter/org-noter/blob/master/other/org-noter-integration.el] but the issue persists.

Now, I can use org-noter without org-noter-pdftools for taking notes but I would like to have the possibility to export notes to pdf. Is there a minimal set-up I can use that does not mess with how org-noter adds notes and locations,...?

@k-jell
Copy link

k-jell commented Aug 12, 2023

I got the same issue. See here: org-noter/org-noter#54 for a backtrace.

@ghost
Copy link

ghost commented Aug 14, 2023

Can you tell us concrete versions of Emacs and all the packages?

@k-jell
Copy link

k-jell commented Aug 14, 2023

These are my versions:

org-version-Output: Org mode version 9.6.6 (release_9.6.6 @ /usr/share/emacs/29.1/lisp/org/)

From list-packages:

  org-noter-pdftools             20230725.1433  installed             Integration between org-pdftools and org-noter
  org-noter                      20230728.2037  installed             A synchronized, Org-mode, document annotator

You need versions of any other packages than those?

@lazzalazza
Copy link

lazzalazza commented Jan 30, 2024

Hi, I have published this workaround also here, where the issue seems closed, but as I understand actually it is not. I have a functioning workaround, but it's just a patch:

;; Added patch function
(defun org-noter--check-and-convert-location (location)
  "If the location is an org-noter-pdftools-location, it transforms 
it into a (page . height) cons, otherwise it keeps the cons
unaltered"
  (if (org-noter-pdftools--location-p location)
      (cons (org-noter-pdftools--location-page location)
            (org-noter-pdftools--location-height location))
    location))

also, line 2262 of org-noter-core.el should be changed in: (org-noter--pretty-print-location-for-title (org-noter--check-and-convert-location location))

The real problem is where to put this function if one uses org-noter without org-noter-pdftools...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants