This has been fixed as of Org version 8.2.6
.
It was changed in this commit:
6ba3b2 2014-03-18 19:54:02
org-agenda.el (org-agenda-todo): Restore the window correctly
* org-agenda.el (org-agenda-todo): Always restore the window
state after `org-agenda-change-all-lines' has been called.
`org-agenda-change-all-lines' is narrowing to the line it needs to
update. In the narrowed state, `org-agenda-finalize' is called,
which may lead to a change in the way the window is displayed. We
use `save-window-excursion' to ensure the window state is restored
correctly.
Thanks to Francesco Pizzolante for reporting this with a
detailed recipe.
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 54529d4..e20a55e 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -8792,7 +8792,7 @@ the same tree node, and the headline of ...
(org-back-to-heading)
(move-marker org-last-heading-marker (point))))
(beginning-of-line 1)
- (save-excursion
+ (save-window-excursion
(org-agenda-change-all-lines newhead hdmarker 'fixface just-one))
(when (org-bound-and-true-p org-clock-out-when-done)
(string-match (concat "^" (regexp-opt org-done-keywords-for-agenda))
If you don't want to update, simply apply the patch above. It's only one line.
/tmp/x.org
, add a TODO scheduled for today. Startorg-agenda
and add/tmp/x.org
toorg-agenda-files
withC-c [
. Then refresh the agenda withg
to see the TODO. Change its state witht
and you'll see the buffer reposition. I did this with a minimal.emacs.d/init.el
and still see the same behavior.