|
From: | Livin Stephen Sharma |
Subject: | Re: [Orgmode] Re: TODO's dependency on nested-Checkboxes -- 'org-enforce-todo-checkbox-dependencies' |
Date: | Mon, 17 May 2010 16:11:41 +0530 |
Thanks Livin Stephen Sharma On May 17, 2010, at 15:16:40 , Carsten Dominik wrote: Hi, Thanks for the info, Carsten. Too bad the code doesn't already exist.. and I don't know *any* lisp! Still, I'm trying to give this a shot... Could you let me know: 1. Where/how are n-done and n-not-done defined/set? I'm trying to see if I can reuse the example from the documentation. 2. are 'c-on' and 'c-off' the checkbox-equivalents for the n-(not)-done variables? Where/how are *these* set? FWIW, this attempt did not work for me (this would leave the cursor at the TODO): (defun org-summary-todo-checkbox (c-on c-off) "Switch entry to DONE when all subentry-checkboxes are done, to TODO otherwise." (outline-previous-visible-heading 1) (let (org-log-done org-log-states) ; turn off logging (org-todo (if (= c-off 0) "DONE" "TODO")))) (add-hook 'org-checkbox-statistics-hook 'org-summary-todo-checkbox) I get this error: run-hooks: Wrong number of arguments: #[(c-on c-off) "ÃÄ!\210Å\211^X^YÆ address@hidden@É!*\207" [org-log-states org-log-done c-off outline-previous-visible-heading 1 nil org-todo 0 "DONE" "TODO"] 3 ("/Users/livin/.emacs.d/addons/org/org_stuff.elc" . 6903)], 0 Could you suggest a change in the above lisp, or point out what I'm doing wrong? You can do it relatively easily when you are using subtasks instead of checkboxes, there are examples for this in the documentation. Yes, I recently started using this feature (picked it up from the documentation) to achieve this for subtask-TODOs ).
|
[Prev in Thread] | Current Thread | [Next in Thread] |