andras-simonyi / citeproc-el

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

Feature Request: Allow locale-getter to default to a custom-set variable. #152

Closed swflint closed 6 months ago

swflint commented 6 months ago

In my packages org-cite-sidecar and ebib-sidecar I create locale getters, and it would be helpful to instruct users to set a citeproc-variable instead of one per package.

andras-simonyi commented 6 months ago

I've looked into the package and it seems very interesting -- I'm happy that you are making use of citeproc-el in it. As for adding a defcustom, citeproc-el doesn't have customizable variables by design, because it is intended to be a low-level library which is not user-facing at all. If you want to delegate setting the CSL locales (and styles) directory to another package I recommend using the variables org-cite-csl-locales-dir and org-cite-csl-styles-dir in oc-csl.el, which is part of Org and, therefore, Emacs. Relying on Org in this respect could have the added benefit that it already provides a locale-getter creating function, and Org actually contains the default en_US CSL locale (and the Chicago author-date CSL style).

swflint commented 6 months ago

Thanks! I'll take a look to see if I can use that.