forked from Trevoke/org-gtd.el
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
125 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
;;; org-gtd-core.el --- Core code for org-gtd -*- 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: | ||
;; | ||
;; Core logic for org-gtd | ||
;; Creating this file because straight.el seems unhappy. | ||
;; | ||
;;; Code: | ||
|
||
(defconst org-gtd-inbox "inbox") | ||
(defconst org-gtd-incubated "incubated") | ||
(defconst org-gtd-projects "projects") | ||
(defconst org-gtd-actions "actions") | ||
(defconst org-gtd-delegated "delegated") | ||
(defconst org-gtd-calendar "calendar") | ||
|
||
(defconst org-gtd--properties | ||
(let ((myhash (make-hash-table :test 'equal))) | ||
(puthash org-gtd-actions "Actions" myhash) | ||
(puthash org-gtd-incubated "Incubated" myhash) | ||
(puthash org-gtd-projects "Projects" myhash) | ||
(puthash org-gtd-calendar "Calendar" myhash) | ||
myhash)) | ||
|
||
;;;###autoload | ||
(defmacro with-org-gtd-context (&rest body) | ||
"Wrap any BODY in this macro to inherit the org-gtd settings for your logic." | ||
(declare (debug t) (indent 2)) | ||
`(let* ((org-use-property-inheritance "ORG_GTD") | ||
(org-archive-location (funcall org-gtd-archive-location)) | ||
(org-capture-templates (seq-concatenate | ||
'list | ||
(org-gtd--capture-templates) | ||
org-capture-templates)) | ||
(org-refile-use-outline-path nil) | ||
(org-stuck-projects org-gtd-stuck-projects) | ||
(org-odd-levels-only nil) | ||
(org-agenda-files `(,org-gtd-directory)) | ||
(org-agenda-property-list '("DELEGATED_TO")) | ||
(org-agenda-custom-commands org-gtd-agenda-custom-commands)) | ||
(unwind-protect | ||
(progn ,@body)))) | ||
|
||
(provide 'org-gtd-core) | ||
;;; org-gtd-core.el ends here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters