confusion with scheduled task display in agenda view

49 views
Skip to first unread message

SKempf

unread,
Jul 9, 2012, 11:30:49 AM7/9/12
to vimorg...@googlegroups.com
I have been trying to setup recurring tasks / reminders and am pretty confused by the results I get in the agenda view. I think it is related to how I am using the program, perhaps the syntax or something, so the focus of my question is how *should* I be doing this.

I have setup an example file, tmp.org with two methods I have tried. One method using a scheduled date with an offset ".+" for the next time and one with a deadline date with a recurring time and a reminder time (+1m -14d). I put notes about each method and why I am trying to do that in the task notes itself. Here is the file:

>>>> BEGIN tmp.org <<<<
* Tasks
** TODO change oil in truck
   :HOME:MEDIUM:
   :SCHEDULED: <2012-07-14 Sat .+6m>
   I need to change the oil soon. I don't know what the real "deadline" is,
   but it needs to be soon. When I *actually* change the oil, I want to be
   reminded again about this in six months. I use this for household tasks, or
   reminders to checkin with a business contact on a regular basis, etc.
** TODO enter expenses into books
   :OFFICE:MEDIUM:
   :DEADLINE: <2012-07-15 Sun +1m -14d>
   As part of bookkeeping tasks, I need to enter expenses every month and this
   needs to be finished no later than the 15 of the month. I would like to be
   prompted about it a few weeks in advance.
>>>> END tmp.org <<<<

When I run the agenda view (,ag) on Monday (e.g. 7/9), I get this:

>>>> BEGIN __Agenda__ <<<<
Week-agenda (W28):
Monday       9 July 2012 Wk28
00000004  tmp          Sched: 25X:    ** TODO change oil in truck
00000011  tmp          In  -24 d.:    ** TODO enter expenses into books
00000011  tmp          In    6 d.:    ** TODO enter expenses into books
Tuesday     10 July 2012
Wednesday   11 July 2012
Thursday    12 July 2012
Friday      13 July 2012
Saturday    14 July 2012
Sunday      15 July 2012
00000011  tmp          Deadline:      ** TODO enter expenses into books
>>>> END __Agenda__ <<<<

It is unexpected to me, to get a "Sched: 25X" related to changing the oil and also to not see it at all for Saturday 14 July 2012. Likewise, the expense reminder works as I would expect, except, it has an extra entry "In -24 d.:", like I am overdue to actually complete this. I would welcome any comments on, how this should be done, syntax errors, a better way to look at reminders / scheduled dates / due dates, etc.

Thanks,
Severin

Herbert Sitz

unread,
Jul 9, 2012, 12:48:59 PM7/9/12
to vimorg...@googlegroups.com
On Mon, Jul 9, 2012 at 8:30 AM, SKempf <severi...@gmail.com> wrote:
> I have been trying to setup recurring tasks / reminders and am pretty
> confused by the results I get in the agenda view. I think it is related to
> how I am using the program, perhaps the syntax or something, so the focus of
> my question is how *should* I be doing this.

At this point I suspect it is an issue of what you're expecting and
how you're using it, rather than any bugs. Since these operations
should work just like Org you can always refer to main newsgroup at
gmane ( ), also you would want to refer to the manual, perhaps
starting here:
http://orgmode.org/manual/Deadlines-and-scheduling.html#Deadlines-and-scheduling

>>>>> BEGIN __Agenda__ <<<<
> Week-agenda (W28):
> Monday 9 July 2012 Wk28
> 00000004 tmp Sched: 25X: ** TODO change oil in truck
> 00000011 tmp In -24 d.: ** TODO enter expenses into books
> 00000011 tmp In 6 d.: ** TODO enter expenses into books
> Tuesday 10 July 2012
> Wednesday 11 July 2012
> Thursday 12 July 2012
> Friday 13 July 2012
> Saturday 14 July 2012
> Sunday 15 July 2012
> 00000011 tmp Deadline: ** TODO enter expenses into books
>>>>> END __Agenda__ <<<<
>
> It is unexpected to me, to get a "Sched: 25X" related to changing the oil
> and also to not see it at all for Saturday 14 July 2012.

