Skip to content

Commit

Permalink
more informative feedback messages
Browse files Browse the repository at this point in the history
Signed-off-by: Psionik K <[email protected]>
  • Loading branch information
psionic-k committed May 15, 2024
1 parent f4ac753 commit e1408bf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lisp/champagne.el
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
(number-to-string champagne-default-seconds) nil nil nil)))
(if (string-match-p "\\`[1-9][0-9]*\\'" str)
(string-to-number str)
(user-error "Please enter a positive integer")))))
(user-error "%s not a positive integer" str)))))

(defun champagne--start (goal-time start-fun end-fun digits)
"Count down to GOAL-TIME.
Expand Down Expand Up @@ -292,6 +292,9 @@ be called with the countdown finishes."
(time-add (current-time) duration)
goal-time))
(start-time (time-subtract goal-time duration)))
(message "%s second countdown scheduled to end at %s"
(floor (float-time duration))
(format-time-string "%l:%M:%S %p %d %B %Y" goal-time))
(run-at-time start-time nil #'champagne--start
goal-time start-fun end-fun digits)))

Expand Down

0 comments on commit e1408bf

Please sign in to comment.