GMail Label Fun

January 8, 2011

The Google labs nested labels feature is interesting, but still a bit buggy.  Depending on how you have label visibility set within a label hierarchy, you’ll get some odd results.  For simple trees of labels, it probably works rather well, but it does impose a hierarchical structure — a taxonomy — on your labels.  Depending on what you’re trying to do with your labeling system, this may or may not work for you.  If you want to treat the labels as a vocabulary independent of how terms interrelated, yet be able to apply an order to the visual representation of labels within the GMail interface, you might want to consider a different approach.

Fortunately, special characters (like punctuation) sort before alphanumerics in GMail.  Unfortunately, while quick search produced several posts listing the sort order, Google appears to have made some changes in their sort algorithm.  For those interested here’s the current sort order (ascending):

  1. ` (grave accent)
  2. _
  3. -
  4. ,
  5. ;
  6. :
  7. !
  8. ?
  9. .
  10. (
  11. )
  12. [
  13. ]
  14. {
  15. }
  16. @
  17. *
  18. \
  19. &
  20. #
  21. %
  22. +
  23. <
  24. =
  25. >
  26. ~ (tilde)
  27. $
  28. 0 – 9
  29. A – Z (case-insensitive)

For example, to visually sort “Zynga”, “Microsoft”, “Facebook”, and “Apple” in that order, simply start the label with the appropriate character:

  • _Zynga
  • .Microsoft
  • @Facebook
  • #Apple

GMail appears to do “safe encoding”  of the label string, converting certain characters to others internally (you may notice this if you attempt to do a “label:” search).  Because of this, there is a caution to using these characters:  Hyphens, single and double quotes, parentheses, and braces (positions 3, 10-13, 16, and 17) behave differently and “interact”.  For example, if you create a label ‘food (prefaced with a single quote), you can also create .food, @food, or any of the others in the list except you cannot create as (food, {food, “food (and so on).

What with the number of special characters available outside the 7 listed, it’s really better just to avoid them.

Leave a Comment


Previous post:

Next post: