emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org-notify bbd9a049ff 3/3: No more need to prefix actio


From: ELPA Syncer
Subject: [elpa] externals/org-notify bbd9a049ff 3/3: No more need to prefix actions with a hyphen
Date: Thu, 4 Aug 2022 08:57:49 -0400 (EDT)

branch: externals/org-notify
commit bbd9a049ff3c3bb936a3044cf01949db2e4c91fd
Author: Peter Münster <pm@a16n.net>
Commit: Peter Münster <pm@a16n.net>

    No more need to prefix actions with a hyphen
    
    * org-notify.el (org-notify-process): Make use of the ensure-list
    function. And avoid the need to prefix the actions with a hyphen.
---
 org-notify.el | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/org-notify.el b/org-notify.el
index c64352d089..df0cb8c367 100644
--- a/org-notify.el
+++ b/org-notify.el
@@ -43,11 +43,11 @@
 ;;
 ;; (org-notify-add 'appt
 ;;                 '(:time "-1s" :period "20s" :duration 10
-;;                   :actions (-message -ding))
+;;                   :actions (message ding))
 ;;                 '(:time "15m" :period "2m" :duration 100
-;;                   :actions -notify)
-;;                 '(:time "2h" :period "5m" :actions -message)
-;;                 '(:time "3d" :actions -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
@@ -196,12 +196,11 @@ forgotten tasks."
                           (prm :audible)
                        org-notify-audible)
                       (ding))
-                  (unless (listp actions)
-                    (setq actions (list actions)))
+                  (setq actions (ensure-list actions))
                  (cl-incf notification-cnt)
                   (dolist (action actions)
                     (funcall (if (fboundp action) action
-                               (intern (concat "org-notify-action"
+                               (intern (concat "org-notify-action-"
                                                (symbol-name action))))
                             plist))
                  (when (>= notification-cnt 
org-notify-max-notifications-per-run)
@@ -412,7 +411,7 @@ terminal an Emacs window."
     (org-notify-action-window plist)))
 
 ;;; Provide a minimal default setup.
-(org-notify-add 'default '(:time "1h" :actions -notify/window
+(org-notify-add 'default '(:time "1h" :actions notify/window
                                 :period "2m" :duration 60))
 
 (provide 'org-notify)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]