From: Joost Kremers <email@example.com>
To: Org Mode List <firstname.lastname@example.org>
Subject: CSL-JSON support for =parsebib=
Date: Fri, 07 May 2021 11:17:13 +0200 [thread overview]
Message-ID: <email@example.com> (raw)
[Cc-ing Theo von der Malsburg]
Now that Org is getting support for Citeproc, it could be useful to add support
for the CSL-JSON format for bibliographic data to Emacs. Therefore, after a
friendly request from Denis Maier, I have added support for this format to the
Since =parsebib= is used by =bibtex-completions=, which in turn is used by
=bibtex-actions=, =helm-bibtex=, =ivy-bibtex=, =org-ref= and =org-roam-bibtex=,
this is a first step in making bibliographic data in =.json= format directly
available to Org users, without the need of any BibTeX conversion.
[Boy, look at me doing the marketing speak! :D ]
Anyway, this really is the first step. =bibtex-completion= will need to be
modified in order to make use of the new functionality, and the same may be true
of the packages based on it.
At this point, the new code isn't merged into =master= yet. It is available in
the =wip/csl= branch of =parsebib='s Github repo:
The README has most of the details. I appreciate any and all comments,
suggestions and tips.
For those maintaining packages based on =parsebib=, I have at least one
question: currently, =parsebib= returns a BibTeX entry in the form of an alist
of =(<field> . <value>)= pairs, where both =<field>= and =<value>= are strings.
A CSL-JSON entry is returned as an alist, but the =<field>= names are symbols,
It would be extremely impractical to return the JSON data with strings as field
names, because the JSON parsing libraries in Emacs return symbols, so converting
them would take time. Plus, those libraries also expect symbols when serialising
Elisp data to JSON. (Which I intend to make use of in Ebib later on.)
It would be easier to modify the BibTeX output to return field names as symbols.
I originally chose strings, because that's what =bibtex.el= uses, making it a
little easier to integrate with it.
So the question: would it be helpful to make this change to the BibTeX data, so
that the data from both sources uses the same format? Or would it be better to
keep it as it is, even if that means that BibTeX data and JSON data isn't
Life has its moments
next reply other threads:[~2021-05-07 11:30 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-07 9:17 Joost Kremers [this message]
2021-05-07 11:52 ` CSL-JSON support for =parsebib= Bruce D'Arcus
2021-05-07 12:29 ` Titus von der Malsburg
2021-05-07 12:34 ` Joost Kremers
2021-05-07 13:33 ` Titus von der Malsburg
2021-05-07 14:47 ` Joost Kremers
2021-05-07 16:22 ` Titus von der Malsburg
2021-05-08 9:51 ` András Simonyi
2021-05-08 15:51 ` Joost Kremers
2021-05-07 13:03 ` Bruce D'Arcus
2021-05-08 11:57 Denis Maier
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).