[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org-notify 76f75705b3 13/23: org-notify-on-action: New
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org-notify 76f75705b3 13/23: org-notify-on-action: New action: show the entry. |
Date: |
Mon, 25 Jul 2022 12:57:57 -0400 (EDT) |
branch: externals/org-notify
commit 76f75705b32119d9e6412cc2c703baa066b8c72c
Author: Peter Münster <pmrb@free.fr>
Commit: Peter Münster <pmrb@free.fr>
org-notify-on-action: New action: show the entry.
---
org-notify.el | 35 +++++++++++++++++++++++------------
1 file changed, 23 insertions(+), 12 deletions(-)
diff --git a/org-notify.el b/org-notify.el
index 0b98f19df1..e2bb5ff18e 100644
--- a/org-notify.el
+++ b/org-notify.el
@@ -70,8 +70,9 @@
:type 'boolean
:group 'org-notify)
-(defconst org-notify-actions '("done" "done" "hour" "one hour later" "day"
- "one day later" "week" "one week later")
+(defconst org-notify-actions
+ '("show" "show" "done" "done" "hour" "one hour later" "day" "one day later"
+ "week" "one week later")
"Possible actions for call-back functions.")
(defconst org-notify-window-buffer-name "*org-notify-%s*"
@@ -220,16 +221,26 @@ SECS is 20."
(defun org-notify-on-action (plist key)
"User wants to see action."
- (save-excursion
- (with-current-buffer (find-file-noselect (plist-get plist :file))
- (org-with-wide-buffer
- (goto-char (plist-get plist :begin))
- (search-forward "DEADLINE: <")
- (cond
- ((string-equal key "done") (org-todo))
- ((string-equal key "hour") (org-timestamp-change 60 'minute))
- ((string-equal key "day") (org-timestamp-up-day))
- ((string-equal key "week") (org-timestamp-change 7 'day)))))))
+ (let ((file (plist-get plist :file))
+ (begin (plist-get plist :begin)))
+ (if (string-equal key "show")
+ (progn
+ (switch-to-buffer (find-file-noselect file))
+ (org-with-wide-buffer
+ (goto-char begin)
+ (show-entry))
+ (goto-char begin)
+ (search-forward "DEADLINE: <"))
+ (save-excursion
+ (with-current-buffer (find-file-noselect file)
+ (org-with-wide-buffer
+ (goto-char begin)
+ (search-forward "DEADLINE: <")
+ (cond
+ ((string-equal key "done") (org-todo))
+ ((string-equal key "hour") (org-timestamp-change 60 'minute))
+ ((string-equal key "day") (org-timestamp-up-day))
+ ((string-equal key "week") (org-timestamp-change 7 'day)))))))))
(defun org-notify-on-action-notify (id key)
"User wants to see action after mouse-click in notify window."
- [elpa] externals/org-notify d05ef86787 18/23: org-notify.el (org-notify-on-action): Pressing "done" should never act on, (continued)
- [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
- [elpa] externals/org-notify 76f75705b3 13/23: org-notify-on-action: New action: show the entry.,
ELPA Syncer <=
- [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