[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org-notify 75df171a0a 05/23: Allow also suffixes for pr
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org-notify 75df171a0a 05/23: Allow also suffixes for predefined functions. |
Date: |
Mon, 25 Jul 2022 12:57:56 -0400 (EDT) |
branch: externals/org-notify
commit 75df171a0a8ca760714fc14a4751f0885b8320cb
Author: Peter Münster <pmrb@free.fr>
Commit: Peter Münster <pmrb@free.fr>
Allow also suffixes for predefined functions.
org-notify.el (org-notify-add): For the :actions, the user can supply now
also a suffix for a predefined function instead of the full function name.
---
org-notify.el | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/org-notify.el b/org-notify.el
index 61bf48a842..20624e90b0 100644
--- a/org-notify.el
+++ b/org-notify.el
@@ -37,13 +37,11 @@
;; Example setup:
;; (org-notify-add 'appt
;; '(:time "-1s" :period "20s" :duration 10
-;; :actions (org-notify-action-message
-;; org-notify-action-ding))
+;; :actions (-message -ding))
;; '(:time "15m" :period "2m" :duration 100
-;; :actions org-notify-action-notify)
-;; '(:time "2h" :period "5m"
-;; :actions org-notify-action-message)
-;; '(:time "3d" :actions org-notify-action-email))
+;; :actions -notify)
+;; '(:time "2h" :period "5m" :actions -message)
+;; '(:time "3d" :actions -email))
;; This means for todo-items with `notify' property set to `appt': 3 days
;; before deadline, send a reminder-email, 2 hours before deadline, start to
;; send messages every 5 minutes, then 15 minutes before deadline, start to
@@ -151,7 +149,10 @@ forgotten tasks."
(unless (listp actions)
(setq actions (list actions)))
(dolist (action actions)
- (funcall action plist))))
+ (funcall (if (fboundp action) action
+ (intern (concat "org-notify-action"
+ (symbol-name action))))
+ plist))))
(return)))))))
(defun org-notify-add (name &rest params)
@@ -168,7 +169,9 @@ List of possible parameters:
start. It's a string: an integral value (positive or negative)
followed by a unit (s, m, h, d, w, M).
:actions A function or a list of functions to be called to notify the
- user.
+ user. Instead of a function name, you can also supply a suffix
+ of one of the various predefined `org-notify-action-xxx'
+ functions.
:period Optional: can be used to repeat the actions periodically. Same
format as :time.
:duration Some actions use this parameter to specify the duration of the
- [elpa] externals/org-notify 96ddaf1d87 14/23: org-notify-on-action: Raise focus of frame, when showing the todo-entry., (continued)
- [elpa] externals/org-notify 96ddaf1d87 14/23: org-notify-on-action: Raise focus of frame, when showing the todo-entry., ELPA Syncer, 2022/07/25
- [elpa] externals/org-notify 6aac808924 20/23: Merge pull request #5 from jgkamat/jay/melpa, ELPA Syncer, 2022/07/25
- [elpa] externals/org-notify 148ec5ad27 22/23: Integrate enhancements from Stefan Monnier, ELPA Syncer, 2022/07/25
- [elpa] externals/org-notify d05ef86787 18/23: org-notify.el (org-notify-on-action): Pressing "done" should never act on, ELPA Syncer, 2022/07/25
- [elpa] externals/org-notify 704e023ad8 21/23: Simplify call to time-add in org-notify-body-text, ELPA Syncer, 2022/07/25
- [elpa] externals/org-notify f47c137a96 23/23: Add a todo list, ELPA Syncer, 2022/07/25
- [elpa] externals/org-notify d24a1525c1 06/23: Remove obsolete org-notify-verbose., ELPA Syncer, 2022/07/25
- [elpa] externals/org-notify d2e1c297fa 17/23: README.md: this module is no more in the org-mode distribution, ELPA Syncer, 2022/07/25
- [elpa] externals/org-notify 3a9c55aabd 19/23: Fix package-lint errors, ELPA Syncer, 2022/07/25
- [elpa] externals/org-notify d61af2d334 04/23: Use common prefix for all objects., ELPA Syncer, 2022/07/25
- [elpa] externals/org-notify 75df171a0a 05/23: Allow also suffixes for predefined functions.,
ELPA Syncer <=
- [elpa] externals/org-notify 13afc93024 08/23: Add support for sending emails., ELPA Syncer, 2022/07/25
- [elpa] externals/org-notify dd342f86d6 11/23: org-notify-audible: new configuration variable., ELPA Syncer, 2022/07/25
- [elpa] externals/org-notify 76f75705b3 13/23: org-notify-on-action: New action: show the entry., ELPA Syncer, 2022/07/25
- [elpa] externals/org-notify 1c65ee9597 16/23: org-notify.el: update to version in org-mode distribution, ELPA Syncer, 2022/07/25
- [elpa] externals/org-notify f566817937 10/23: New notification type: "notify or window"., ELPA Syncer, 2022/07/25
- [elpa] externals/org-notify 5875631410 09/23: Treat only one file per call of org-notify-process., ELPA Syncer, 2022/07/25
- [elpa] externals/org-notify 160c7eb64d 12/23: org-notify-body-text: Add time-stamp to text., ELPA Syncer, 2022/07/25
- [elpa] externals/org-notify e4bdac5a14 15/23: Create README.md, ELPA Syncer, 2022/07/25