Provide an ability to customize sort-order

As requested in trptcolin/reply#153.