weirdNox / org-noter

Emacs document annotator, using Org-mode
GNU General Public License v3.0
1.08k stars 101 forks source link

can't save pdf annotaions when NOTER_DOCUMENT is a symlink path #117

Closed ghost closed 3 years ago

ghost commented 4 years ago

When the :NOTER_DOCUMENT: in the org-noter note file is a symlink path, any annotation created with pdf-tools will lost on the next file open, ie the annotation are not actually saved during the org-noter session. pdf-tools alone have no problems with symlink path.

I currently use a pdf library folder that syncing between a windows box and linux box, and use org-roam-bibtex to edit org-noter notes, symlink is necessary if I want to use the same path for NOTER_DOCUMENT on both system

ghost commented 4 years ago

Set `directory-abbrev-alist' will solve this bug, so this is nothing to do with org-noter then?

Jonghyun-Yun commented 3 years ago

Set `directory-abbrev-alist' will solve this bug, so this is nothing to do with org-noter then?

Could you please elaborate how you resolve it? I am experiencing the same issue.

ghost commented 3 years ago

suppose you have a symlink /aaa pointing to a folder /AAA/

(setq directory-abbrev-alist
        '(("/aaa" . "~/AAA")))

However since emacs have functions like true-path, this may not be the correct fix.
In my case it turned out one of my package org-roam-bibtex failed to pass the true path of pdf files to org-noter, which was fixed

Jonghyun-Yun commented 3 years ago

suppose you have a symlink /aaa pointing to a folder /AAA/

(setq directory-abbrev-alist
        '(("/aaa" . "~/AAA")))

However since emacs have functions like true-path, this may not be the correct fix. In my case it turned out one of my package org-roam-bibtex failed to pass the true path of pdf files to org-noter, which was fixed

Thanks a lot. Using file-truename seems to solve my issue https://github.com/weirdNox/org-noter/issues/144#issue-871459193