Search code examples
emacsorg-mode

Org Mode. Sorting in column view


How do we sort in a column view. In specific, I have a list of estimated taks, along with their priority, I want to be able to sort them based on any field, dynamically or atleast by specifying a field as a property.


Solution

  • AFAIK, you can't sort while you are in column view. But you exit column view (by typing "q"). They you can sort the entries by property with M-x org-sort (C-c ^). Type r for property and then enter the property you want to sort by.

    E.g., let's say we begin with this:

    * Test
    ** First task
       :PROPERTIES:
       :Effort:   1:30
       :END:
    ** Second task
       :PROPERTIES:
       :Effort:   0:30
       :END:
    

    Navigate to "* Test" and type C-c ^ (or M-x org-sort). In this case, type "r" and then enter "Effort" to get the resulting order:

    * Test
    ** Second task
       :PROPERTIES:
       :Effort:   0:30
       :END:
    ** First task
       :PROPERTIES:
       :Effort:   1:30
       :END:
    

    Then enter column view again. (Note, you can also sort by priority --- you'll see the option when you invoke org-sort.)

    Additionally, you can export your column view to a table and then sort the table by column:

    http://orgmode.org/manual/Capturing-column-view.html