emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Filter for recursive counting (org-hierarchical-todo-statistics)
@ 2013-11-28 13:21 Fletcher Charest
  2014-01-04 14:32 ` Bastien
  0 siblings, 1 reply; 5+ messages in thread
From: Fletcher Charest @ 2013-11-28 13:21 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 691 bytes --]

Dear community,

My org-hierarchical-todo-statistics variable is set to nil in order to
obtain a recursive count of my TODO items in subtrees. However, I would
like to know if it is possible to filter this count to include only some
TODO keywords. A real-life example :

I use the TODO/DONE keywords for actions on which I can act directly, and
the TOCOMPLETE/COMPLETED keywords for actions that will be instantly done
when all their children are done (no "direct action" required). What I
would like in that case is having a recursive count only for the TODO/DONE
keywords, by not taking into account the TOCOMPLETE/COMPLETED keywords in
the cookie.

Thank you very much for your help,

FC

[-- Attachment #2: Type: text/html, Size: 817 bytes --]

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

* Re: Filter for recursive counting (org-hierarchical-todo-statistics)
  2013-11-28 13:21 Filter for recursive counting (org-hierarchical-todo-statistics) Fletcher Charest
@ 2014-01-04 14:32 ` Bastien
  2014-01-10 22:29   ` Fletcher Charest
  0 siblings, 1 reply; 5+ messages in thread
From: Bastien @ 2014-01-04 14:32 UTC (permalink / raw)
  To: Fletcher Charest; +Cc: emacs-orgmode

Hi Fletcher,

Fletcher Charest <fletcher.charest@gmail.com> writes:

> My org-hierarchical-todo-statistics variable is set to nil in order
> to obtain a recursive count of my TODO items in subtrees. However, I
> would like to know if it is possible to filter this count to include
> only some TODO keywords.

You may want to customize `org-provide-todo-statistics' and set it to
a list of TODO keywords for which you want statistics.

HTH,

-- 
 Bastien

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

* Re: Filter for recursive counting (org-hierarchical-todo-statistics)
  2014-01-04 14:32 ` Bastien
@ 2014-01-10 22:29   ` Fletcher Charest
  2014-01-14 16:13     ` Fletcher Charest
  0 siblings, 1 reply; 5+ messages in thread
From: Fletcher Charest @ 2014-01-10 22:29 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 620 bytes --]

Dear Bastien,

Thank you very much! It works perfectly.

Best regards,

FC

On Sat, Jan 4, 2014 at 3:32 PM, Bastien <bzg@gnu.org> wrote:

> Hi Fletcher,
>
> Fletcher Charest <fletcher.charest@gmail.com> writes:
>
> > My org-hierarchical-todo-statistics variable is set to nil in order
> > to obtain a recursive count of my TODO items in subtrees. However, I
> > would like to know if it is possible to filter this count to include
> > only some TODO keywords.
>
> You may want to customize `org-provide-todo-statistics' and set it to
> a list of TODO keywords for which you want statistics.
>
> HTH,
>
> --
>  Bastien
>

[-- Attachment #2: Type: text/html, Size: 1148 bytes --]

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

* Re: Filter for recursive counting (org-hierarchical-todo-statistics)
  2014-01-10 22:29   ` Fletcher Charest
@ 2014-01-14 16:13     ` Fletcher Charest
  2014-01-20 15:09       ` Bastien
  0 siblings, 1 reply; 5+ messages in thread
From: Fletcher Charest @ 2014-01-14 16:13 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1704 bytes --]

Hi,

Okay, actually, after using this solution, there is just one thing I think
that could be considered a bug (not very problematic though). Consider the
following subtree:

* TOCOMPLETE Project A [0/3]
** TOCOMPLETE Subproject[0/2]
*** TODO Task 1
*** TODO Task 2
** TODO Task

I excluded the keyword TOCOMPLETE from 'org-provide-todo-statistics' so it
won't appear in the statistics. This is why I get [0/3] at the top of the
subtree. But if I mark the 2 tasks in the subproject as DONE, then I also
want to mark the subproject itself as DONE (using a special keyword, like
COMPLETED). However, marking it as COMPLETED will include it again in the
statistics: instead of getting [2/3], I will get [3/4].

Is there any way to explicitly include the DONE keyword in
org-provide-todo-statistics (and consequently, implicitly exclude other
DONE keywords)? I tried to include DONE but it doesn't work.

Thank you very much and sorry for the nitpicking ;)

FC


On Fri, Jan 10, 2014 at 11:29 PM, Fletcher Charest <
fletcher.charest@gmail.com> wrote:

> Dear Bastien,
>
> Thank you very much! It works perfectly.
>
> Best regards,
>
> FC
>
>
> On Sat, Jan 4, 2014 at 3:32 PM, Bastien <bzg@gnu.org> wrote:
>
>> Hi Fletcher,
>>
>> Fletcher Charest <fletcher.charest@gmail.com> writes:
>>
>> > My org-hierarchical-todo-statistics variable is set to nil in order
>> > to obtain a recursive count of my TODO items in subtrees. However, I
>> > would like to know if it is possible to filter this count to include
>> > only some TODO keywords.
>>
>> You may want to customize `org-provide-todo-statistics' and set it to
>> a list of TODO keywords for which you want statistics.
>>
>> HTH,
>>
>> --
>>  Bastien
>>
>

[-- Attachment #2: Type: text/html, Size: 2712 bytes --]

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

* Re: Filter for recursive counting (org-hierarchical-todo-statistics)
  2014-01-14 16:13     ` Fletcher Charest
@ 2014-01-20 15:09       ` Bastien
  0 siblings, 0 replies; 5+ messages in thread
From: Bastien @ 2014-01-20 15:09 UTC (permalink / raw)
  To: Fletcher Charest; +Cc: emacs-orgmode

Hi Fletcher,

Fletcher Charest <fletcher.charest@gmail.com> writes:

> Okay, actually, after using this solution, there is just one thing I
> think that could be considered a bug (not very problematic though).

I just pushed a fix for this in master.

(The reason I'm pushing it to master instead of maint is that the
maint branch will go into Emacs 24.4 soon, and we try to fix only
obvious or important bugs there -- this one was more a limitation
than a bug.)

You can set

  (setq org-provide-todo-statistics '(("TODO") ("DONE")))

and stats will be updated based on those two keywords only.

Let me know if this works for you,

-- 
 Bastien

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

end of thread, other threads:[~2014-01-20 15:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-28 13:21 Filter for recursive counting (org-hierarchical-todo-statistics) Fletcher Charest
2014-01-04 14:32 ` Bastien
2014-01-10 22:29   ` Fletcher Charest
2014-01-14 16:13     ` Fletcher Charest
2014-01-20 15:09       ` Bastien

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