4

Would it be possible to list the total number of entries in a global todo agenda view? I would like to have a quick way to estimate progress daily.

So instead of:

Global list of TODO items of type: NEXT
  life:       NEXT Configure global todo lists   :emacs:

I would like to see something like:

Global list of TODO items of type: NEXT (1 remaining)
  life:       NEXT Configure global todo lists   :emacs:

Is this possible? I know I could use statistics cookies in my life file, but I would prefer to have an overview of TODOs in my agenda view (I use 3 such lists after my Daily Agenda view).

  • I use the line number to calc the total number of TODO list now, just the last line number minus 3 (or 2 if you have less TODO keywords)... – zhouji Dec 26 '17 at 17:31
  • @zhouji I used to do this also, but I have three such lists in one agenda view and this became too tedious or I'm just too lazy and I stopped. – kajman Dec 26 '17 at 20:21
0

You can do this with org-agenda-finalize-hook:

(add-hook 'org-agenda-finalize-hook
            (lambda ()
              (save-excursion
                (goto-char (point-min))
                (when (re-search-forward
                       "Global list of TODO items of type: [[:upper:]]*" nil t)
                  (insert (propertize
                           (format " (%s remaining)"
                                   (- (count-lines (point-min) (point-max)) 2))
                           'face 'org-agenda-property-face))))))
  • Thanks, I'll get back to you after I have time to test it. – kajman Mar 25 at 9:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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