Allow changing task state in agenda without moving point. I use this when reviewing projects weekly and I need to change the state of some of the tasks. I found jumping to the top of the agenda after each state change especially annoying when it causes the agenda to scroll. --- lisp/org-agenda.el | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 2d1bafe..d7632b4 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -8907,9 +8907,10 @@ If FORCE-TAGS is non nil, the car of it returns the new tags." (org-agenda-highlight-todo 'line) (beginning-of-line 1)) (t (error "Line update did not work"))) - (save-restriction - (narrow-to-region (point-at-bol) (point-at-eol)) - (org-agenda-finalize))) + (save-window-excursion + (save-restriction + (narrow-to-region (point-at-bol) (point-at-eol)) + (org-agenda-finalize)))) (beginning-of-line 0))))) (defun org-agenda-align-tags (&optional line) -- 1.7.9.48.g85da4d