From 0da44916220bfd2970adca4bb191181e295e70a6 Mon Sep 17 00:00:00 2001 From: Marco Wahl Date: Thu, 7 Feb 2019 23:40:19 +0100 Subject: [PATCH] org-habit: Mouse over habit graph displays date * lisp/org-habit.el (org-habit-build-graph): Display the date also for day when the task has not been marked done. If the task has been marked done the string "DONE" appears in the display. Hint: With { M-x tooltip-mode } the date appears in a tooltip --- lisp/org-habit.el | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lisp/org-habit.el b/lisp/org-habit.el index 88df38ce0..8e5f57943 100644 --- a/lisp/org-habit.el +++ b/lisp/org-habit.el @@ -396,9 +396,6 @@ current time." (aset graph index org-habit-completed-glyph) (setq markedp t) - (put-text-property - index (1+ index) 'help-echo - (format-time-string (org-time-stamp-format) done-time) graph) (while (and done-dates (= start (car done-dates))) (setq last-done-date (car done-dates) @@ -412,7 +409,14 @@ current time." (not (eq face 'org-habit-overdue-face)) (not markedp)) (setq face (cdr faces))) - (put-text-property index (1+ index) 'face face graph)) + (put-text-property index (1+ index) 'face face graph) + (put-text-property index (1+ index) + 'help-echo + (concat (format-time-string + (org-time-stamp-format) + (time-add starting (days-to-time (- start (time-to-days starting))))) + (if donep " DONE" "")) + graph)) (setq start (1+ start) index (1+ index))) graph))