branch: externals/tmr
commit efa5a89e816996cc07db866a094f9dd62e480a04
Author: Protesilaos Stavrou <[email protected]>
Commit: Protesilaos Stavrou <[email protected]>

    Add user option tmr-acknoledge-timer-text
---
 README.org | 10 +++++++---
 tmr.el     | 13 +++++++++++--
 2 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/README.org b/README.org
index e6045c2a40..d486742356 100644
--- a/README.org
+++ b/README.org
@@ -103,11 +103,15 @@ The command ~tmr-edit-description~ can change the 
description a given
 timer object.
 
 #+findex: tmr-toggle-acknowledge
+#+vindex: tmr-acknoledge-timer-text
 The command ~tmr-toggle-acknowledge~ toggles the acknowledge flag of a
-given timer object.  A timer that needs to be acknowledged prompts for
-confirmation after it elapses.  The user can either confirm and thus
+given timer object. A timer that needs to be acknowledged prompts for
+confirmation after it elapses. The user can either confirm and thus
 dismiss the timer, or set a new duration for the next reminder, using
-the familiar TMR input.
+the familiar TMR input. The confirmation text to be provided at the
+minibuffer prompt (=ack= by default) can be configured via the user
+option ~tmr-acknoledge-timer-text~ [ The confirmation text is
+configurable as part of {{{development-version}}}. ]
 
 #+vindex: tmr-descriptions-list
 The user option ~tmr-descriptions-list~ defines the completion
diff --git a/tmr.el b/tmr.el
index 08a7d4ed89..c085aed1dd 100644
--- a/tmr.el
+++ b/tmr.el
@@ -125,6 +125,14 @@ Each function must accept a timer as argument."
   :package-version '(tmr . "1.0.0")
   :type 'string)
 
+(defcustom tmr-acknoledge-timer-text "ack"
+  "Text to confirm that a timer is acknowledged.
+This is the input to be given to the minibuffer prompt that asks for
+confirmation when a timer has to be acknowledged (acknolegdement here
+means that the user confirms that the timer has elapsed)."
+  :package-version '(tmr . "1.3.0")
+  :type 'string)
+
 (defcustom tmr-tabulated-refresh-interval 5
   "Refresh the `tmr-tabulated-view' buffer after these many seconds.
 If the value is nil, then never automatically refresh that buffer: the
@@ -666,8 +674,9 @@ If optional DEFAULT is provided use it as a default 
candidate."
     (while
         (let ((input
                (read-from-minibuffer
-                (concat (tmr--long-description-for-finished-timer timer)
-                        "\nAcknowledge with `ack' or additional duration: "))))
+                (format "%s\nAcknowledge with `%s' or additional duration: "
+                        (tmr--long-description-for-finished-timer timer)
+                        tmr-acknoledge-timer-text))))
           (not (or (equal input "ack")
                    (when-let* ((duration
                                 (ignore-errors

Reply via email to