3

In org-mode long header line and multiple tags sometimes makes the overview unreadable.

My question is: Can I use the TAGS property in the PROPERTIES drawer to list tags as values rather then having them in the header line. Alternatively but less desirable assign multiple custom_ids or equivalent, with a list of values.

The goal is to hide the tags from the overview but still have them searchable.

What I have tried: I was naively thinking that the tags property could substitute the header line tags and to list tags here instead. The result of using C-c C-x p and trying to input TAGS value pair results in an error org-entry-put: The TAGS property cannot be set withorg-entry-put'`.

Manually trying to input a TAGS entry with a value works but the tag is not searchable by the two methods I tried, C-c / and C-c \ p.

2 Answers 2

4

After your comment below, I did some experimentation. I am guessing, after you move all the tags to the TAGS property, you are expecting to continue to use the normal tag related interfaces to continue working. This does not look possible. The tags are provided as properties in the property API, but that does not mean they are like real properties. They are a bit "special". In short: I do not think what you are looking for is possible. That said, I believe there is a workaround that will get you half-way.

You could use a custom property, and use the :prop+: syntax to add to the property value to represent multiple tags. It might get very clumsy if you have too many values for each headline. You will of course lose all the normal tag related conveniencs, except for inheritance, which is still possible.

* Headline
  :PROPERTIES:
  :MYTAGS: tag1
  :MYTAGS+: tag2
  :MYTAGS+: tag3
  :END:
  This headline has the tags: tag1, tag2, tag3

** Sub-headline
   :PROPERTIES:
   :MYTAGS+: tag4
   :END:
   This one inherits all the above, and adds tag4

Essentially this way you will be using a custom property as a tag, just for yourself. That said, I don't think this is worth it, if not having them on the headline is just a matter of aesthetics for you. Tags are rather deep-seated in how Org works. Many important functionality like: export, filtering, search, sparse tree uses it heavily. You will have to miss out on all that.

4
  • Hi, Thanks for your answer. I noticed when testing your code that I have a discrepancy between my setup and emacs -q.
    – Sparx
    Sep 22, 2015 at 11:59
  • I think I need to check if it is the different orgmode versions I'm running or not. Related to your answer. I get a different property called TAGS and TAGS+, however using just :TAGS: mutiple times seems to work as expected. They are still not considered as "tags" in the same sense that header tags are though. I will mark your answer as useful. If you could change your answer if you have the same functionality, it would be good.
    – Sparx
    Sep 22, 2015 at 12:10
  • @Sparx I have modified my answer, unfortunately my findings are probably not very helpful for you.
    – suvayu
    Sep 22, 2015 at 18:22
  • thanks! I think I need to check my setup first, and come back to this question.
    – Sparx
    Sep 22, 2015 at 19:01
1

Try *-multivalued-property in org mode Property API. More here.

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.