(feat) core: support new org-mode citations#1806
Conversation
1b6a6fc to
fc5ce67
Compare
Support caching the new Org 9.5 citations. Because citations now has first-class support, and are treated differently from links, they are now cached in their own table. Org-ref citations, instead of being stored in the links table, are now stored in the citations table instead. To use a citation as a ROAM_REF, use the `@citeKey` syntax.
There was a problem hiding this comment.
I'm afraid that I'm not going to be a large help here, since citations are simply not present in my current workflow (though I might incorporate them later) and I'm completely unfamiliar with org-cite (except a very brief familiarization), and not so much with org-ref, which I've stopped using a while ago. In any case, I'll still try to help you.
However, I would try to invite @bdarcus to review this. AFAIK he was actively participating through the design process of org-cite and also maintains bibtex/citation related packages, while also at the same time uses(?) org-roam. It also probably would make sense to invite @myshevchuk and @ThomasFKJorna, since both of them maintain packages that interface with citations.
Other than that, I've briefly tested this PR all over the place and it works just fine. So it LGTM.
Edit: It looks like org-roam-graph is completely unaware about the new citation table, so it won't render them. Though it can be something that can be done later, post merge.
| ,* Probabilistic Robotics | ||
| :PROPERTIES: | ||
| :ID: 51b7b82c-bbb4-4822-875a-ed548cffda10 | ||
| :ROAM_REFS: @thrun2005probabilistic |
There was a problem hiding this comment.
I don't really have anything meaningful to add on this, but AFAIU this is not something that would be actionable/interactable? Since this is a custom format. IIRC org-ref's "cite:" were actionable, just like URL links. I'm not sure whether this even important (probably not), but just wanted to highlight this, so someone else who's more knowledgeable on citations would evaluate this.
There was a problem hiding this comment.
I raised this question on the org-mode list recently, though have not yet had any responses.
https://lists.gnu.org/archive/html/emacs-orgmode/2021-08/msg00317.html
If anyone has opinions on this, it might be good to reply to that post.
My tentative suggestion there was to allow citations in the property drawers, but I am still not sure.
As @Wetlize notes, references of this form won't be treated as citations by org, and so they don't be actionable.
Thoughts?
Edit: I suppose it's easy enough to start with this, and if org is changed to allow citations there, reconsider?
There was a problem hiding this comment.
Just to update, org-cite dev says it's a "terrible idea" to allow cites in property drawers :-)
https://lists.gnu.org/archive/html/emacs-orgmode/2021-09/msg00130.html
|
|
||
| ;;; Variables | ||
| (defconst org-roam-db-version 16) | ||
| (defconst org-roam-db-version 17) |
There was a problem hiding this comment.
Possibly unrelated to this PR, but I immediately noticed that building the database from scratch through automatic upgrade feels orders of magnitude more slower than building the database from scratch manually (i.e. through the force sync). Not sure what's going on there, but it's something reproducible.
There was a problem hiding this comment.
Possibly unrelated to this PR, but I immediately noticed that building the database from scratch through automatic upgrade feels orders of magnitude more slower than building the database from scratch manually (i.e. through the force sync). Not sure what's going on there, but it's something reproducible.
Worth looking into separately, I guess.
This removes any additional setup from user
Motivation for this change
Support caching the new Org 9.5 citations.
Because citations now has first-class support, and are treated
differently from links, they are now cached in their own table.
Org-ref citations, instead of being stored in the links table, are now
stored in the citations table instead.
To use a citation as a ROAM_REF, use the
@citeKeysyntax.