Using filetag and searching by tags

Hello everyone,

I am getting into trouble to work with tags in org-roam. I would like to reproduce what I see in the video of System Crafter : https://youtu.be/YxgA5z2R08I at 21’19’’ (see the screenshot below). As you can see, the author uses in his .org file a line with #+filetags: Project, and when he is looking for a note (calling org-roam-node-find) we can see (bottom right) that the tag “Project” appears, which would be a very nice feature for browsing my notes by topic instead of by title.

But I do not manage to reproduce this behavior although I copied the part of the configuration file of the author related to org-roam, and it seems this feature is automatically “included” with org-roam, so the issue might not come from org-roam … Does anybody know how to achieve this?

Thank you

I believe that in this video, the author is using the Vertico completion framework.

I use the same framework and I see the tags specified in #+filetags:.

1 Like

Thank you for your reply. I will try it if there is no simpler solution. I mean, it seems that Vertico is a big beast.

Best,

It’s honestly not too bad, and in my opinion a much better experience for completions.

If you’re using use-package the installation is pretty simple as shown on the Vertico docs. Couple this with Orderless and the completions are pretty quick and intuitive.

just ensure your display template has provision to show the tags - can you show us your current value of org-roam-node-display-template?

1 Like

Dear @akashp ,

I think your question gave the solution. The variable org-roam-node-display-template can be customized in order to get the tags displayed. By searching for “org-roam-node-display-template” in the Org-roam User Manual we find an example that explains how to achieve it (paragraph 5.5).

Thus, I customize the variable in my init.el :

(use-package org-roam
  ;; [stuffs ...]
  :custom
  ;; [stuffs ...]
  (org-roam-node-display-template ; This is for displaying titles AND tags when calling org-roam-node-find
   (concat "${title:*} "
           (propertize "${tags:50}" 'face 'org-tag)))
  ;; [stuffs ...]
)

and it works perfectly :smiley:

Thank you all for your help !

You can display a lot of the attributes of the node. I use todo, tags, title, and filename. I use consult-org and I can quickly search using incremental search. I highly recommend to use consult-org

          "${todo:10} "
          (propertize "${tags:30} " 'face 'org-tag)
          "${title:40} "
          "${file}"

Basically, you can display any attribute of the node:

        (title aliases                    ; 2
         id file file-title level todo     ; 5
         point priority scheduled deadline properties ;;5
         olp file-atime file-mtime tags refs)) ;;5
1 Like