[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org-notify 148ec5ad27 22/23: Integrate enhancements fro
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org-notify 148ec5ad27 22/23: Integrate enhancements from Stefan Monnier |
Date: |
Mon, 25 Jul 2022 12:57:58 -0400 (EDT) |
branch: externals/org-notify
commit 148ec5ad2712e1d8a11d6c718a1704cb2f932d7f
Author: Peter Münster <pm@a16n.net>
Commit: Peter Münster <pm@a16n.net>
Integrate enhancements from Stefan Monnier
---
org-notify.el | 31 +++++++++++++++----------------
1 file changed, 15 insertions(+), 16 deletions(-)
diff --git a/org-notify.el b/org-notify.el
index 2e93820e9a..2088748d5d 100644
--- a/org-notify.el
+++ b/org-notify.el
@@ -1,6 +1,6 @@
-;;; org-notify.el --- Notifications for Org-mode
+;;; org-notify.el --- Notifications for Org-mode -*- lexical-binding: t; -*-
-;; Copyright (C) 2012-2021 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2022 Free Software Foundation, Inc.
;; Author: Peter Münster <pmrb@free.fr>
;; Keywords: notification, todo-list, alarm, reminder, pop-up, calendar
@@ -74,13 +74,11 @@
(defcustom org-notify-audible t
"Non-nil means beep to indicate notification."
- :type 'boolean
- :group 'org-notify)
+ :type 'boolean)
(defcustom org-notify-max-notifications-per-run 3
"Maximum number of notifications per run of `org-notify-process'."
- :type 'integer
- :group 'org-notify)
+ :type 'integer)
(defconst org-notify-actions
'("show" "show" "done" "done" "hour" "one hour later" "day" "one day later"
@@ -124,7 +122,7 @@ simple timestamp string."
(plist-get (plist-get orig 'timestamp)
:raw-value))))
-(defun org-notify-make-todo (heading &rest ignored)
+(defun org-notify-make-todo (heading &rest _ignored)
"Create one todo item."
(cl-macrolet ((get (k) `(plist-get list ,k))
(pr (k v) `(setq result (plist-put result ,k ,v))))
@@ -232,7 +230,7 @@ ones, whose names are prefixed with `org-notify-action-'."
"Start the notification daemon.
If SECS is positive, it's the period in seconds for processing
the notifications of one org-agenda file, and if negative,
-notifications will be checked only when emacs is idle for -SECS
+notifications will be checked only when Emacs is idle for -SECS
seconds. The default value for SECS is 20."
(interactive)
(if org-notify-timer
@@ -240,8 +238,8 @@ seconds. The default value for SECS is 20."
(setq secs (or secs 20)
org-notify-timer (if (< secs 0)
(run-with-idle-timer (* -1 secs) t
- 'org-notify-process)
- (run-with-timer secs secs 'org-notify-process))))
+ #'org-notify-process)
+ (run-with-timer secs secs #'org-notify-process))))
(defun org-notify-stop ()
"Stop the notification daemon."
@@ -291,11 +289,12 @@ seconds. The default value for SECS is 20."
(defun org-notify-delete-window (buffer)
"Delete the notification window."
(require 'appt)
+ (defvar appt-buffer-name) (defvar appt-audible)
(let ((appt-buffer-name buffer)
(appt-audible nil))
(appt-delete-window)))
-(defun org-notify-on-close (id reason)
+(defun org-notify-on-close (id _reason)
"Notification window has been closed."
(setq org-notify-on-action-map (plist-put org-notify-on-action-map id nil)))
@@ -306,9 +305,9 @@ seconds. The default value for SECS is 20."
(defun org-notify-action-ding (plist)
"Make noise."
- (let ((timer (run-with-timer 0 1 'ding)))
+ (let ((timer (run-with-timer 0 1 #'ding)))
(run-with-timer (or (plist-get plist :duration) 3) nil
- 'cancel-timer timer)))
+ #'cancel-timer timer)))
(defun org-notify-body-text (plist)
"Make human readable string for remaining time to deadline."
@@ -325,7 +324,7 @@ seconds. The default value for SECS is 20."
(compose-mail user-mail-address (concat "TODO: " (plist-get plist :heading)))
(insert (org-notify-body-text plist))
(funcall send-mail-function)
- (cl-letf (((symbol-function 'yes-or-no-p) (lambda (x) t)))
+ (cl-letf (((symbol-function 'yes-or-no-p) (lambda (_) t)))
(kill-buffer)))
(defun org-notify-select-highest-window ()
@@ -368,7 +367,7 @@ org-notify window. Mostly copied from
`appt-select-lowest-window'."
(insert (format "TODO: %s, %s.\n" (get :heading)
(org-notify-body-text plist)))
(let ((timer (run-with-timer (or (get :duration) 10) nil
- 'org-notify-delete-window buf)))
+ #'org-notify-delete-window buf)))
(dotimes (i (/ (length org-notify-actions) 2))
(let ((key (nth (* i 2) org-notify-actions))
(text (nth (1+ (* i 2)) org-notify-actions)))
@@ -395,7 +394,7 @@ org-notify window. Mostly copied from
`appt-select-lowest-window'."
(defun org-notify-action-notify/window (plist)
"For a graphics display, pop up a notification window, for a text
-terminal an emacs window."
+terminal an Emacs window."
(if (display-graphic-p)
(org-notify-action-notify plist)
(org-notify-action-window plist)))
- [elpa] branch externals/org-notify created (now f47c137a96), ELPA Syncer, 2022/07/25
- [elpa] externals/org-notify 59d14e2893 01/23: first commit, ELPA Syncer, 2022/07/25
- [elpa] externals/org-notify caea28a77f 02/23: org-notify.el: fix byte-compilation, ELPA Syncer, 2022/07/25
- [elpa] externals/org-notify 1ca7fe811d 07/23: Time to deadline in pop-up window now more readable., ELPA Syncer, 2022/07/25
- [elpa] externals/org-notify f16d775731 03/23: Allow popping up multiple notification windows., ELPA Syncer, 2022/07/25
- [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 <=
- [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, 2022/07/25
- [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