Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How is an org brain stored and manipulated? #21

Closed
borgauf opened this issue Mar 19, 2024 · 3 comments
Closed

How is an org brain stored and manipulated? #21

borgauf opened this issue Mar 19, 2024 · 3 comments

Comments

@borgauf
Copy link

borgauf commented Mar 19, 2024

I'm a rank beginner/dabbler with elisp code, but I take it you're "reading in" an org brain directory -- all the file and heading entries -- and creating a big cache or hash or something in live memory, right? Could you point this code out and/or explain what's happening and your general data management idea here? Lisp is the world of data as code and lists -- which is mind blowing sometimes.

@swhalemwo
Copy link
Owner

it mostly relies on org-brain internal functions (org-brain-children/org-brain-friends, look at where they are called in obvz.el) to construct an alist of the nodes and links to visualize, which is then send to python; so it doesn't build a cache in memory. The rationale behind this is to rely on existing org-brain functionality as much as possible (I do have a custom cache for org-brain though to speed up org-brain queries in general, as org-brain queries read a lot from files, which is slow).

I don't really use obvz tho, it didn't turn out to be really useful to me as the graphs I'm drawing now require a lot of custom annotations/clusters/labels, so I just write the dot code manually; therefore also org-brain doesn't work well as a "backend" since little information is shared across graphs.

@borgauf
Copy link
Author

borgauf commented Mar 19, 2024 via email

@swhalemwo
Copy link
Owner

i'm not quite sure what you're trying to get at. obvz is "just" visualization of org-brain. org-brain is not read into memory, but can be be queried via its API (org-brain-children/parents/friends) to get edge information. I don't use org-roam, I tried it a couple of times but found it confusing, perhaps because I never could get backlinks to work; and org-brain does everything that I hear org-roam can do.

I also tried triplet stores (RDF) and graph databases for some projects, but they turned out to be unnecessarily complex and I ended up using RDMBS instead. I also don't see why they should be linked to org-agenda or babel, which work fine for me they way they are. This is largely unrelated to obvz though; if you want to discuss some ideas I think reddit/SE/mailing lists are better places.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants