emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] after-todo-statistics hook for checkboxes


From: Nicolas Goaziou
Subject: Re: [O] after-todo-statistics hook for checkboxes
Date: Sat, 18 Oct 2014 09:31:55 +0200

James Harkins <address@hidden> writes:

> So let me update my issue report/feature request:
>
> -- If there is a hook to do something after updating todo statistics,
> then it would make sense to have a hook for updating checkbox
> statistics as well. That hook should be called with the same arguments
> (n-done n-not-done) so that the user could use one function for both,
> if desired.
>
> I can do this pretty easily and update the documentation. I don't have
> FSF papers signed, but I'm willing to get that ball rolling as well.
>
> But before spending any time on that, I want to ask if this is okay.
> I understand the objection against pressing
> org-after-todo-statistics-hook into service for checkboxes. If there's
> an objection against simply *having* a hook for checkboxes, I'm afraid
> I don't understand that.

I have no objection to this.

Note that this hook can be tricky to use because checkboxes are local to
the list. So adding a global effect to it (e.g., switching TODO state)
will sometimes fail. In the following example

  * Headline
  - [X] list1:item 1
  - [ ] list1:item 2

  Paragraph

  - [ ] list2:item 1
  - [ ] list2:item 2

checking "list1:item 2" will trigger the hook with (2 2) as arguments,
which may be surprising. I suggest to add a word of warning in the
documentation.

Thanks for working on it.


Regards,

-- 
Nicolas Goaziou



reply via email to

[Prev in Thread] Current Thread [Next in Thread]