What the .emacs.d!?

I mainly use org-mode for a collection of TODO-lists.


(defun myorg-update-parent-cookie ()
  (when (equal major-mode 'org-mode)
    (save-excursion
      (ignore-errors
        (org-back-to-heading)
        (org-update-parent-todo-statistics)))))

(defadvice org-kill-line (after fix-cookies activate)
  (myorg-update-parent-cookie))

(defadvice kill-whole-line (after fix-cookies activate)
  (myorg-update-parent-cookie))

So I get a little annoyed when the [17/23] cookies at the parent level aren't updated when I remove an item.

This code fixes that.

blog comments powered by Disqus