2017-07-30 Changing the format of Org-mode clock reports

Two posts ago, I wrote about Org mode clock reports. Continuing this topic, here’s the way to change their default format a bit. Out of the many options, I found three of them especially interesting. If you say :link t in the #+BEGIN: clocktable ... line, all the items will become links to the respective headlines. If you say :narrow 80, the Headline column will be wider if needed (i.e., the parameter defines the maximum width – if all the headlines are narrower, so will be the column). Also, you can include a column with some property in the report by saying :properties ("property_name") (and the plural suggests that you can use a list of more than one property).

Yet another thing is the :sort option. It takes a cons whose car is the column number (1-based) and the cdr is the character you would give the org-sort function. For instance, :sort (1 . ?a) sorts by the leftmost column, using the (increasing) alphabetical order. Other possibilities are ?n (numeric) and ?t (time), and using capital letters give descending order. For instance,

#+BEGIN: clocktable :maxlevel 3 :scope file :block month-1 :sort (4 . ?T) :indent nil

allowed me to quickly see what I had been doing in the last month, starting with the most time-consuming stuff.

Happy clocking!

CategoryEnglish, CategoryBlog, CategoryEmacs, CategoryOrgMode