0

The documentation says that %T shows the tag of the item. However the documentation states:

%T   the last tag of the item (ignore inherited tags, which come first)

How can I get All the tags (inherited and direct) to be displayed with %T? Just like how they usually show up at the right of the item:

:TAG1:TAG2::MY_TAG:

I know that I could put the tags at the right, but I don't want that. I am explicitly removing them.

(setq org-agenda-remove-tags-when-in-prefix 'prefix)
4
  • 1
    I don't see a way of doing that. This is buried in a couple of places in the code: in org-compile-prefix-fomrat which pre-cooks the org-agenda-prefix-format string into a more efficient structure that will allow quicker processing of all the agenda items, and in org-agenda-format-item which is called to process each item on the agenda. The relevant processing in the latter is in org-agenda.el:L7228ff for the first part (getting rid of the tags at the end of the item) and org-agenda.el:L7278 for adding the last tag to the item in the place you specified in org-agenda-prefix-format.
    – NickD
    Commented Mar 30, 2022 at 18:03
  • The line numbers are approximate of course: they are the ones in my copy of the code which is ` Org mode version 9.5.2 (release_9.5.2-409-gc1b034)`.
    – NickD
    Commented Mar 30, 2022 at 18:06
  • My final target is to use the tags string at the left of the items in the agenda-view. Perhaps there is an alternative approach to this?
    – onlycparra
    Commented Mar 30, 2022 at 20:45
  • 1
    Yes, I understand what you want to do. I don't see an alternative though: the org-compile-prefix-format function will have to be changed to provide an evaluator that provides the whole string of all the tags rather than the last tag. BTW, it'll probably destroy the alignment of your items completely.
    – NickD
    Commented Mar 30, 2022 at 21:19

0

Your Answer

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

Browse other questions tagged or ask your own question.