From f35ed556ec7a547bdb69e05215efc1885e9b0a8c Mon Sep 17 00:00:00 2001 From: Random936 Date: Wed, 21 Feb 2024 16:56:01 -0800 Subject: [PATCH] Some slight improvements to the weekly scorecard --- .emacs.d/functions.org | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.emacs.d/functions.org b/.emacs.d/functions.org index b402c89..06dc390 100644 --- a/.emacs.d/functions.org +++ b/.emacs.d/functions.org @@ -104,7 +104,8 @@ Taken from the book /12 Week Year/, the weekly scorecard is a way to measure how (dolist (box (jm/catalog-checkboxes buffer) dictionary) (with-current-buffer buffer (let* ((start (org-element-property :contents-begin box)) - (end (- (org-element-property :contents-end box) 1)) + (end (progn (goto-char start) + (or (- (search-forward "\n" nil t) 1) (point-max)))) (key (buffer-substring-no-properties start end)) (checked (if (jm/checkbox-checked-p box) 1 0)) (pair (assoc key dictionary)) @@ -130,7 +131,7 @@ Taken from the book /12 Week Year/, the weekly scorecard is a way to measure how (defun jm/weekly-scorecard (&optional days) (interactive) - (let ((table "| Task | Times Completed | Total | Percentage |\n")) + (let ((table "| Task | Completed | Total | Percentage |\n")) (dolist (box (jm/n-day-scorecard (or days 7)) table) (let* ((name (car box)) (checked (cadr box))