Nicolas Goaziou <m...@nicolasgoaziou.fr> writes: > Because, as I wrote, this is ambiguous. You cannot distinguish the > following two cases: > > * :mytag: > * :myheadline:
Makes sense. > So, your patch would only move the problem elsewhere. Actually, my patch would solve the existing inconsistency. Org mode already puts tag fontification on :tag: in "* :tag:" headline; org-get-tags returns ("tag") on such headline; org-set-tags sets the :tag: on "*" headline making it look like "* :tag:" (which is even tested in test-org/set-tags); org-tag-line-re used across the codebase also parses "* :tag:" as headline containing tags. It is only the org-element parser that does not recognise the :tag: in empty headline. > I suggest to not tag emptiness. `org-set-tags' could raise an error in > this case. Of course, we can go the other way around and recognise "* :myheadline:" as non-empty headline with no tags. Though it will be more tricky than simply changing `org-set-tags' as you suggest. Best, Ihor