4

Is it possible to use org mode tags :LIKE_THIS: inline in the heading text, the way #twitter_style tags are used elsewhere?

If I add any text after a :tag:, it stops being highlighted as a tag, and C-cC-q stops to recognize it, too.

On the other hand, I would like to avoid duplicating text in a header, like below:

*** TODO Make foo use bar :foo:bar:

3
  • 2
    Open up an org-mode buffer and familiarize yourself with the variable org-complex-heading-regexp to get a feel for how it is that org-mode knows what to do with a heading, and you'll see that tags need to be in a special location with a special format. The regex gets set up when the buffer loads taking into consideration things like org-todo-keywords. Search utilities that generate the *Org Agenda* buffer rely upon specific locations of tags. People sometimes opt to put something similar to tags in the property drawers since org-tags-view can also search that location.
    – lawlist
    Commented Jul 21, 2017 at 15:00
  • @lawlist: Please turn it into an answer. (The answer would be negative.)
    – 9000
    Commented Jul 21, 2017 at 20:59
  • 2
    The OP was 4+ years ago, and to my knowledge, inline tags are not supported (yet). I'd like to resurface the question and expand on it. In my use-case, the need for inline tags has come up repeatedly. In fact, it is desirable to include inline tags not only in the header, but also in the body underneath a header. The format could be :tag: or perhaps something different (e.g., #tag or @tag) to distinguish the behavior (and programmatic utilization) of inline tags from standard :tags:.
    – midas0441
    Commented Aug 24, 2021 at 8:33

1 Answer 1

4

org-mode does not support placing inline tags within the heading, except those that appear at the very end of the heading.

I suggest opening up an org-mode buffer and familiarizing oneself with the variable org-complex-heading-regexp to get a feel for how it is that org-mode knows what to do with a heading, and see that tags need to be in a special location with a special format. That regex gets set up when the buffer loads taking into consideration things like org-todo-keywords. Search utilities that generate the *Org Agenda* buffer rely upon specific locations of tags. People sometimes opt to put something similar to tags in the property drawers since org-tags-view can also search that location. [fn1]

[fn1] See the "Property Searches" advanced searching section of the org-mode tutorial section http://orgmode.org/worg/org-tutorials/advanced-searching.html

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.