[O] Question about org-agenda-goto-today (bug?)

2013-04-26 Thread Robert Goldman
I am finding that when I use this command (bound to . in the org
agenda), I often do NOT go to today.

Looking at the code, it seems like org-mode may be guessing today based
on text markup:

(let ((tdpos (text-property-any (point-min) (point-max) 'org-today t)))

We jump to this position, instead of checking the clock, if we can find it.

If it helps, I often leave emacs running for days at a time, which I
suspect could be confusing it about what today is.  E.g., this just
happened to me when I tried to update my org-agenda after having been
away from it overnight.

Perhaps it would be an improvement to look at what we find at TDPOS and
check to verify that it corresponds somehow to org-today?




Re: [O] Question about org-agenda-goto-today (bug?)

2013-04-26 Thread Bastien
Hi Robert,

Robert Goldman rpgold...@sift.info writes:

 I am finding that when I use this command (bound to . in the org
 agenda), I often do NOT go to today.

 Looking at the code, it seems like org-mode may be guessing today based
 on text markup:

 (let ((tdpos (text-property-any (point-min) (point-max) 'org-today t)))

 We jump to this position, instead of checking the clock, if we can find it.

 If it helps, I often leave emacs running for days at a time, which I
 suspect could be confusing it about what today is.  

Indeed.

I suggest to simply refresh the agenda before jumping to today's date.

 Perhaps it would be an improvement to look at what we find at TDPOS and
 check to verify that it corresponds somehow to org-today?

We could do that, but it would solve only half of the problem, as you
would still need to jump to today's date... and this date is set when
the agenda is generated.

-- 
 Bastien