andras-simonyi / citeproc-el

A CSL 1.0.2 Citation Processor for Emacs.
GNU General Public License v3.0
85 stars 9 forks source link

Support *relative* CSL file names #60

Closed EmmanuelCharpentier closed 2 years ago

EmmanuelCharpentier commented 2 years ago

My usage of citeproc-el is nowaday mostly via the [cite:...] feature of org-mode. My suggestion might be in org-mode territory. Or I might bark up the wrong tree...

In this implementation, the CSL style file must be an absolute file reference. This might be a pain if the relevant file has a long path. It might even be impossible (e. g. : acceding a file "in the Cloud", such as a Google drive, or a SMB/CIFS file with no drive letter in Windows).

Could citeproc accept relative references, such as (Linux examples, I don't have enough Windows fu to create correct examples) :

#+cite_export: MyLocal.csl
#+cite_export: MySubdir/MyLocal.csl
#+cite_export: $MyProject/utils/MyCustom.csl
#+cite_export: cifs://myserver/Myservice/MyUtils//MyCustom.csl

Having to specify an absolute path is but an annoyance, but not a minor one...

Cordially,

bdarcus commented 2 years ago

I suspect it it indeed an org-cite issue, but note the org-cite-csl-styles-dir variable.

andras-simonyi commented 2 years ago

This definitely looks like something which could (should?) be implemented on the Org side -- resolving relative file names requires information about the context (relative to what?) and the context will vary from application to application, e.g., in Org could be the path of the Org document, a setting etc.

andras-simonyi commented 2 years ago

In the absence of objections I'm going to close this soon.