[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Orgmode] [PATCH] Re: Bug: habit: better error handling required [TAG=7.
Noorul Islam K M
[Orgmode] [PATCH] Re: Bug: habit: better error handling required [TAG=7.01g]
Wed, 25 Aug 2010 14:42:27 +0530
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)
paulusm <address@hidden> writes:
> Hi org-mode people,
> Whilst playing with the "shaving" example from
> http://orgmode.org/manual/Tracking-your-habits.html I accidentally put a
> bad character in the SCHEDULED timestamp.
> Instead of: "SCHEDULED: <2010-08-26 Thu .+2d/4d>"
> I had: "SCHEDULED: <2010-08-26 Thu .+2nd/4d>"
> When trying to view my agenda, I was presented with a blank agenda and Emacs
> very quietly reported:
> "org-habit-duration-to-days: Wrong type argument: stringp, nil"
> which is not really helpful.
> Removing the bad character fixes the issue, and I can duplicate the error
> condition as described above.
> Perhaps some better error trapping could be done?
Attached is the patch which catch this error and throws meaningful
lisp/org-habit.el : (org-habit-parse-todo)
- Find sr-days only if scheduled-repeat is non nil
- Used 4th element of the list returned by (org-heading-components)
- Modified the error message to be more meaningful.
Thanks and Regards
Description: Text document