Misc development questions

I’m sure when someone points this out, the answer will be obvious, but I can’t figure out how to access these properties.

#s(org-roam-node :file "/home/bruce/org/roam/biblio/toly2017.org" :file-title "Brexit, Global Cities, and the Future of World Order : (toly_brexit_2017)" :file-hash nil :file-atime
                  (25205 5275 341553 973000)
                  :file-mtime
                  (25205 5275 337553 950000)
                  :id "93f2c87d-716e-499c-b157-36f7d15e7334" :level 0 :point 1 :todo nil :priority nil :scheduled nil :deadline nil :title "Brexit, Global Cities, and the Future of World Order : (toly_brexit_2017)" :properties
                  (("CATEGORY" . "toly2017")
                   ("ROAM_REFS" . "@toly2017")
                   ("ID" . "93f2c87d-716e-499c-b157-36f7d15e7334")
                   ("BLOCKED" . "")
                   ("FILE" . "/home/bruce/org/roam/biblio/toly2017.org")
                   ("PRIORITY" . "B"))
                  :olp nil :tags nil :aliases nil :refs
                  ("toly2017"))

Use the “accessor function” for each property (member attribute? not sure of the correct terms of EIEIO) and pass the node: e.g. (org-roam-node-file node) to get the value of file.

1 Like

Of course! Thank you.

On a related-ish (in the sense that it occurred to me as I’m playing with OR citations) note, do you know why @ is included in the citation refs, even internally?

E.g.

(org-roam-node-from-ref "@doe")

… returns a result, but this does not:

(org-roam-node-from-ref "doe")

Does that mean they’re somehow tied to what citation system you’re using? So the value is different for org-ref than it is for org-cite?

I’m looking into what it would take to better integrate citar (which will only ever support org-cite) and org-roam.

I don’t use citations in Emacs much, but looking at the following info node from the Org-roam manual, I get the impression that the @ is used because Org-roam needs to differentiate org-cite and org-ref citations.

9 Citations
***********

Since version 9.5, Org has first-class support for citations.  Org-roam
supports the caching of both these in-built citations (of form
‘[cite:@key]’) and org-ref (https://github.com/jkitchin/org-ref)
citations (of form cite:key).

The @ prefix in org-roam-node-from-ref is added by the function on the fly; I believe the DB itself is agnostic of the org-ref and org-cite; and thus does not hold the prefix – I may be wrong here; I would need to see if there is a part where @ is removed in lines of code around here in org-roam-db

Another reason we need to get org-ref, along with everywhere else, to move to org-cite.