fuxialexander / org-pdftools

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

relative pdf links #10

Closed mohkale closed 4 years ago

mohkale commented 4 years ago

It would be cool if links to pdfs were relative to the current file instead of absolute. Such as when you've a got README.org file for a project and a bunch of pdfs in subdirectories within the project. It'd make things a lot more portable (I believe).

Ideally we'd tell org-pdftools to insert relative links by setting a buffer local variable in the org file. something like:

# -*- org-pdftools-link-style: relative -*-

* Foo

and then make sure if when someone runs org-insert-link on a file in the same or a subdirectory of the current-directory, then that link is inserted relatively.

fuxialexander commented 4 years ago

I think you can simply set org-pdftools-root-dir to ./ (use a buffer-local variable maybe).

mohkale commented 4 years ago

it seems to be inserting relative links anyways, I'm not sure why it wasn't for me before.

regardless, thnx for the reply. 😄.