Is there an option to display the #+roam_tags: after the title in the dropdown list when selecting a file? Perhaps in the same way that Org Mode does?
Current:
(todo) Miscellaneous Debris
Preferred:
Miscellaneous Debris :todo:
Is there an option to display the #+roam_tags: after the title in the dropdown list when selecting a file? Perhaps in the same way that Org Mode does?
Current:
(todo) Miscellaneous Debris
Preferred:
Miscellaneous Debris :todo:
By the looks of it, you could do this by overriding this function below.
The parenthesis is added by org-roam–prepend-tag-string; it’s also responsible for prependeding tags before displaying the selection candidates.
To something like this below. Not tested, you might need to work with it a bit more.
(defun org-roam--prepend-tag-string (str tags)
"Prepend TAGS to STR."
(concat
str
(when tags
(propertize (format ":%s: " (s-join org-roam-tag-separator tags))
'face 'org-roam-tag)))
Thanks, that worked (just needed to add a parenthesis at the end)
Time to learn some more elisp to make the tags start at a fixed spot
oh good to know it worked
I am trying to work out how to use the same tag placement as Org Mode (org-align-tags
function).
Yeah, that sounds good.
I do not know your fluency in Elisp, but this function looks a bit complicated to me. I would start dead simple, like this:
(indent-to 50)
Adjust the number according to your need.
Depending on your value of org-tags-column
, this should get you pretty close to what Org does, I guess.
(indent-to (abs org-tags-column))
When I add this to the function ,the point in my current buffer moves.
(defun org-roam--prepend-tag-string (str tags)
"Prepend TAGS to STR."
(concat
str
(when tags
(indent-to (abs org-tags-column))
(concat " "
(propertize (format ":%s:" (s-join org-roam-tag-separator tags))
'face 'org-roam-tag)))))
P.S. I use Helm, that might have something to do with it.
Wrap your code with save-excursion to avoid your point moving I guess?