2

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:

  • 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 Jul 21 '17 at 15:00
  • @lawlist: Please turn it into an answer. (The answer would be negative.) – 9000 Jul 21 '17 at 20:59
2

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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