Org-roam major redesign

Same question here. I’m currently using v1 and find ROAM_TAGS useful for some high-level categorization of note types (e.g., notes about people, literature notes, etc.). What’s the recommendation to recreate this functionality in v2?

@arozbiz @gcoladon , not sure of a “recommended way” but Org Mode’s standard tags works in V2.

For file-level tags, you can use #+filetags. The example in the manual indicates you need to use a colon “:” to separate tags, but this is not entirely true. A space works as a separator on my end (as in “#+filetags: tag1 tag2”).

I would have thought there was a user option for Org-roam to use Org Mode’s tags as well? (not sure).

There was (the 'vanilla option) but that didn’t work because of some of the optimizations that was done, and was never fixed unfortunately.

In v2 you use #+filetags: for file nodes, and regular Org tags for headline nodes to specify tags. You can also make use of tag inheritance, basically the extracted tags are exactly the tags that Org would compute.

In the same way as v1, they can be used to filter out entries in the minibuffer (#foo restricts only nodes with tag foo). But they will have other uses too later on, e.g. when filtering in the agenda.

1 Like

Sounds great, thank you!

Are you planning on bringing back org-roam-tag-sources with directories like in v1?

Just wondering I think I was using the directory tags as a crutch anyways to avoid coming up with meaningful tags.

@emiller It was discussed above (yes, buried in the flood of different topics).

Based on this feedback from Jethro, I am using simple custom logic I whipped up to get the first sub-directory used as a searchable tag string (no change to DB, just using the Emacs completion capability discussed also in this post and offshoot posts from this one).

1 Like

I just tried this out, and am looking forward to using the normal org-mode tags for both files and heading nodes when v2 is released.

Forgive me if this has been asked recently here or elsewhere – but what if anything can those of us who aren’t contributors to the org-roam source do to help those of you who are? Do you want more people using the v2 branch and reporting issues, or something else?

Started a thread on upgrading to Org-roam v2 here!

2 Likes

I’ve answered this briefly in a previous thread, but for v2 what would really help is reporting any bugs/bad ux experiences: this is especially important as v2 gives a unique opportunity to still make large, breaking changes.

1 Like

Again forgive me if it has been covered already:

What is the status of capture templates in V2? These are currently actually the most used feature for me, and I need to make sure that I can do everything I’ve been doing so far with V2 as well.

Also, since subdirectory-based tagging is not available anymore, are subdirectoried still traversed though? I have two semantically separate collections of notes that i don’t want to have to switch between to open a note from one or the other.

I’ll gladly join the testing if these features still work as expected :wink:

What is the status of capture templates in V2? These are currently actually the most used feature for me, and I need to make sure that I can do everything I’ve been doing so far with V2 as well.

I don’t know about your specific need with capture templates, but I personally think they are working perfectly, I’m making a heavy use of them.

As for subdirectories, I don’t use them but I would say they they are sill traversed

@jeyj0

Yes, traversed. I use sub-directories to differentiate personal vs work.
They can no longer be used as tags in V2, but they can be made appear in completion in org-roam-node-find etc. by setting this variable:

(setq org-roam-node-display-template
  "${title:80}  ${file:9} ${tags:20}")

file is the name of the column to show the relative path. The number is the column length in the completion function – by default, file is hidden.

I further customized/advised the Org-roam standard function (org-roam-node--format-entry) to show the first subfolder as #personal and #work like V1.

In this example #test and #heading tags are filetags. #work is the first subfolder (custom with advice).

4 Likes

Perfect, thank you! Then I don’t think anything stops me from using V2 :smiley:

Is there a way to tag a root-level entry without tagging all other headlines in the file, while generally preserving tag-inheritance? I tried using #+filetags to tag a file, after which I noticed that all headline-nodes inherited the tag. Since in this case I do not want this, I set org-tags-exclude-from-inheritance to include the relevant tag. While this works fine for the case of the tag being set on a headline of level 1 (which then doesn’t cause headlines down the tree to inherit that tag), it does not work for #+filetags. That seems to be by-design, as the sole purpose of #+filetags appears to be that all headlines in the file should have the tag assigned.

Edit for clarification:

...
#+filetags: mytag

* Another node with id
...

with org-tags-exclude-from-inheritance set to include mytag I’d like Another node with id not to have the tag mytag assigned, however, it does. What is the correct way to do this?

@mshevchuk , I see that you’ve been actively making commits to the org-roam-v2 branch of org-roam-bibtex, how could would you say ORB is to being taken off the “reasons to hold off on migration” list at the top of the “Org-roam v2 Great Migration” post? :slight_smile: Because I would like to migrate, but am a big fan of ORB.

@gcoladon currently ORB is working only partially with Org Roam v2. The basic find-or-capture functionality of orb-edit-notes when called from helm-bibtex or org-ref has been upgraded and seems to work. Everything else does not work, namely orb-note-actions and orb-insert. Since ORB does not depend that much on Org Roam internals, they are trivial to upgrade but I have to find time to do that. ORB PDF Scrapper does not depend on Org Roam at all, so it should be possible to use it, though it can’t be called from orb-note-actions as it used to be.

Also, the public interface of ORB has somewhat changed. For example, there is no such thing as orb-templates anymore. One should use org-roam-capture-templates. Actually, it was always possible - one could always use org-roam-capture-templates instead of orb-templates and I wasn’t using orb-templates myself. Several other variables and functions meant for the user have been or will be renamed/removed/introduced anew. This must be properly reflected in the README/manual. I hope to finish the transition by the end of this week, but it may take longer. Not too long though.

So as of now it is possible to use ORB’s org-roam-v2 branch with Org Roam v2 to create new notes with helm-bibtex or org-ref, having the data from BibTeX fields populate a template. If orb-templates were used, they should be migrated to org-roam-capture-templates and adjusted according to the new syntax. Reference backlinks also work - ORB has nothing to do with them, they are included with Org Roam.

1 Like

Upgraded to V2, I intend to reimport my notes by hand (because their previously existing organization no longer makes sense to me and I’d rather start from scratch).

However, I’m kinda lost when it comes to setting capture up. Is there a sample config one might be able to derive from somewhere?

Also, I’m not sure what is the expected capture strategy for nodes that are contained within files (and I’m realizing now my approach was kind of random).

We have org-roam-find-file, org-roam-capture, org-roam-insert and org-roam-buffer-toggle. The way I understand it, one creates nodes with capture, visits nodes with find-file and creates links that are not explicitly transclusion (i.e. “inline references”) with insert. Is this correct?

Assuming it is, how does one… create a node within a node? I’m under the impression capture always creates a file. If I have a top-level node (a file) and want to create a node contained within it, how do I do it?

(Also, I’m assuming this has to do with capture templates, but is there a strategy to easily tag nodes?)

You can take a look at my configuration here, which sets up a couple of capture templates using V2.

I use them only to capture new files. I’d also be interested to know whether we can already capture into existing files - the capture templates should already be able to do it, due to the new if-new thing, I assume.

Creating a node inside another node is easy though - simply assign it an id, for example using org-id-get-create. Org-roam will pick it up automatically.

Tagging works the same as in regular org, so you can use basic org functionality for tagging (Tags (The Org Manual)).

EDIT: I have problems with the backlinks buffer though, so take the rest of my configuration with a grain of salt :wink:

@nobiot is it possible to use multiple directories, or could you share the snippet you used to list only the first subfolder?

For example I have courses/21S/biol5410_biochemistry.org and would like to use the courses and 21S tags on it.