"David Smith" <[EMAIL PROTECTED]> writes:

> Hi Jim, thanks for taking a look.
>
> Jim Ottaway <[EMAIL PROTECTED]> writes:
>
>>
>>> 2006-11-03 14:47:00 GMT     David D. Smith <[EMAIL PROTECTED]>      patch-3
>>> 
>>>     Summary:
>>>       Don't use planner-goto-today in update-section because that's 
>>> -maybe's job
>>>     Revision:
>>>       planner--dds--1.0--patch-3
>>> 
>>> 
>>>     modified files:
>>>      planner-appt.el
>>
>> I'm not sure about this one: one might want to update the appointments
>> section while visiting a page that is not today's plan page. Does
>> having planner-goto-today in planner-appt-forthcoming-update-section
>> cause some bug?
>
> You mean update the appointments schedule on a page that is not
> today's page? 

I don't think I mean that. What I mean is that
planner-appt-forthcoming-update-section may be called when one is not
currently visiting today's page, but that it updates the forthcoming
appointments section on today's page. The idea is to provide a means of
updating if one adds an appointment that is within the range of forthcoming
appointments. 

> If that's the case then exactly my point, you
> shouldn't use planner-goto-today inside of update-section
> because in that situation the user is calling update-section
> directly. The point of -maybe is to be a hook that runs on
> planner mode, this it should be the one checking if the current
> page is the current day or not, that's the main thing.

> And yes, it does trigger a publishing bug, it's the same cause
> as the with-planner block in patch-2; loading a
> half-muse-edited page and then running the hook and then
> loading a new page and recursing until emacs pops.

I have looked and experimented, but I seem to have a blind spot for this
bug unless you mean using planner-appt-forthcoming-update-section within
a hook rather than planner-appt-forthcoming-update-section-maybe. Is
that what you mean?

If not, could you give an example which would reproduce the bug?

Actually, I can see that planner-appt-forthcoming-update-section is
vulnerable to recursion if it itself is used as a hook. This could
easily be protected against with a flag variable.

Regards,

-- 
Jim Ottaway

_______________________________________________
Planner-el-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/planner-el-discuss

Reply via email to