Using Namespaces Instead of Prefixes in Roam Research

Using Namespaces Instead of Prefixes in Roam Research

Some Roam Research users use page title prefixes in order to quickly differentiate between different types of content. E.g.: “B: How To Take Smart Notes” for the book, and “A: How To Take Smart Notes” for an article about it.

Roam Research has a feature built-in with similar advantages and additional features: namesspaces.

Namespaces are, and are simply created, by using a backslash / in the page title. In our examples we might end up with “Book/How To Take Smart Notes” and “Article/How To Take Smart Notes”

Added Advantages

Semi-Automatic Namespace Collation

Typing [[Book/How To Take Smart Notes]] somewhere will:

  1. Create the page Book/How To Take Smart Notes
  2. If you go to the page [[Book]], the link, your mention of the page, will show up under Unlinked References.
  3. If you go to the page [[How To Take Smart Notes]], the link, your mention of the page, shows up there under Unlinked References as well.

Note that [[Book/How To Take Smart Notes]] is just a page title, just like any other, so in and by itself it will not make the page show up as a reference on the Book page.

Folders on Export

When doing an export to Markdown, the namespaces will become folders, and the last part of the namespace will be a regular file in that folder.

This has two advantages:

  1. Natively avoids name collission
  2. File system safe filenames. Prefixing a page title with something like “B: How To Take Smart Notes” can cause problems when extracting your ZIP file in Windows, as the colon is a forbidden character in filenames. Utilities like 7zip can replace the forbidden character with an underscore, but this will break your links to the file in the other files.

Clean Display Options

The initial default for displaying namespace links is to show the whole link.

Using the shortcut sequence CTRL C followed by CTRL L you can cycle through that option, abbreviated, or isolated:

  1. [[Book/How To Take Smart Notes]]
  2. [[B/How To Take Smart Notes]]
  3. [[How To Take Smart Notes]]

The color of the links will change according, so visually it is readily apparent 2 & 3 are namespace links


Uncategorized

2 Replies to “Using Namespaces Instead of Prefixes in Roam Research”

  1. I’ve stuck with the tool since December 2019, and it grows on you. First used it as a notepad, then a CMS, but eventually things started to fall in place for more. Combined with the Readwise integration, which now also includes Feedly notes/highlights, and their customizable export templates for Roam, it is just shaping up to be the place for my knowledge and writing.

    I usually use 2-3 tools, with Evernote still being the place where “everything” ends up, if not for the fact I have 15+ years notes in it, but it is looking like I prefer Roam over TheBrain.Not that TB is bad or anything like that; it’s just that I tend to store articles and highlights in TheBrain, but tend to *work* with notes in Roam.

    If you have any questions, feel free to ask here or hit me up on htps://twitter.com/ruudhein

Leave a Reply

Your email address will not be published. Required fields are marked *