emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* TODO's dependency on nested-Checkboxes -- 'org-enforce-todo-checkbox-dependencies'
@ 2010-05-15 18:14 Livin Stephen Sharma
  2010-05-17  9:40 ` Livin Stephen Sharma
  0 siblings, 1 reply; 4+ messages in thread
From: Livin Stephen Sharma @ 2010-05-15 18:14 UTC (permalink / raw)
  To: emacs-org-mode-help gnu


[-- Attachment #1.1: Type: text/plain, Size: 647 bytes --]

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




[-- Attachment #1.2: Type: text/html, Size: 1558 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: TODO's dependency on nested-Checkboxes -- 'org-enforce-todo-checkbox-dependencies'
  2010-05-15 18:14 TODO's dependency on nested-Checkboxes -- 'org-enforce-todo-checkbox-dependencies' Livin Stephen Sharma
@ 2010-05-17  9:40 ` Livin Stephen Sharma
  2010-05-17  9:46   ` Carsten Dominik
  0 siblings, 1 reply; 4+ messages in thread
From: Livin Stephen Sharma @ 2010-05-17  9:40 UTC (permalink / raw)
  To: emacs-org-mode-help gnu


[-- Attachment #1.1: Type: text/plain, Size: 981 bytes --]

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%'.

--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
> 
> 
> 


[-- Attachment #1.2: Type: text/html, Size: 2074 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Re: TODO's dependency on nested-Checkboxes -- 'org-enforce-todo-checkbox-dependencies'
  2010-05-17  9:40 ` Livin Stephen Sharma
@ 2010-05-17  9:46   ` Carsten Dominik
  2010-05-17 10:41     ` Livin Stephen Sharma
  0 siblings, 1 reply; 4+ messages in thread
From: Carsten Dominik @ 2010-05-17  9:46 UTC (permalink / raw)
  To: Livin Stephen Sharma; +Cc: emacs-org-mode-help gnu

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.  You can do it relatively easily  
when you are using subtasks instead of checkboxes, there are examples  
for this in the documentation.

- 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.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

- Carsten

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Re: TODO's dependency on nested-Checkboxes -- 'org-enforce-todo-checkbox-dependencies'
  2010-05-17  9:46   ` Carsten Dominik
@ 2010-05-17 10:41     ` Livin Stephen Sharma
  0 siblings, 0 replies; 4+ messages in thread
From: Livin Stephen Sharma @ 2010-05-17 10:41 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-org-mode-help gnu


[-- Attachment #1.1: Type: text/plain, Size: 3105 bytes --]


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^S^@È\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.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
> 
> - Carsten
> 
> 
> 


[-- Attachment #1.2: Type: text/html, Size: 7081 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-05-17 10:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-15 18:14 TODO's dependency on nested-Checkboxes -- 'org-enforce-todo-checkbox-dependencies' Livin Stephen Sharma
2010-05-17  9:40 ` Livin Stephen Sharma
2010-05-17  9:46   ` Carsten Dominik
2010-05-17 10:41     ` Livin Stephen Sharma

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).