Using org mode agenda I've been able to customize a view to have all tasks no matter if finished or not this way:

 (setq org-agenda-custom-commands
      '(("w" "Whole Agenda no matter status"

I need a step more: group by month showing a header, but I'm stuck. I don´t know how to group tasks by month in my custom view (preferably month of DONE date if exists, if not, then date of insertion).

something like this:

Project A:DONE task1  2019-01-01
Project A:CANCELLED task2  2019-01-02
Project B:DONE task3 2019-01-03
Project A:TODO task4 2019-02-01
Project B:TODO task5 2019-02-04

Thanks in advance


Using org-super-agenda https://github.com/alphapapa/org-super-agenda
It groups agenda view lines in many possible ways.

When installed, a hook and interactive function (M-x eval-buffer in scratch, or saved in .emacs):

(add-hook 'org-agenda-mode-hook #'org-super-agenda-mode)

(defun my-monthly-agenda ()
  (let ((org-agenda-custom-commands
         '(("w" "Whole Agenda no matter status"
            ((todo "TODO|IN-PROGRESS|DONE|CANCELLED")))))

            (lambda (item)
              (let ((ts (assoc "TIMESTAMP" (org-entry-properties))))
                (if ts
                    (let* ((date-parts (org-parse-time-string (cdr ts)))
                           (month (nth 4 date-parts)) (year (nth 5 date-parts)))
                      (format-time-string "%B %Y" (encode-time 1 1 1 1 month year)))
                  ;; else
                  "W/o timestamp")))))))
    (org-agenda nil "w")))

M-x my-monthly-agenda


Global list of TODO items of type: TODO|IN-PROGRESS|DONE|CANCELLED

 January 2019
  test:       TODO Prepare slides               :work:boss:notes::action:

 November 2006
  test:       TODO Write letter to Sam Fortune

 W/o timestamp
  test:       DONE Head A
  test:       TODO Prepare slides 2             :work:boss:notes::action:
  • but an issue arised. Order is not monthly order but alphabeticall, i mean, groups are W/o timestamp,, december 2006, January 2006,november 2006 – Forge Jan 17 at 11:24

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.