Hi, I've been thinking about how to integrate tasks which are to some extent tracked elsewhere into my org-mode workflow, such as for example "read N chapter of book A" or "watch K video lectures at X". I'd like a way to describe in org-mode that a task should be completed a number of times, and then have org-mode let the task recur a number of times, possibly with a cool-down period (but that's not really necessary). The normal progress cookies % and / would preferrably be used to indicate progress in the TODO headings themselves. 1. Has something like this been attempted by anyone else before? 2. Which org-mode hooks would be a good place to start integrating something that would both potentially block TODO transitions and have to read/write properties and/or special drawers in org-mode? At first, I thought that the problem could be trivially solved with the org-blocker-hook, but I realised that it said it shouldn't update the org buffers, and my function needs to in order to update the state for blocked tasks (e.g. increment the counter). Thanks in advance! Albin
Am Mon, 5 May 2014 15:52:26 +0200 schrieb Albin Stjerna <albin.stjerna@gmail.com>: > Hi, > > I've been thinking about how to integrate tasks which are to some > extent tracked elsewhere into my org-mode workflow, such as for > example "read N chapter of book A" or "watch K video lectures at X". > > I'd like a way to describe in org-mode that a task should be completed > a number of times, and then have org-mode let the task recur a number > of times, possibly with a cool-down period (but that's not really > necessary). The normal progress cookies % and / would preferrably be > used to indicate progress in the TODO headings themselves. > Not sure if I understand correctly, but did you look into org-habits? Sounds similar. http://orgmode.org/manual/Tracking-your-habits.html Detlef > 1. Has something like this been attempted by anyone else before? > 2. Which org-mode hooks would be a good place to start integrating > something that would both potentially block TODO transitions and have > to read/write properties and/or special drawers in org-mode? At first, > I thought that the problem could be trivially solved with the > org-blocker-hook, but I realised that it said it shouldn't update the > org buffers, and my function needs to in order to update the state for > blocked tasks (e.g. increment the counter). > > Thanks in advance! > Albin > >
Hi Albin, Albin Stjerna <albin.stjerna@gmail.com> writes: > 1. Has something like this been attempted by anyone else before? No -- but there are regular feature requests around making repeaters more flexible. I hope I can enhance this for 8.4 (or 9.0.) > 2. Which org-mode hooks would be a good place to start integrating > something that would both potentially block TODO transitions and have > to read/write properties and/or special drawers in org-mode? You can cook something from `org-after-todo-state-change-hook'. Put the repeat value in a property, decrease it each time a task is done until the repeater value is 0. Displaying the repeater value can be done in column mode. That's for the first part of this feature -- the one with blocking TODOs, see `org-blocker-hook' and `org-trigger-hook'. Not sure it will help though. See also the manual on adding properties (i.e. `org-entry-put') and hacking Org in general. HTH, -- Bastien
Thanks! I'll look into that. :)
On 23 May 2014 07:52, Bastien <bzg@gnu.org> wrote:
> Hi Albin,
>
> Albin Stjerna <albin.stjerna@gmail.com> writes:
>
>> 1. Has something like this been attempted by anyone else before?
>
> No -- but there are regular feature requests around making repeaters
> more flexible. I hope I can enhance this for 8.4 (or 9.0.)
>
>> 2. Which org-mode hooks would be a good place to start integrating
>> something that would both potentially block TODO transitions and have
>> to read/write properties and/or special drawers in org-mode?
>
> You can cook something from `org-after-todo-state-change-hook'.
>
> Put the repeat value in a property, decrease it each time a task is
> done until the repeater value is 0. Displaying the repeater value can
> be done in column mode.
>
> That's for the first part of this feature -- the one with blocking
> TODOs, see `org-blocker-hook' and `org-trigger-hook'. Not sure it
> will help though.
>
> See also the manual on adding properties (i.e. `org-entry-put') and
> hacking Org in general.
>
> HTH,
>
> --
> Bastien