The tag is a label that you can use to group your notes. Tags are useful when you want to filter and find your notes through tens, hundreds and thousands of them in your file system. The mechanism and what you want from it seem simple but tags can be troublesome. Here are my own guidelines that I follow for tags:
- Do not use a lot of tags in one note; instead create topic notes (index or MoC notes) and add links to them
- Do not define many tags; they grow out of control if you are not careful
- Your tag system will evolve over time; don’t worry about changing it
These guidelines let me focus on writing and linking notes without the overhead of micro-managing the tags. And yet they still help me find and filter my notes even from year 2011, so the guidelines have served me well for these years (the guidelines have also taken some time to evolve).
Below I will describe how I use tags in detail but please read it as an account of another PKM (personal knowledge management) nerd sharing his experience. I hope it is useful in some way for you to form your own principles and guidelines. To assist you in your own endeavour, here is a bit more context. I use Org-roam only as an information repository and thinking tool[1]. The tags are used only to filter and search files in org-roam-node-find
, in Emacs’s Dired, and in the file manager of the OS (Windows, macOS, or Linux). Another user @rodelrod also advocates sparse use of tags like I do. I suggest to read his discussions, which I find inspiring: here on his advice on the use of tags[2] and here on his workflow and file structure. For those who use Org mode or Org-roam for task management, I have some pointers in the footnote[3].
Now onto the detail. The screen image below shows what my minibuffer looks like when I call org-roam-node-find
. The tag is not the only filtering mechanism and I combine it with subdirectories as another filtering criteria.
Figure 1. My use of tags in
org-roam-node-find
. See the bottom half of the screen. I use virtico-mode
for my minibuffer completion
The first column of the minibuffer is the subdirectory under org-roam-directory
– you see (articles)
and (personal)
. To enable it, I use this code in the wiki: Filtering by subdirectory. Alternatively, Showing node hierarchy can be useful for you, too. These need a few lines of code but are an easy customization.
The second column is the tag of the note. By default, Org-roam does not show the tags in the minibuffer. Customize org-roam-node-display-template
as shown in README and in the user manual (info "(org-roam) Customizing Node Completions")
. Once you show the tags, they are prefixed with a hash character “#” by default. This is what user option org-roam-node-template-prefixes
controls.
So I have only this to configure my tags (the backlinkscount
part is not relevant for tags, but for completeness, the configuration is mentioned in the wiki). And I have a capture template that lets me select one of the few possible tags (more on this below).
(setq org-roam-node-display-template "${directories:10} ${tags:10} ${title:60} ${backlinkscount:6}")
;;;; Org-roam my tags
(cl-defmethod org-roam-node-directories ((node org-roam-node))
(if-let ((dirs (file-name-directory (file-relative-name (org-roam-node-file node) org-roam-directory))))
(format "(%s)" (car (split-string dirs "/")))
""))
This is it with my Org-roam-specific customization for tags. But I have a long history with tags with note-taking applications. I have settled on how I use tags and file naming convention around 2011 before I started using Emacs and long before Roam Research, Org-roam, Logseq, Obsidian and other note-taking apps that have appeared in the PKM scene in recent years around the pandemic. The number of tags and what tags I use have evolved over the years, but the principle that governs my way has been unchanged. It is based on this old webpage written in 2009. The “infobase manager” would be now called a PKM tool. The links to the original discussions on Scrivener discussion boards that the author refers to are not correct any longer, but I have since found one of them archived in the new forum. It is still a good read.
When I talk about tags, I need to talk about the file naming convention because I embed the tag in the file name in addition to the note’s front matter. I assign one and only one tag (not empty and not more than one) to each of my Org-roam files. As a real example, the full file name of this file looks like this:
~/Documents/evergreen/2023-12-23T131154_C_tags-in-org-roam-v2.md
Ignore the directory part and file extension (I use Org-roam with markdown files), and look at the file base name: 2023-12-23T131154_C_tags-in-org-roam-v2
.
2023-12-23T131154
is the ID, which consists of the file’s creation date and timeC
is the tagtags-in-org-roam-v2
is the sluggified title “Tags in Org-roam V2”- I concatenate these parts with an underscore “_”
“C” is the capitalized first letter of the tag “creation”. This tag denotes the “type” of the note-file. For each file, I will ever assign only one of the types because I have made them mutually exclusive. Currently I have 3 type-tags “(C)reation” “(R)eference” “(I)ndex”. These types will not overlap. Creation notes are my thoughts. Reference notes are notes on work by someone else. Typically they contain direct quotes from a book or article on the web with my notes around them. “Index” is a collection of links for a topic. Some people may call it a map of contents (MoC). Below are examples of other types. You will see what sort of notes are reference and index types.
- Reference file:
2020-03-14T151100_R_file-system-infobase-manager.md
- Index file:
2022-05-31T192524_I_note-taking.md
You may think the boundary between creation and reference can be blurry. A reference note often contains my comments, which have elements of my original creation, and therefore these types do not seem mutually exclusive. My rule is simple: if I take notes directly for a reference with quotes or with paraphrased sentences, that’s a reference note-file; if I start typing my thoughts with no reference, then that’s my creation. This article is written in Org-roam and started as a creation note (I started this note with no reference).
You can see my file naming convention is related to the first two guidelines:
- Do not use a lot of tags in one note. I use only one
- Do not define many tags. I have only three tags
Now onto the last guideline: Your tag system will evolve over time. The snippet below reveals my dirty secret (that even I was not aware of). Evaluating the snippet lists the tags used and their count.
(org-roam-db-query [:select [tag (funcall count tag)] :from tags :group-by tag])
⇒ (("bib" 2) ("classic" 2) ("creation" 113) ("index" 5) ("literacture" 1)
("org-transclusion" 1) ("reference" 116) ("test" 6) ("to-read" 1) ("wip" 1))
I use other tags than the main three I said I would only use. I am only a human… org-transclusion
and classic
are the name of my projects. test
should be obvious and they can be deleted once the test is done (whatever it is). bib
and literature
are both part of my experiment with Bibtex to manage bibliographic information. to-read
and wip
are another new experiment, which may prove useful and extend my conception of what tags should be – they are temporary status. In addition to the type of the notes, adding tags that denote the note’s temporary-status may be useful to me. It is another common use of tags in the wild, but so far I haven’t been using them this way. I will see how this goes.
So you see that I change how I use tags over time. You don’t have to feel that your choice in the beginning is the ultimate commitment that you cannot get out of. Go ahead and experiment. I’d love to see you share your experiences with tags.
My use of Org-roam is as a thinking tool and information repository (see my other comment post for these three modes of usage: 1. task management; 2. information repository; 3. thinking tool). Org-roam is a flexible system, and I can see from this forum that many of us use it for a combination of the three modes (some as all the modes in one). ↩︎
This thread on tags in Org-roam is old and referring to the V1 feature with
#+ROAM_TAGS
, which is no longer present in V2. Tags are now represented by Org’s standard#+filetags
metadata. The discussion itself is still useful. ↩︎Tags used in Task Management. Personally I find the use of @people-name tag interesting (as sort of a personal customer relationship management system).
-
Karl Voit’s discussion on how to use tags and category in Org mode in general (not just Org-roam)
-
@d12frost’s usage of tags for task management and "customer relationship management" with Org-roam and @people-name tag.
-