Ihor Radchenko <yanta...@gmail.com> writes: > If you accidentally move the point in the buffer being processed by > agenda, the results may be unpredictable (org-agenda-get-* functions > move across the buffer with re-search-forward).
I'm afraid that's the basic problem with threading in Emacs: shared state. I don't know of a way to work around that. I suppose you could modify a lot of the agenda code to, e.g. store the position of the current search in a variable and go to it before each search. Of course, that would also reduce performance to some extent. It's a hard problem.