weirdNox / org-noter

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

Expand NOTER_DOCUMENT path with elisp #141

Open jcguu95 opened 3 years ago

jcguu95 commented 3 years ago

The following works

:NOTER_DOCUMENT: ../../.attach/2b/7d94cb-0dc0-4a61-a81e-2a46fd0b015b/test.pdf

But it would be nice if we can make use of elisp:

:NOTER_DOCUMENT: (format "%s/2b/7d94cb-0dc0-4a61-a81e-2a46fd0b015b/test.pdf" attach-dir)

Similarly, one can start playing things like

:NOTER_DOCUMENT: (format "%s/calculus.pdf" my-math-library)

Related.

It shouldn't be hard to make this change. I'm happy to make a PR if some hint is provided -- the source code for the main function org-noter is a bit large..

Thanks :)

c1-g commented 3 years ago

Hi @jcguu95, would you mind testing my fork of org-noter? I'd modified org-noter--get-or-read-document-property to read S-expression in document property. The behavior is exactly as you'd described. It's on the master branch.