org-effectiveness.el: Add save-excursion to org-effectiveness-dones-in-date, org-effectiveness-canceled-in-date, org-effectiveness-todos-in-date
* contrib/lisp/org-effectiveness.el (org-effectiveness-dones-in-date, org-effectiveness-canceled-in-date, org-effectiveness-todos-in-date): Add save-excursion
This commit is contained in:
parent
01319a41a3
commit
0c3ea42a7c
|
@ -96,6 +96,7 @@ many TODO pending"
|
||||||
(setq effectiveness (* 100 (/ done (+ done canc)))))
|
(setq effectiveness (* 100 (/ done (+ done canc)))))
|
||||||
(message "Effectiveness: %f" effectiveness))))
|
(message "Effectiveness: %f" effectiveness))))
|
||||||
|
|
||||||
|
|
||||||
(defun org-effectiveness-keywords-in-date(keyword date)
|
(defun org-effectiveness-keywords-in-date(keyword date)
|
||||||
(interactive "sKeyword: \nsDate: " keyword date)
|
(interactive "sKeyword: \nsDate: " keyword date)
|
||||||
(setq count (count-matches (concat keyword ".*\n.*" date)))
|
(setq count (count-matches (concat keyword ".*\n.*" date)))
|
||||||
|
@ -103,18 +104,24 @@ many TODO pending"
|
||||||
|
|
||||||
(defun org-effectiveness-dones-in-date(date)
|
(defun org-effectiveness-dones-in-date(date)
|
||||||
(interactive "sGive me a date: " date)
|
(interactive "sGive me a date: " date)
|
||||||
|
(save-excursion
|
||||||
|
(goto-char (point-min))
|
||||||
(setq count (count-matches (concat "DONE.*\n.*" date)))
|
(setq count (count-matches (concat "DONE.*\n.*" date)))
|
||||||
(message "DONES: %d" count))
|
(message "DONES: %d" count)))
|
||||||
|
|
||||||
(defun org-effectivenes-todos-in-date(date)
|
(defun org-effectiveness-todos-in-date(date)
|
||||||
(interactive "sGive me a date: " date)
|
(interactive "sGive me a date: " date)
|
||||||
|
(save-excursion
|
||||||
|
(goto-char (point-min))
|
||||||
(setq count (count-matches (concat "TODO.*\n.*" date)))
|
(setq count (count-matches (concat "TODO.*\n.*" date)))
|
||||||
(message "TODOS: %d" count))
|
(message "TODOS: %d" count)))
|
||||||
|
|
||||||
(defun org-effectiveness-canceled-in-date(date)
|
(defun org-effectiveness-canceled-in-date(date)
|
||||||
(interactive "sGive me a date: " date)
|
(interactive "sGive me a date: " date)
|
||||||
|
(save-excursion
|
||||||
|
(goto-char (point-min))
|
||||||
(setq count (count-matches (concat "CANCEL+ED.*\n.*" date)))
|
(setq count (count-matches (concat "CANCEL+ED.*\n.*" date)))
|
||||||
(message "CANCELEDS: %d" count))
|
(message "CANCELEDS: %d" count)))
|
||||||
|
|
||||||
(defun org-effectiveness-ntasks-in-date(date &optional notmessage)
|
(defun org-effectiveness-ntasks-in-date(date &optional notmessage)
|
||||||
(interactive "sGive me a date: " date)
|
(interactive "sGive me a date: " date)
|
||||||
|
|
Loading…
Reference in New Issue