-
Notifications
You must be signed in to change notification settings - Fork 37
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
Autosave, global write/save commands do not save PDF buffer when using org-noter/org-pdftools #68
Comments
This could be a user error. Org-noter opens a new frame with vertical split, document buffer and notes buffer. Calling "write" in the notes buffer does not save the linked annotations. It appears that with my setup I have to call "write" in both the notes and PDF buffer. |
(Disclaimer: I haven't actually installed org-pdftools yet, but I have used pdf-tools and org-noter extensively) It does look like user error, and I don't think it has anything to do with org-pdftools itself. The 'annotations' (highlights, free text, etc.) are the responsibility of pdf-tools (or any other PDF viewer). Once you've added them with pdf-tools (something like The 'notes' you navigate with org-noter-sync-xxxx are the responsibility of org-noter, and they live in an .org file that you chose the first time you opened an org-noter session for that PDF. You just need to save the org buffer to keep these. There is at least a one-way method to create 'notes' for org-noter out of pdf-tools 'annotations' with There are github issues in the repos that you can read through discussing a way to keep these two in sync, but it's still very experimental as far as I know. |
Thanks @igoralmeida for that response, the issue at hand is not keeping the .org notes and pdf annotations in sync, org-pdftools handles this very well. The issue is that autosave does not happen in the pdf buffer when annotating the PDFs using org-noter and org-pdftools. On top of this, calling ":w" or "save-all-buffers" only saves only the .org file and not the pdf annotations unless explicitly called from the PDF buffer. This only happens in org-noter mode (eg. if I annotate a pdf using pdf tools, the changes are autosaved, and ":w" will also save the pdf annotations if called from another buffer). |
I have also been burned by this. I have annotations that are saved in the org-noter buffer but not saved in the pdf. There appear to be two problems:
Because forgetting to properly save the pdf buffer causes my highlights to be lost, it would be nice if there was a function to add the org-noter annotations to the pdf. |
I have had some success using the 'fix' fapdash has posted in the linked issue. |
I did some reading over the weekend and marked up a number of PDFs using the combined highlight-annotation and text extraction of org-pdftools by calling org-noter-insert-note. This works beautifully and I am able cruise through my compiled notes document calling 'sync next/previous note' to see the highlighted portion of the text presented in the PDF.
On reopening the PDFs to resume note-taking this morning the highlight-annotations have disappeared from the pdf document. The notes themselves are intact (i.e. the content, noter page address and ID are correct) and when I scroll through the pdf, the notes document is still synced (e.g. it scrolls in sync with the pdf).
However, when I call org-noter-sync-[next/previous/current]-note I get "no such annotation". The mini-buffer in the pdf document buffer still tells me there are "[some number of] notes invalid" on the page. pdf-tools-install does not fix this. pdf-annont-minor-mode is active in the bufffer.
Given the layers of programs being used to make this workflow happen I'm not sure if this is an org-pdftools problem but it's the most recent addition to the workflow so I figured I would start here. My config is exactly as is posted in the README for this project. If other parts of my config would be helpful I'm happy to share.
I did reinstall pdf-tools last week due to the change in maintainer (vedang), but that was before marking these documents up.
FWIW my pdfs are OCR tesseract generated from scans of books- this has been associated with some weird behavior with pdf-tools in the past but I have not encountered this specific issue before.
The text was updated successfully, but these errors were encountered: