How to use ROAM_TAGS and/or tags?

It’d be great to get a more thorough description of the options with tagging here, not so much in terms of how tags can be extracted, but in terms of the trade-offs between the -tags :: convention and the #+ROAM_TAGS option.

I’m a total newbie to org mode, but one thing that I’ve noticed that I do not understand is that if I create a link in ROAM_TAGS, the link is expanded so you see the brackets and all. This makes me think that you can’t use links as tags when using ROAM_TAGS. Is that right?

Just a bit more context for my question about trade-offs. I think this comes from having looked over this post by @jethro about how to take notes. There is discussion here of using the -tags :: convention with link, which is appealing because you could have these centralized files with backlinks. But with that convention you don’t seem to get the ability to search by tag that ROAM_TAGS offers. Is there any reasonable way to get both?

The - tags :: way of creating tags has been superseded by the #+ROAM_TAGS: way, but the ability to use links as tags had to be cut. The reasoning was that the files used as tags tended to be empty, and where only used for the ability to centralise backlinks to relevant notes.

Tags appear in the completion-list when you run org-roam-find-file, and you can filter the list by typing the tag, and then refining your search. We’ve also implemented a FILTER-FN argument to org-roam-find-file for power-users to define their own commands based on org-roam-find-file to define their own methods. In your case, you could create a two-step expansion process which would first ask you to choose a tag out of a completion-list, and then to choose a title amongst the filtered notes.

I think this would be an interesting feature to have, and you’re welcome to file a feature-request on GitHub.

2 Likes

The overload of the word “tags” in org-roam is problematic, in my opinion.

We have org-mode tags, applied to a heading or as #+FILETAGS; the - tags :: links in org-roam; and the roam tags in org-roam, defined as #+ROAM_TAGS or implicitly by the directory.

The behaviours diverge and it risks being very confusing as the documentation expands.

I’d be careful to separate the terms clearly by using systematically the same name, such as: “org tags”, “roam tags” and “roam links”.

I would even suggest that the - tags :: convention be replaced by - links ::.

In my case, I do no use roam tags as a replacement for roam links. I assign them very different semantics.

Roam links target other notes, i.e. other units of knowledge. Yes, they can start out as empty notes, but sooner or later I find that there’s something I want to write in them directly, or copy over from my fleeting notes.

Roam tags I treat as metadata: they denote the type of the note (project, meeting, person) and how it should be handled by the system. The way the system is designed, I think you will find roam tags to be very impractical if you start using them as links to other units of knowledge. They’re used much more sparsely than links.

I believe that if you start using roam tags as you would use roam links to empty notes, you’ll quickly bump into the limitations of the search interface. I have an Evernote database with several hundred tags and if it wasn’t for the fact that you can organize them hierarchically and with a query language, they’d be totally useless.

In summary: each one will find their way to use these things; but it would be very important to name them consistently so that we can understand each other, especially for newbies reading the docs.

7 Likes

I agree in changing the convention to something else.

Although I don’t think links should be the replacement word. When one refers to tags, they refer to the files themselves (whose purpose is to act as tags). When one refers to links in your case, they could be referring to either the files (whose purpose is to act as “roam links”) or the actual links (the ones with link filename + link description). Still confusing.

I initially thought keywords might be a better fit, but that metadata word is already used in publications such as articles or books. You can also extract keywords from bibtex entries into your org roam notes so it’s probably best not to touch that one.

I think a good word would be one that implies some sort of attachment to its notes, while also being its own distinct entity, and could be used for filtering (filter by <word>). I think labels works. Similar enough to tags but without interfering with a bunch of namespaces. It might be better to see it in action:

#+TITLE: Picking the Proper Name to Replace Tags
#+CREATED: [2020-07-16 Thu 00:38]
#+LAST_MODIFIED: [2020-07-16 Thu 00:38]
#+ROAM_KEY: https://org-roam.discourse.group/t/how-to-use-roam-tags-and-or-tags/190/23
#+ROAM_CONTEXTS: website

- source :: https://org-roam.discourse.group/t/how-to-use-roam-tags-and-or-tags/190/23
- labels :: Nomenclature Org-Roam Conventions

Doesn’t look too bad. Maybe there’s a better word.

Oh and I also think #+ROAM_TAGS should be changed because tags doesn’t seem like the accurate word. Tagging usually involves attaching topics of interests, but people here don’t seem to use roam tags for that.

My suggestion is #+ROAM_CONTEXTS since people here seem to use it for context-switching. They use it to distinguish notes of different types or purposes (e.g. dailies, website, person).

1 Like

Both your suggestions seem decent options to me.

#+ROAM_CONTEXTS would fit my usage exactly but may be a bit overly specific for other folks.

I think - links :: is actually OK, but I’ve been using - related ::, which is a convention I was already using in org-mode. I think it conveys the equal standing of all notes pretty well, more than - tags :: or - labels ::.

I’ve also been using - who :: for people in a meeting. I’d rather use properties for that, but the backlinks won’t work).

Anyway, my system is still settling so no hard opinion on my side except that each of these things should have a name, whatever it is.

I like related a lot actually, moreso than my labels suggestion.

As for #+ROAM_CONTEXTS, I feel like ‘context’ is a broad enough term that people could still use it in a more general way, no? I can’t think of examples where it might not fit right.

Same here, i use #+ROAM_TAGS for context (project, home, work, etc. like “area” thing in PARA method). I miss another level of labelling, to better filter.

For example, we could have a file project1.org

#+ROAM_TAGS: Works
#+FILETAGS: blog

and project2.org

#+ROAM_TAGS: Home
#+FILETAGS: blog

And so, i could filter and collect labelled “blog” org file to publish, like the post i made in

1 Like

Is it possible to add #+ROAM_TAGS property to any, and multiple, headlines in a file? Because I’ve been using an org-capture template that adds to a datetree in a sort of generic “notes” file in org-roam. I wasn’t sure how else to take little one-off notes, it felt silly to do so in a new file, plus tricky to track down later.

Hi @calebjay.
Maybe I’m wrong, but I believe it’s only for the file (node), not for headings… ¯\__(ツ)_/¯

Are you typing in the text #+ROAM_TAGS: … or is there a command that does this?

I have that text in my capture template

1 Like

For posterity, because this topic still shows up in Google searches for “org-roam tags”: A lot of this discussion has been rendered irrelevant by the transition to org-roam v2, which exclusively uses org-mode’s native tag system with either per-heading :tags: and/or a #+filetags: keyword.

4 Likes