diff options
author | Bastien Guerry <bzg@altern.org> | 2014-03-18 20:54:02 +0100 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2014-03-18 20:54:02 +0100 |
commit | 6ba3b2d03d277f6e8b67f9ca5ef6de19476bfc09 (patch) | |
tree | 5f32cae695205a039b4406851c01f80e82ee9f6a | |
parent | c16e09e158367fdf7191f80c5b6a2d788ed099eb (diff) | |
download | org-mode-6ba3b2d03d277f6e8b67f9ca5ef6de19476bfc09.tar.gz |
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.
-rw-r--r-- | lisp/org-agenda.el | 2 |
1 files changed, 1 insertions, 1 deletions
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 the tree node in the Org-mode file." (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)) |