branch: externals/tmr commit 0ceb7448850f44ddd33b40bc9511ee9b2ba9fd31 Author: Damien Cassou <dam...@cassou.me> Commit: Protesilaos Stavrou <i...@protesilaos.com>
tmr: Improve tmr--long-description Add text properties. --- tmr.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tmr.el b/tmr.el index ca3a9c8bce..47269d8d7b 100644 --- a/tmr.el +++ b/tmr.el @@ -178,11 +178,14 @@ It should take two string arguments: the title and the message." (defun tmr--long-description (timer) "Return a human-readable description for TIMER." (let ((start (tmr--format-creation-date timer)) - (duration (tmr--timer-duration timer)) + (end (tmr--format-end-date timer)) (description (tmr--timer-description timer))) - (if description - (format "Started at %s with input '%s' and description '%s'" start duration description) - (format "Started at %s with input '%s'" start duration)))) + (format "Started at %s and will end at %s%s" + (propertize start 'face 'success) + (propertize end 'face 'error) + (if description + (format " [%s]" (propertize description 'face 'bold)) + "")))) (defun tmr--format-creation-date (timer) "Return a string representing when TIMER was created."