I have planner-deadline-update on planner-goto-hook. As
planner-deadline-update unconditionally updates the deadline part of
each task (and saves both the day page and the category page),
planner-goto-today becomes quite slow. This patch avoids updating
when the deadline string has not changed.
Magnus
--- orig/planner-deadline.el
+++ mod/planner-deadline.el
@@ -125,7 +125,8 @@
(with-planner-update-setup
(goto-char (point-min))
(while (re-search-forward planner-deadline-regexp nil t)
- (let* ((deadline (match-string 2))
+ (let* ((deadline-string (match-string 0))
+ (deadline (match-string 2))
(task-info (save-match-data (planner-current-task-info)))
(status (planner-task-status task-info))
(end (match-end 0))
@@ -137,7 +138,7 @@
(setq new (planner-deadline-calculate-string
deadline task-info)))
(setq new (planner-deadline-calculate-string deadline nil))))
- (when new
+ (when (and new (not (string= deadline-string new)))
(if task-info
(when (string-match planner-deadline-regexp
(planner-task-description task-info))
_______________________________________________
Planner-el-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/planner-el-discuss