# Display Roam tags after title

**URL:** <https://org-roam.discourse.group/t/display-roam-tags-after-title/1106>\
**Category:** Requests\
**Created:** [December 28, 2020, 7:19am UTC](https://org-roam.discourse.group/t/display-roam-tags-after-title/1106 "2020-12-28T07:19:21Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![danderzei](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/danderzei/32/59_2.png) [@danderzei](https://org-roam.discourse.group/u/danderzei)\
**Post date:** [December 28, 2020, 7:19am UTC](https://org-roam.discourse.group/t/display-roam-tags-after-title/1106/1 "2020-12-28T07:19:21Z")

</div>

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:`

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [December 28, 2020, 7:43am UTC](https://org-roam.discourse.group/t/display-roam-tags-after-title/1106/2 "2020-12-28T07:43:46Z")

</div>

By the looks of it, you could do this by overriding this function below.

The parenthesis is added by [org-roam–prepend-tag-string](https://github.com/org-roam/org-roam/blob/master/org-roam.el#L856); it’s also responsible for [prependeding](https://github.com/org-roam/org-roam/blob/master/org-roam.el#L876) tags before displaying the selection candidates.

To something like this below. Not tested, you might need to work with it a bit more.

```auto
(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)))

```

---

<div class="post-metadata">

**Author:** ![danderzei](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/danderzei/32/59_2.png) [@danderzei](https://org-roam.discourse.group/u/danderzei)\
**Post date:** [December 28, 2020, 8:07am UTC](https://org-roam.discourse.group/t/display-roam-tags-after-title/1106/3 "2020-12-28T08:07:40Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [December 28, 2020, 8:23am UTC](https://org-roam.discourse.group/t/display-roam-tags-after-title/1106/4 "2020-12-28T08:23:25Z")

</div>

oh good to know it worked 🙂

---

<div class="post-metadata">

**Author:** ![danderzei](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/danderzei/32/59_2.png) [@danderzei](https://org-roam.discourse.group/u/danderzei)\
**Post date:** [December 28, 2020, 8:39am UTC](https://org-roam.discourse.group/t/display-roam-tags-after-title/1106/5 "2020-12-28T08:39:17Z")

</div>

I am trying to work out how to use the same tag placement as Org Mode (`org-align-tags` function).

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [December 28, 2020, 9:14am UTC](https://org-roam.discourse.group/t/display-roam-tags-after-title/1106/6 "2020-12-28T09:14:55Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [December 28, 2020, 9:24am UTC](https://org-roam.discourse.group/t/display-roam-tags-after-title/1106/7 "2020-12-28T09:24:58Z")

</div>

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))`

---

<div class="post-metadata">

**Author:** ![danderzei](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/danderzei/32/59_2.png) [@danderzei](https://org-roam.discourse.group/u/danderzei)\
**Post date:** [December 28, 2020, 10:04am UTC](https://org-roam.discourse.group/t/display-roam-tags-after-title/1106/8 "2020-12-28T10:04:05Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [December 28, 2020, 10:40am UTC](https://org-roam.discourse.group/t/display-roam-tags-after-title/1106/9 "2020-12-28T10:40:51Z")

</div>

Wrap your code with save-excursion to avoid your point moving I guess?
