From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Filippo A. Salustri" Subject: Re: another (possibly) noob question Date: Tue, 15 Mar 2011 17:55:52 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=0016e64c3efaf477f9049e8c7d67 Return-path: Received: from [140.186.70.92] (port=50648 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PzcHH-0008Ph-Tq for emacs-orgmode@gnu.org; Tue, 15 Mar 2011 17:59:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PzcHG-0004Ti-A5 for emacs-orgmode@gnu.org; Tue, 15 Mar 2011 17:59:43 -0400 Received: from mail-ww0-f49.google.com ([74.125.82.49]:60193) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PzcHF-0004TR-Tt for emacs-orgmode@gnu.org; Tue, 15 Mar 2011 17:59:42 -0400 Received: by wwc33 with SMTP id 33so1155068wwc.30 for ; Tue, 15 Mar 2011 14:59:41 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --0016e64c3efaf477f9049e8c7d67 Content-Type: text/plain; charset=ISO-8859-1 Yep; I'm a noob. David rightly pointed me at org-after-todo-statistics-hook, which I'd set up to do as he does. The code for that was so far away in my .emacs file from the rest of the TODO stuff that I missed it. I corrected the code (it still does that, except it ignores PROJECT keywords), and all seems right with the world again. Thanks for the help and the patience. Cheers. Fil On 15 March 2011 14:10, David Ellis wrote: > Do you have a line similar to the following in your .emacs file? > > (add-hook 'org-after-todo-statistics-hook 'org-summary-todo) > > If so, what is the contents of the function that in the above line is > called org-summary-todo. > > I have this implemented in my setup to automatically change the todo > state based on progress. > > Dave > > On Mon, Mar 14, 2011 at 11:15 PM, Filippo A. Salustri > wrote: > > So, > > I've set org-provide-todo-statistics to t > > and org-hierarchical-todo-statistics to nil. > > I use a TODO sequence to identify projects. That is, > > (setq org-todo-keywords > > '((sequence "REVIEW(r)" "TODO(t)" "ACTIVE(a!)" "WAIT(w@)" > "SOMEDAY(s)" > > "|" > > "DONE(d)" "CANCELED(c@)") > > (sequence "OPEN(O@!)" "WIP(W!)" "PAUSED(P@!)" "|" "CLOSED(C@!)") > > (sequence "PROJECT(p)" "|" "COMPLETED(x)") > > )) > > I then set level 1 headlines to be PROJECT and put [/] at the end of the > > headline. > > The hope is to see projects at a glance and get the fraction done too. > > All is as it should be, but for one thing. > > When I toggle or insert within a subtree, the headline for that project > > changes from PROJECT to ACTIVE if less than all tasks are done, and DONE > if > > all tasks are done. > > Obviously, I want it to stay PROJECT. > > I've spent over an hour trying to figure this one out and I can't. > > Anyone got any advice? > > Cheers. > > Fil > > > > -- > > Filippo A. Salustri, Ph.D., P.Eng. > > Mechanical and Industrial Engineering > > Ryerson University > > 350 Victoria St, Toronto, ON > > M5B 2K3, Canada > > Tel: 416/979-5000 ext 7749 > > Fax: 416/979-5265 > > Email: salustri@ryerson.ca > > http://deseng.ryerson.ca/~fil/ > > > -- Filippo A. Salustri, Ph.D., P.Eng. Mechanical and Industrial Engineering Ryerson University 350 Victoria St, Toronto, ON M5B 2K3, Canada Tel: 416/979-5000 ext 7749 Fax: 416/979-5265 Email: salustri@ryerson.ca http://deseng.ryerson.ca/~fil/ --0016e64c3efaf477f9049e8c7d67 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Yep; I'm a noob.
David rightly pointed me at=A0org-after-todo-statistics-hook, which I'd set up to do as he does.<= /div>
The code for that was so far away in my .emacs file from the rest= of the TODO stuff that I missed it.
I corrected the code (it still does that, except it ignores PROJECT ke= ywords), and all seems right with the world again.

Thanks for the help and the patience.
Cheers.
Fil

On 15 March 2011 14:10, David Ellis <ddellis914@gmail.com<= /a>> wrote:
Do you have a line similar to the following in your .emacs file?

(add-hook 'org-after-todo-statistics-hook 'org-summary-todo)

If so, what is the contents of the function that in the above line is
called org-summary-todo.

I have this implemented in my setup to automatically change the todo
state based on progress.

Dave
> So,
> I've set=A0org-provide-todo-statistics to t
> and=A0org-hierarchical-todo-statistics to nil.
> I use a TODO sequence to identify projects. =A0That is,
> (setq org-todo-keywords
> =A0=A0 =A0 =A0'((sequence "REVIEW(r)" "TODO(t)"= ; "ACTIVE(a!)" "WAIT(w@)" "SOMEDAY(s)"
> =A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"|"
> =A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"DONE(d)" "CANCEL= ED(c@)")
> =A0=A0 =A0 =A0 =A0(sequence "OPEN(O@!)" "WIP(W!)" = "PAUSED(P@!)" "|" "CLOSED(C@!)")
> =A0=A0 =A0 =A0 =A0(sequence "PROJECT(p)" "|" "= ;COMPLETED(x)")
> =A0=A0 =A0 =A0 =A0))
> I then set level 1 headlines to be PROJECT and put [/] at the end of t= he
> headline.
> The hope is to see projects at a glance and get the fraction done too.=
> All is as it should be, but for one thing.
> When I toggle or insert within a subtree, the headline for that projec= t
> changes from PROJECT to ACTIVE if less than all tasks are done, and DO= NE if
> all tasks are done.
> Obviously, I want it to stay PROJECT.
> I've spent over an hour trying to figure this one out and I can= 9;t.
> Anyone got any advice?
> Cheers.
> Fil
>
> --
> Filippo A. Salustri, Ph.D., P.Eng.
> Mechanical and Industrial Engineering
> Ryerson University
> 350 Victoria St, Toronto, ON
> M5B 2K3, Canada
> Tel: 416/979-5000 ext 7749
> Fax: 416/979-5265
> Email: salustri@ryerson.ca<= br> > http://de= seng.ryerson.ca/~fil/
>



--
Filippo A. = Salustri, Ph.D., P.Eng.
Mechanical and Industrial Engineering
Ryerson= University
350 Victoria St, Toronto, ON
M5B 2K3, Canada
Tel: 416/= 979-5000 ext 7749
Fax: 416/979-5265
Email: salustri= @ryerson.ca
http://deseng= .ryerson.ca/~fil/
--0016e64c3efaf477f9049e8c7d67--