emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Livin Stephen Sharma <livin.stephen@gmail.com>
To: Carsten Dominik <carsten.dominik@gmail.com>
Cc: emacs-org-mode-help gnu <emacs-orgmode@gnu.org>
Subject: Re: Re: TODO's dependency on nested-Checkboxes -- 'org-enforce-todo-checkbox-dependencies'
Date: Mon, 17 May 2010 16:11:41 +0530	[thread overview]
Message-ID: <9F4B3811-5557-48C6-B482-22E71D5BEB3E@gmail.com> (raw)
In-Reply-To: <662DCCDE-CBC7-43C6-B406-233B425A2D11@gmail.com>


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

      reply	other threads:[~2010-05-17 10:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9F4B3811-5557-48C6-B482-22E71D5BEB3E@gmail.com \
    --to=livin.stephen@gmail.com \
    --cc=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).