The Sched 25X refers to a scheduled TODO item with date 25 days in the
past. Two problems here: (1) 'Scheduled' is not typically used for
deadlines, but merely for when work on a todo should start (
http://orgmode.org/manual/Deadlines-and-scheduling.html#Deadlines-and-scheduling
) and (2) If you're using repeat intervals with TODO items you will
want to close them as DONE (keystroke ,td ) which will automatically
enter a note saying you completed it on current date and change date
of the TODO to next repeat date. This both (1) keeps log of dates you
performed the task and (2) avoids the warning about tasks in the past
(i..e., the SCHED 25X). (Actually, I'm not sure and the auto-reset
when marking as DONE may only occur for Deadlines with repeat specs,
but you should be using DEADLINES anyway so it should work for you.)

> Likewise, the
> expense reminder works as I would expect, except, it has an extra entry "In
> -24 d.:", like I am overdue to actually complete this. I would welcome any
> comments on, how this should be done, syntax errors, a better way to look at
> reminders / scheduled dates / due dates, etc.

Similarly to the Scheduled item, the '-24 d'date refers to actual date
of TODO, a TODO deadline 24 days in past. Toggling the TODO to DONE
will automatically enter log note and reset repeat date into the
future. DEADLINES use -24 designation to denote tasks that were due
in past but are not yet done. Scheduled items use the SCHED 25X
designation for similar idea.

Also, part of your confusion is also coming about because in the
weekly view warnings on not shown for every day. Warnings are shown
only for the current day in week (or month or year) view. If you
switch to a daily view of, e.g., July 14, you should see all warnings
for any date, even dates that aren't today.

Also, there is a standard default warning period (3 days) for
deadlines where warning occurs even without a -x designation in date
spec. I don't have it set up for you to change this in vimrc yet, but
you can find line in ftplugin/org.vim that reads:
let g:org_deadline_warning_days = 3;
and change it to whatever you want. That is best way to go if you
always want deadline warnings of same period that's different from 3
days.

Hope that helps,

Herb

SKempf

unread,
Jul 9, 2012, 3:58:54 PM7/9/12
to vimorg...@googlegroups.com
I think I might have accidently sent my reply only to the author, which was not intended. Just in case it got lost, I'll try to repeat what I said.

When you run an agenda view on the file contents above, obviously on only that buffer, do you get the same view in the Vim __Agenda__ buffer as I do?  I am assuming that you do; if this is the case I don't think it is a configuration problem (but I could always be wrong).

If I run the same file using emacs org-mode, I get what I would expect; specifically,, the emacs agenda buffer looks like this:

>>>> BEGIN "emacs test.org" *Org Agenda* <<<<
Week-agenda (W28):
Monday      9 July 2012 W28
  tmp:        In   6 d.:  TODO enter expenses into books

Tuesday    10 July 2012
Wednesday  11 July 2012
Thursday   12 July 2012
Friday     13 July 2012
Saturday   14 July 2012
  tmp:        Scheduled:  TODO change oil in truck
Sunday     15 July 2012
  tmp:        Deadline:   TODO enter expenses into books
>>>> END "emacs test.org" *Org Agenda* <<<<

There should not be any mention of overdue or past due scheduled items,  because the deadline date is today. So the "Sched: 25X" and the "In -24d" is incorrect. That being said, I only have this problem, if I use "month" or "m" in the date specification. I have tried "d" for day, "w" for week and "y" for year and it actually works like I think it should; e.g. ":DEADLINE: <2012-07-15 Sun +4w -14d>" actually works in VimOrg. For some items I can get by without "month", but there are a few that I don't think I can get around.

In the code, is this information being parsed by your script or is it being passed to Calendar.vim?

