org-tags-sort-function

org-tags-sort-function is a variable defined in `org.el'.
Its value is
nil

  • This variable may be risky if used as a file-local variable.

Documentation:
When set, tags are sorted using this function as a comparator.

You can customize this variable.