Org-mode seems to put tags assigned by C-c C-q a fixed number of tab stops after the headline. However, with editing, tag addition, and increased headline length, the tag display can get really ragged and hard to read.

Is there a way to tidy tags? There are a number of ways to tidy up the tree in general but nothing turns up for fixing the tags.

A simple tag tidier would for example right-justify all the tags to the right side of the window or 2+ tab stops past the longest headline.

  • 1
    Have a look at the variable org-tags-column: gnu.org/software/emacs/manual/html_node/org/Setting-tags.html – lawlist Jun 24 '14 at 5:04
  • 2
    It may be blasphemy for me to say this, but I prefer using Google -- it gives hits for not only the Emacs manual, but questions and answers relating to the same or similar issues. I find the questions / answers / comments more helpful than merely reading the manual. – lawlist Jun 24 '14 at 15:57

As reported by lawlist in the comments, the "set tags" command C-c C-q, when prefaced by C-u, will snap all tags in the buffer to the org-tags-column. This is a start and good enough for now--changing the variable will probably do the rest.


To answer the last part of your question, there are some hacks for always right-justifying tags. The hack detailed here (ba/org-adjust-tags-column): http://orgmode.org/worg/org-hacks.html#orgheadline64 hooks into window-configuration-change-hook, before-save-hook and after-save-hook to right-justify tags in display and fix it whenever window size is changed. In saving to files tags are written with just a space between headline and tag (avoids whitespace-versioning trouble). It has worked well for me, but I don't use it now since I mostly use variable-pitch-mode for org.

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.