Ihor Radchenko <yanta...@gmail.com> writes:

> 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.

There is no spoon^W way. Or, no way is satisfactory. "Don't tag empty
headlines" is better.

In any case, I'm not convinced Org Element is wrong here.

> Though it will be more tricky than
> simply changing `org-set-tags' as you suggest.

It probably boils down to changing `org-tag-line-re'. I didn't check
though.

Regards,

Reply via email to