summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gregory <jgrg@autistici.org>2019-07-03 09:40:10 -0300
committerJonathan Gregory <jgrg@autistici.org>2019-07-03 09:40:10 -0300
commitb49e31aa34dc5251f49eb5b253d7af858d9a4a46 (patch)
tree7ea646dc85cd742cba6ae382f95b7ec9a2e5bfa7
parentda41fccc1fbea1843b897941be4a8f5755331900 (diff)
Add action for setting schedule dates
* helm-org.el (helm-org-schedule): New.
-rw-r--r--helm-org.el15
1 files changed, 15 insertions, 0 deletions
diff --git a/helm-org.el b/helm-org.el
index 172e74e5..abe2e647 100644
--- a/helm-org.el
+++ b/helm-org.el
@@ -344,6 +344,21 @@ This command is set with the variable `org-archive-default-command'."
(helm-exit-and-execute-action 'helm-org--refile-heading-to)))
(put 'helm-org-run-refile-heading-to 'helm-only t)
+(defun helm-org-schedule (marker)
+ "Insert the SCHEDULED: string with a timestamp to schedule a TODO item.
+With one universal prefix argument, remove any scheduling date from the item."
+ (let ((current-prefix-arg helm-current-prefix-arg)
+ (helm-org-switch-to-buffer-p t))
+ (helm-org-execute marker
+ (call-interactively 'org-schedule)
+ (org-show-entry))))
+
+(defun helm-org-run-org-schedule ()
+ (interactive)
+ (with-helm-alive-p
+ (helm-exit-and-execute-action 'helm-org-schedule)))
+(put 'helm-org-run-org-schedule 'helm-only t)
+
;;; Commands
;;