Thanks
Livin Stephen Sharma
On May 17, 2010, at 15:16:40 , Carsten Dominik wrote:
> Hi,
>
>
> On May 17, 2010, at 11:40 AM, Livin Stephen Sharma wrote:
>
>> Hi again,
>> This is regarding a TODO which has:
>> a. nested-checkboxes AND
>> b. a statistics-cookie.
>>
>> Need help to achieve this:
>> The TODO should auto-update/-change to 'DONE' when the stats-cookie hits
>> '100%'.
>
> I think you should be able to build this using org-checkbox-statistics-hook.
> Nothing like this is built-in.
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Æ
Çu\203...@È\202^t^@É!*\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 ).
>
> - Carsten
>
>>
>> --lss
>>
>>
>> On May 15, 2010, at 23:44:21 , Livin Stephen Sharma wrote:
>>
>>> This is a tree from a hypothetical minimal org-file:
>>>> **** TODO meet people [100%]
>>>> - [X] John
>>>> - [X] Jane
>>>
>>>
>>>
>>>
>>> How can I achieve this:
>>> TODO-state should automatically change to DONE when I have checked-off both
>>> 'John' and 'Jane' ?
>>>
>>> 1. The manual showed me how to do this if John and Jane are also TODOs:
>>> using org-after-todo-statistics-hook.
>>> I just can't find the check-box equivalent.
>>>
>>> 2. Google turned up 'org-enforce-todo-checkbox-dependencies' - but that is
>>> only half of what I'm looking for.
>>>
>>>
>>> If this feature does not already exist, I'd like to suggest this as a
>>> useful enhancement.
>>>
>>>
>>> Livin Stephen Sharma
>>>
>>>
>>>
>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Please use `Reply All' to send replies to the list.
>> [email protected]
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
> - Carsten
>
>
>
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-orgmode