Avoid typing tags in org-roam-find-file


I’m a relatively new org-roam user (and loving it!), so please forgive me if there’s an obvious solution to this (although I haven’t been able to find it in the documentation).

I would like to organize my notes with tags, but when I add any tag (e.g. “Bar”) to a note (e.g. titled “Foo”), then org-roam-find-file only recognizes the note name when I type the tag in parentheses first (e.g. “(Bar) Foo”). I know I could just type a wildcard * every time I use org-roam-find-file, but this would get frustrating after a while. Is there a setting to change org-roam-find-file so that it doesn’t require me to type the tags like this?

(Using org-roam version 1.2.3 and Emacs 26.1.)

Thanks in advance!

I think this is actually outside of Org-roam. You should be able to control the behaviour by setting completion-styles.

I would suggest Orderless, instead of trying to fiddle with the built-in options.

Alternatively, if you use Ivy or Helm, I guess this will become no issue (?)

Another alternative.

For v1, you can choose to place tags behind, not in front of, the title. Try setting this user option to append. I think you can achieve what you would like without changing completion-styles.

(defcustom org-roam-file-completion-tag-position 'prepend
  "Prepend, append, or omit tags from the file titles during completion."
  :type '(choice (const :tag "Prepend" prepend)
                 (const :tag "Append" append)
                 (const :tag "Omit" omit))
  :group 'org-roam)
1 Like

Thanks! I didn’t know about org-roam-file-completion-tag-position, so I just set it to omit.

Appreciate the help a bunch.

1 Like