From e395b3fbce9a78799c139078e6c55d38ccae93b8 Mon Sep 17 00:00:00 2001 From: John Sullivan Date: Wed, 18 Feb 2009 10:57:21 -0500 Subject: [PATCH] Fix #11948. Narrow to tasks section when carrying tasks forward. --- ChangeLog | 7 +++++++ planner.el | 6 ++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1b41813..5183ad1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-02-18 John Sullivan + + * planner.el (plan): When carrying tasks forward, narrow to the + tasks section first instead of looking at the whole page. Closes + #11948. This should also improve performance a good deal for + everyone using `planner-carry-tasks-forward'. + 2009-02-17 John Sullivan * planner-multi.el (planner-multi-read-name): I don't think the diff --git a/planner.el b/planner.el index 259f70f..94a73ce 100644 --- a/planner.el +++ b/planner.el @@ -3274,8 +3274,10 @@ instead, except t means scan only yesterday." ;; Attempt to copy all the tasks (when (not (equal today (planner-page-name))) (let ((planner-tasks-file-behavior nil)) - (planner-copy-or-move-region (point-min) (point-max) - (planner-today) t)) + (save-restriction + (planner-narrow-to-section 'tasks) + (planner-copy-or-move-region (point-min) (point-max) + (planner-today) t))) (unless (buffer-modified-p) (kill-buffer (current-buffer)))) (setq names (cdr names)))) -- 2.11.4.GIT