forked from Trevoke/org-gtd.el
-
Notifications
You must be signed in to change notification settings - Fork 0
/
org-gtd-delegate.el
43 lines (35 loc) · 1.38 KB
/
org-gtd-delegate.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
;;; org-gtd-delegate.el --- logic to delegate items -*- lexical-binding: t; coding: utf-8 -*-
;;
;; Copyright © 2019-2021 Aldric Giacomoni
;; Author: Aldric Giacomoni <[email protected]>
;; This file is not part of GNU Emacs.
;; This file is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;; This file is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this file. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
;;
;; Item delegation logic for Org GTD.
;;
;;; Code:
(require 'org)
;;;###autoload
(defun org-gtd-delegate ()
"Delegate item at point."
(interactive)
(let ((delegated-to (read-string "Who will do this? "))
(org-inhibit-logging 'note))
(org-set-property "DELEGATED_TO" delegated-to)
(org-todo "WAIT")
(org-schedule 0)
(save-excursion
(goto-char (org-log-beginning t))
(insert (format "programmatically delegated to %s\n" delegated-to)))))
(provide 'org-gtd-delegate)
;;; org-gtd-delegate.el ends here