025-org-mode-setup.el 695 B

1234567891011121314151617181920212223
  1. ; org-mode
  2. (require 'org)
  3. (add-hook 'org-mode-hook
  4. (lambda ()
  5. (define-key org-mode-map [(meta left)] nil)
  6. (define-key org-mode-map [(meta right)] nil)
  7. (define-key org-mode-map [(meta down)] nil)
  8. (define-key org-mode-map [(meta up)] nil))
  9. 'append)
  10. (defun myorg-update-parent-cookie ()
  11. (when (equal major-mode 'org-mode)
  12. (save-excursion
  13. (ignore-errors
  14. (org-back-to-heading)
  15. (org-update-parent-todo-statistics)))))
  16. (defadvice org-kill-line (after fix-cookies activate)
  17. (myorg-update-parent-cookie))
  18. (defadvice kill-whole-line (after fix-cookies activate)
  19. (myorg-update-parent-cookie))