[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/tmr cfd798b066 11/14: Add tmr-reschedule and tmr-edit-d
From: |
ELPA Syncer |
Subject: |
[elpa] externals/tmr cfd798b066 11/14: Add tmr-reschedule and tmr-edit-description |
Date: |
Mon, 27 Jun 2022 12:58:04 -0400 (EDT) |
branch: externals/tmr
commit cfd798b06660e2343a8cc373e2d1dfaae8a0c86d
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Add tmr-reschedule and tmr-edit-description
Add bindings for more symmetry between toplevel
and tabulated view.
---
README.org | 2 ++
tmr-tabulated.el | 19 ++++++++-----------
tmr.el | 20 ++++++++++++++++++++
3 files changed, 30 insertions(+), 11 deletions(-)
diff --git a/README.org b/README.org
index 8359cd0b48..f0180ac5c7 100644
--- a/README.org
+++ b/README.org
@@ -321,6 +321,8 @@ Everything is in place to set up the package.
(define-key map (kbd "C-c t l") #'tmr-tabulated-view) ; "list timers"
mnemonic
(define-key map (kbd "C-c t c") #'tmr-clone)
(define-key map (kbd "C-c t k") #'tmr-cancel)
+ (define-key map (kbd "C-c t s") #'tmr-reschedule)
+ (define-key map (kbd "C-c t e") #'tmr-edit-description)
(define-key map (kbd "C-c t K") #'tmr-remove-finished))
#+end_src
diff --git a/tmr-tabulated.el b/tmr-tabulated.el
index 10d0d5d844..def3cf274b 100644
--- a/tmr-tabulated.el
+++ b/tmr-tabulated.el
@@ -66,8 +66,11 @@
(define-key map "k" #'tmr-tabulated-cancel)
(define-key map "K" #'tmr-remove-finished)
(define-key map "+" #'tmr)
+ (define-key map "t" #'tmr)
+ (define-key map "*" #'tmr-with-description)
+ (define-key map "T" #'tmr-with-description)
(define-key map "c" #'tmr-tabulated-clone)
- (define-key map "w" #'tmr-tabulated-rewrite-description)
+ (define-key map "e" #'tmr-tabulated-edit-description)
(define-key map "s" #'tmr-tabulated-reschedule)
map)
"Keybindings for `tmr-tabulated-mode-map'.")
@@ -97,23 +100,17 @@ Interactively, use the timer at point."
(defun tmr-tabulated-reschedule (timer)
"Reschedule TIMER.
-This is the same as cloning it and cancelling the original one.
-
-If TIMER has a description, prompt for one. Otherwise only
-prompt for a duration."
+This is the same as cloning it and cancelling the original one."
(interactive (list (tmr-tabulated--get-timer-at-point)))
- (tmr-clone timer :prompt)
- (let (tmr-timer-cancelled-functions)
- (tmr-tabulated-cancel timer)))
+ (tmr-reschedule timer))
-(defun tmr-tabulated-rewrite-description (timer description)
+(defun tmr-tabulated-edit-description (timer description)
"Change TIMER description with that of DESCRIPTION."
(interactive
(list
(tmr-tabulated--get-timer-at-point)
(tmr--description-prompt)))
- (setf (tmr--timer-description timer) description)
- (run-hooks 'tmr--update-hook))
+ (tmr-edit-description timer description))
(defun tmr-tabulated--move-point-to-closest-entry ()
"Move the point to the next entry if there is one or to the previous one.
diff --git a/tmr.el b/tmr.el
index 2aaa412113..f5413248f1 100644
--- a/tmr.el
+++ b/tmr.el
@@ -217,6 +217,26 @@ completion."
(run-hooks 'tmr--update-hook)
(run-hook-with-args 'tmr-timer-cancelled-functions timer)))
+;;;###autoload
+(defun tmr-reschedule (timer)
+ "Reschedule TIMER.
+This is the same as cloning it, prompting for duration and
+cancelling the original one."
+ (interactive (list (tmr--read-timer)))
+ (tmr-clone timer :prompt)
+ (let (tmr-timer-cancelled-functions)
+ (tmr-cancel timer)))
+
+;;;###autoload
+(defun tmr-edit-description (timer description)
+ "Change TIMER description with that of DESCRIPTION."
+ (interactive
+ (list
+ (tmr--read-timer)
+ (tmr--description-prompt)))
+ (setf (tmr--timer-description timer) description)
+ (run-hooks 'tmr--update-hook))
+
;;;###autoload
(defun tmr-remove-finished ()
"Remove all finished timers."
- [elpa] externals/tmr updated (704242b6ba -> 907756ce8d), ELPA Syncer, 2022/06/27
- [elpa] externals/tmr bdd99767bb 03/14: Add tmr-tabulated--refresh, ELPA Syncer, 2022/06/27
- [elpa] externals/tmr 38c9089597 08/14: tmr-remove-finished: Add autoload, ELPA Syncer, 2022/06/27
- [elpa] externals/tmr 9f0dee563b 06/14: Move tmr-sound.el back into tmr.el, ELPA Syncer, 2022/06/27
- [elpa] externals/tmr cfd798b066 11/14: Add tmr-reschedule and tmr-edit-description,
ELPA Syncer <=
- [elpa] externals/tmr 907756ce8d 14/14: Acknowledge Daniel Mendler for the latest patches, ELPA Syncer, 2022/06/27
- [elpa] externals/tmr 448be30775 09/14: Improve tmr-clone: Only prompt for description if pressing C-u C-u, ELPA Syncer, 2022/06/27
- [elpa] externals/tmr 6f3b096f2c 13/14: Greatly simplify tmr-tabulated, reuse tmr--read-timer, ELPA Syncer, 2022/06/27
- [elpa] externals/tmr 58d30c4896 12/14: Remove single line functions which were used only once, ELPA Syncer, 2022/06/27
- [elpa] externals/tmr 58224191d0 01/14: Rename struct tmr-timer to tmr--timer, ELPA Syncer, 2022/06/27
- [elpa] externals/tmr e18496d187 07/14: Add tmr--update-hook, ELPA Syncer, 2022/06/27
- [elpa] externals/tmr e9c6c8861f 02/14: Get rid of tmr-descriptions-list, ELPA Syncer, 2022/06/27
- [elpa] externals/tmr 9974a28933 04/14: Remove unnecessary declare-function, ELPA Syncer, 2022/06/27
- [elpa] externals/tmr d6d5e4d22d 05/14: Warn if dbus is unavailable, ELPA Syncer, 2022/06/27
- [elpa] externals/tmr 92d6163dd0 10/14: Remove no-hooks argument, ELPA Syncer, 2022/06/27