emacs-citar / citar-org-roam

citar/org-roam integration
GNU General Public License v3.0
101 stars 9 forks source link

Extract full path of PDF file in creating a note #12

Closed goballooning closed 1 year ago

goballooning commented 2 years ago

Dear,

Is possible to extract the PDF file path from the BIB file in creating a node using citar-open?

I changed the line "#+title: ${title}\n") in function citar-org-roam--create-capture-note into "#+title: ${citekey}\n\n${title}\n[[][PDF]]"), and I would like to have a link to the PDF file as [[full_file_path][PDF]].

I've been generating links manually using Hook, but think it could be automatic.

Thank you very much in advance, Hongying

bdarcus commented 2 years ago

I would like to have a link to the PDF file ...

Where; in the title, or the body?

If the former, you may be able to edit the defcustom for the title using the standard citar template. But YMMV, depending on your data, and I don't recall offhand which variable to use there).

If the latter, not ATM. But if/when we add user capture templates (which we plan) this would probably not be needed; right?

goballooning commented 2 years ago

I'm trying to put [[full/path/to/foo.pdf][PDF]] in the body. Though I'm not familiar with "capture templates", I would be glad to test this functionality in the future.

Thank you for your effort in implementing Org-roam, citar, and citar-org-roam.

Cheers, P.S. Actually, I'm a Vim user, and just start using Emacs because of Org-roam.

bdarcus commented 2 years ago

Cool!

For capture templates, see org and org-roam documentation.

bdarcus commented 1 year ago

I think #32 and #33 addresses this. You can just configure citar-org-roam-template-fields to include the relevant file, and should be able to use it in your capture templates.