Herbert Sitz

unread,
Jul 9, 2012, 7:04:55 PM7/9/12
to vimorg...@googlegroups.com
On Mon, Jul 9, 2012 at 12:58 PM, SKempf <severi...@gmail.com> wrote:
> When you run an agenda view on the file contents above, obviously on only
> that buffer, do you get the same view in the Vim __Agenda__ buffer as I do?
> I am assuming that you do; if this is the case I don't think it is a
> configuration problem (but I could always be wrong).

Sorry, my previous answer was made without reading your question
carefully, just answering what I imagined you would likely be asking.
Yes, I see same behavior as you do.

All of this stuff is handled by org.vim, not calendar.vim. Haven't
looked at this code in a long time, but I believe the problem lies in
the RepeatMatch() function. This function returns a list of dates for
each TODO item that lie within the date range of the current agenda
view. There is a problem with your SCHEDULED and DEADLINE items where
it mistakenly adds a date for period backwards in time from the date
spec, and at least for SCHEDULED items it seems to not be adding the
necessary item for at all for some repeats (e.g., viewing your
test.org for August 14,15).

Thanks for pointing this out. I'll try to look at it and get fix in
next day or two. If I don't notify you by then feel free to remind me
I want to take a look at this.

-- Herb

Herbert Sitz

unread,
Jul 12, 2012, 5:54:58 PM7/12/12
to vimorg...@googlegroups.com
On Mon, Jul 9, 2012 at 4:04 PM, Herbert Sitz <hes...@gmail.com> wrote:
> Thanks for pointing this out. I'll try to look at it and get fix in
> next day or two. If I don't notify you by then feel free to remind me
> I want to take a look at this.

Severin --

I have a fix that you can try. In the function s:RepeatMatch in
ftplugin/org.vim. I that function you will see the lines below. Find
the 'CHANGE HERE>>>' line below to see the change, which is simply
deleting a '-1' from an expression. Please let me know if this seems
to fix all your problems, and not add any others. Thanks again for
bringing this to my attention.

Regards,

Herb

===========================================
if yearflag
if (date1[:6]) >= (date1[:3] . baseclone[4:6])
let baseclone = date1[:3] . baseclone[4:]
else
let baseclone = string(str2nr(date1[:3]) - 1) . baseclone[4:]
endif
let first_of_month_jul = calutil#jul(baseclone[:7]. '01')
else
let first_of_month_jul = calutil#jul(date1[:4] .
CHANGE HERE>>>> \ s:Pre0( date1[5:6] ) . '-01')
ORIGINAL LINE>>>> "\ s:Pre0( date1[5:6] - 1) . '-01')
endif

if g:special ==? '*'
let specialnum = (monthday / 7) + 1
let specialdaynum = calutil#dow(basedate)
endif
=============================================

SKempf

unread,
Jul 13, 2012, 2:28:58 PM7/13/12
to vimorg...@googlegroups.com

So for, this seems to be working as expected. I'm actually trying to use this program every day now; so hopefully it is OK if I keep asking about how to do stuff. I have not patched a vim binary yet for the folded line highlighting, but I may try to do this next.

Bill W.

unread,
Jul 13, 2012, 2:56:56 PM7/13/12
to vimorg...@googlegroups.com
I'm still tinkering with it and haven't patched a binary yet either. (Windows VIM 7.3.46 here if anyone has one)  From my perspective, keep the dialog going. I'm learning a lot and I need the inspiration. Thanks!

-Bill

Herbert Sitz

unread,
Jul 13, 2012, 3:18:52 PM7/13/12
to vimorg...@googlegroups.com
Glad it's working, bug was sort of a variant of the usual 0-based
array index bug.

Feel free to ask any questions you come up with.

I have Windows Vim73 binary if that's what you need, on Linux probably
best to do your own recompile.

Regards,

Herb
Reply all
Reply to author
Forward
0 new messages