[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org-notify 13afc93024 08/23: Add support for sending em
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org-notify 13afc93024 08/23: Add support for sending emails. |
Date: |
Mon, 25 Jul 2022 12:57:56 -0400 (EDT) |
branch: externals/org-notify
commit 13afc93024aad4b3f6b91d9716e61cb28814b8c4
Author: Peter Münster <pmrb@free.fr>
Commit: Peter Münster <pmrb@free.fr>
Add support for sending emails.
org-notify.el (org-notify-action-email): new function
---
org-notify.el | 27 +++++++++++++++------------
1 file changed, 15 insertions(+), 12 deletions(-)
diff --git a/org-notify.el b/org-notify.el
index ccee3601c8..317e53a7c5 100644
--- a/org-notify.el
+++ b/org-notify.el
@@ -245,10 +245,23 @@ for SECS is 50."
(run-with-timer (or (plist-get plist :duration) 3) nil
'cancel-timer timer)))
+(defun org-notify-body-text (deadline)
+ "Make human readable string for remaining time to deadline.
+This time in seconds is provided by DEADLINE."
+ (require 'gnus-art)
+ (replace-regexp-in-string
+ " in the future" ""
+ (article-lapsed-string (time-add (current-time)
+ (seconds-to-time deadline))
+ 2)))
+
(defun org-notify-action-email (plist)
"Send email to user."
-; todo
-)
+ (compose-mail user-mail-address (concat "TODO: " (plist-get plist :heading)))
+ (insert (org-notify-body-text (plist-get plist :deadline)))
+ (funcall send-mail-function)
+ (flet ((yes-or-no-p (prompt) t))
+ (kill-buffer)))
(defun org-notify-select-highest-window ()
"Select the highest window on the frame, that is not is not an
@@ -301,16 +314,6 @@ org-notify window. Mostly copied from
`appt-select-lowest-window'."
(set-buffer-modified-p nil) (setq buffer-read-only t)
(raise-frame (selected-frame)) (select-window this-window)))))
-(defun org-notify-body-text (deadline)
- "Make human readable string for remaining time to deadline.
-This time in seconds is provided by DEADLINE."
- (require 'gnus-art)
- (replace-regexp-in-string
- " in the future" ""
- (article-lapsed-string (time-add (current-time)
- (seconds-to-time deadline))
- 2)))
-
(defun org-notify-action-notify (plist)
"Pop up a notification window."
; todo perhaps: dbus-unregister-service for NotificationClosed to
- [elpa] externals/org-notify 6aac808924 20/23: Merge pull request #5 from jgkamat/jay/melpa, (continued)
- [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, 2022/07/25
- [elpa] externals/org-notify 13afc93024 08/23: Add support for sending emails.,
ELPA Syncer <=
- [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