When using org-roam-node-find/insert, how can I show both file names and tags, but only perform completion on file names?
Currently, searching for e.g. ‘chemistry’ completes 40+ files that have the ‘chemistry’ tag, in addition to a node with the file name of ‘chemistry [course code].’ I would want it to show only ‘chemistry [course code]’ when I type ‘chemistry.’ However, I would still like to be able to see the ‘chemistry’ tag normally as I search.
I’m on Emacs 28.1 with Org roam commit 8667e44 (Doom Emacs).
You have to customise the variable `‘org-roam-node-display-template’ I dont know what is the correct way to refer to them but you have to define the categories through cl-defmethod then you can add those back in the variable.
The default is “${title}” – the tags is already defined so you can try “${title:*} ${tags:10}” the number determines the length after which it is truncated * means take whatever is required.
Please also look here,
If I didn’t understand your query, or you need something else let know,
Best.
I have two nodes displayed in the minibuffer here. The second one being selected has tags “japonism” and “research”. The tags are not matched by my search term “japo” – only the word in the title is. That’s annotation.
Tags displayed in org-roam-node-display-template are matched (not shown in my screen shot). I think that’s what you have with the “chemistry” tag on your end.
So my suggestion is to remove the tags from display-template entirely and add them as an annotation with something like the code example above.
I sincerely apologize for the late reply. Thank you @akashp and @nobiot for the guidance; this allowed me to achieve my goal perfectly. Thank you for also linking me the user-contribute tricks page.