Dynamic tag pane/list

Hello,

I recently moved from Logseq and trying to emulate it’s beloved filtering GUI in org-roam. When I’m filtering for a tag, I want to be able to know beforehand what additionnal tags I can go for using AND operators, a list or tag pane with remaining tag possibilities instead of aiming in the dark and get 0 results back. Logseq’s dynamic tag pane prunes your remaining options for AND search so you’re narrowing down the results intelligently as you’re including additionnal tags. How do I go about doing that? Is there a workaround?

Simple customizing for org-roam-node-find might help.

You can do something like this (refer to README):

  (setq org-roam-node-display-template (concat "${title:*} " (propertize "${tags:10}" 'face 'org-tag)))

When you call org-roam-node-find, tags should appear as part of each candidate. By default, each tag should have a prefix of “#” (customizable via org-roam-node-template-prefixes). So if you type “#firsttag” and then “#secondtag”, the candidates should be incrementally narrowed by the matching tags.

Your experience might depend on the “completion framework” and completion-styles that you have chosen to use. For the completion framework, Org-roam would probably work best if you are using one that does vertical display (e.g. Ivy, Vertico, Selectrum, etc.). For completion-styles, I suggest something like Orderless as it lets you match what you type with candidates in any order (otherwise, you might need to type the tags exactly in the order that appears in the candidates list).

I think @nobiot’s answer pretty much covers what you asked.

However, I had a discussion with someone over on r/emacs about implementing part of logseq’s tagging functionality in org roam and so I have a function which you might find useful. You can find it in this link.

1 Like

Thank you so much! I’ll try it out ASAP!

Thank you! Looks very useful indeed.

Happy to hear it works well for you.