org-brain

Concept mapping using org-mode

I’ve tried using personal wikis in the past, in the form of a TiddlyWiki, but it felt weird to use a program separate from Emacs for that task. I kept some notes files in org-mode, used Deft to sift through them etc. But I can’t really say I felt confident about this system, it just seemed like a lot of information which I couldn’t really keep track of and instead of consulting my reference material I usually searched for the information again.

The idea of a personal wiki is to use it as reference material when you learn something new1, or to connect your thoughts: a way to unload your brain. I guess it has some similarities to a journal, but less focused on chronological order and personal experience?

Concept mapping was unknown to me before I heard of a piece of software called The Brain2, which was mentioned in this reddit post on knowledge management in Emacs. A concept map is similar to a mind map, but doesn’t focus on a central topic as much as a mind map usually does. Instead it is a way to connect different concepts with one another, and the same concept can be linked to from different concepts, creating a network of linked concepts. This is similar to a wiki, but in a visual form3.

I find that a problem with mind maps is that they get cluttered fast; it can be hard to get an overview due to information overload. The Brain solves this beautifully by centering on a node (a thought in brain lingo) and only letting you see its parents, its siblings, its children and related nodes. I was intrigued by this piece of software, but as with TiddlyWiki I thought that it would be in line with my workflow if it was integrated with Emacs. So I started working on a project I call org-brain.

org-brain is pretty similar to The Brain, but has less features and a text based interface, it’s Emacs, after all! It works by having a directory full of org-mode files, which are linked to one another using brain: links. I call these files org-brain entries. You can visualize and navigate the network of entries using M-x org-brain-visualize, and add new children/parents from there4. Apart from children, parents and siblings, the concept map buffer also show headlines in the entry file, and external links. These external links are called resources in org-brain lingo, and is a way to connect webpages, files, etc to your entries. New resources can be added from the concept map buffer too; the idea being to quickly connect concepts and relevant information to those concepts.

The org-brain project is pretty young, and my main concern is that it might be too slow when having a large ammount of entry files. org-brain doesn’t use a database, instead it parses an entry file to find its children (brain: links to other entries). This is okay, as we only have to parse one file. The problem occurs when we want to find the parents of the entry. org-mode has no way to know which files links to the current one, so we have to parse every org-brain entry file and get every file that links to the current entry. So far I haven’t noticed any speed problems, but time will tell. Perhaps I need to use a database in the future5.

You can install org-brain from Melpa, or clone/fork/download it on GitHub. I’ve been enjoying using it so far, but we’ll see if it will stick in the long run. Also I excuse the composition of the screencast, it could be a lot better (and shorter) but hopefully it gives you an idea of how org-brain operates!

Footnotes:

1

You may call it knowledge management or information management.

2

This video is a good introduction to The Brain and how it works.

3

Imagine a mind map structure where each node holds a wiki article, and you could see how they connect. That’s actually one of the features of the ConnectedText personal wiki software.

4

You may also choose to use it as a regular wiki and navigate via the org-mode buffers, but if you do that exclusively you probably want a more traditional wiki system, like org-wiki, org-wikish, or plan-org-wiki.

5

There are a couple of alternatives, the ones I’m considering are emacs-db and EmacsSQL. What I probably have to do is adding entries to the database as soon as an org-brain files is saved, in order to keep the database up to date. Well, that’s a problem for the future!