diff options
author | Marco Wahl <marcowahlsoft@gmail.com> | 2019-02-07 23:40:19 +0100 |
---|---|---|
committer | Marco Wahl <marcowahlsoft@gmail.com> | 2019-02-07 23:40:19 +0100 |
commit | 0da44916220bfd2970adca4bb191181e295e70a6 (patch) | |
tree | 872c308880928c8427e5072ee48974c5a951c85f | |
parent | 18b85aa3feaea5a8a9f630dead73db69c941b717 (diff) | |
download | org-mode-0da44916220bfd2970adca4bb191181e295e70a6.tar.gz |
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
-rw-r--r-- | lisp/org-habit.el | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lisp/org-habit.el b/lisp/org-habit.el index 88df38c..8e5f579 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)) |