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
23 changed files
with
132 additions
and
75 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
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 |
---|---|---|
@@ -1,34 +1,41 @@ | ||
(defun ogt-clarify-as-single-action () | ||
(execute-kbd-macro (kbd "C-c c s"))) | ||
(let ((inhibit-message t)) | ||
(execute-kbd-macro (kbd "C-c c s")))) | ||
|
||
(defun ogt-clarify-as-project () | ||
(execute-kbd-macro (kbd "C-c c p"))) | ||
(let ((inhibit-message t)) | ||
(execute-kbd-macro (kbd "C-c c p")))) | ||
|
||
(defun ogt-clarify-as-incubated-item (&optional date) | ||
(let* ((date (or date (calendar-current-date))) | ||
(year (nth 2 date)) | ||
(month (nth 0 date)) | ||
(day (nth 1 date))) | ||
(execute-kbd-macro (kbd "C-c c i %s-%s-%s RET")))) | ||
(let ((inhibit-message t)) | ||
(let* ((date (or date (calendar-current-date))) | ||
(year (nth 2 date)) | ||
(month (nth 0 date)) | ||
(day (nth 1 date))) | ||
(execute-kbd-macro (kbd "C-c c i %s-%s-%s RET"))))) | ||
|
||
(defun ogt-clarify-as-delegated-item (&optional to-whom date) | ||
(let* ((person (or to-whom "Someone")) | ||
(date (or date (calendar-current-date))) | ||
(year (nth 2 date)) | ||
(month (nth 0 date)) | ||
(day (nth 1 date))) | ||
(execute-kbd-macro (kbd (format "C-c c d %s RET %s-%s-%s RET" to-whom year month day))))) | ||
(let ((inhibit-message t)) | ||
(let* ((person (or to-whom "Someone")) | ||
(date (or date (calendar-current-date))) | ||
(year (nth 2 date)) | ||
(month (nth 0 date)) | ||
(day (nth 1 date))) | ||
(execute-kbd-macro (kbd (format "C-c c d %s RET %s-%s-%s RET" to-whom year month day)))))) | ||
|
||
(defun ogt-clarify-as-calendar-item (&optional date) | ||
(let* ((date (or date (calendar-current-date))) | ||
(year (nth 2 date)) | ||
(month (nth 0 date)) | ||
(day (nth 1 date))) | ||
(execute-kbd-macro (kbd (format "C-c c c %s-%s-%s RET" year month day))))) | ||
(let ((inhibit-message t)) | ||
(let* ((date (or date (calendar-current-date))) | ||
(year (nth 2 date)) | ||
(month (nth 0 date)) | ||
(day (nth 1 date))) | ||
(execute-kbd-macro (kbd (format "C-c c c %s-%s-%s RET" year month day)))))) | ||
|
||
(defun ogt-clarify-as-knowledge-item () | ||
(execute-kbd-macro (kbd "C-c c k"))) | ||
(let ((inhibit-message t)) | ||
(execute-kbd-macro (kbd "C-c c k")))) | ||
|
||
|
||
(defun ogt-clarify-as-trash-item () | ||
(execute-kbd-macro (kbd "C-c c t"))) | ||
(let ((inhibit-message t)) | ||
(execute-kbd-macro (kbd "C-c c t")))) |
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 |
---|---|---|
@@ -1,56 +1,65 @@ | ||
(load "test/helpers/clarifying.el") | ||
|
||
(defun ogt-capture-single-item (&optional label) | ||
(org-gtd-capture nil "i") | ||
(insert (or label "single action")) | ||
(org-capture-finalize)) | ||
(let ((inhibit-message t)) | ||
(org-gtd-capture nil "i") | ||
(insert (or label "single action")) | ||
(org-capture-finalize))) | ||
|
||
(defun ogt-capture-and-process-project (label) | ||
"LABEL is the project label." | ||
(ogt-capture-single-item label) | ||
(org-gtd-process-inbox) | ||
(execute-kbd-macro (kbd "M-> RET")) | ||
(with-current-buffer (current-buffer) | ||
(insert ogt--project-text)) | ||
(ogt-clarify-as-project)) | ||
(let ((inhibit-message t)) | ||
(ogt-capture-single-item label) | ||
(org-gtd-process-inbox) | ||
(execute-kbd-macro (kbd "M-> RET")) | ||
(with-current-buffer (current-buffer) | ||
(insert ogt--project-text)) | ||
(ogt-clarify-as-project))) | ||
|
||
(defun ogt-capture-and-process-calendar-item (label &optional date) | ||
"DATE has to be like the output of `calendar-current-date' so (MM DD YYYY)." | ||
(ogt-capture-single-item label) | ||
(org-gtd-process-inbox) | ||
(ogt-clarify-as-calendar-item date)) | ||
(let ((inhibit-message t)) | ||
(ogt-capture-single-item label) | ||
(org-gtd-process-inbox) | ||
(ogt-clarify-as-calendar-item date))) | ||
|
||
(defun ogt-capture-and-process-delegated-item (label &optional to-whom date) | ||
(ogt-capture-single-item label) | ||
(org-gtd-process-inbox) | ||
(ogt-clarify-as-delegated-item to-whom date)) | ||
(let ((inhibit-message t)) | ||
(ogt-capture-single-item label) | ||
(org-gtd-process-inbox) | ||
(ogt-clarify-as-delegated-item to-whom date))) | ||
|
||
(defun ogt-capture-and-process-incubated-item (label &optional date) | ||
"LABEL is the incubated label." | ||
(ogt-capture-single-item label) | ||
(org-gtd-process-inbox) | ||
(ogt-clarify-as-incubated-item date)) | ||
(let ((inhibit-message t)) | ||
(ogt-capture-single-item label) | ||
(org-gtd-process-inbox) | ||
(ogt-clarify-as-incubated-item date))) | ||
|
||
(defun ogt-capture-and-process-single-action (label) | ||
"LABEL is the single action label." | ||
(ogt-capture-single-item label) | ||
(org-gtd-process-inbox) | ||
(ogt-clarify-as-single-action)) | ||
(let ((inhibit-message t)) | ||
(ogt-capture-single-item label) | ||
(org-gtd-process-inbox) | ||
(ogt-clarify-as-single-action))) | ||
|
||
(defun ogt-capture-and-process-knowledge-item (label) | ||
(ogt-capture-single-item label) | ||
(org-gtd-process-inbox) | ||
(ogt-clarify-as-knowledge-item)) | ||
(let ((inhibit-message t)) | ||
(ogt-capture-single-item label) | ||
(org-gtd-process-inbox) | ||
(ogt-clarify-as-knowledge-item))) | ||
|
||
(defun ogt-capture-and-process-addition-to-project (label project-heading-simulated-input) | ||
(ogt-capture-single-item label) | ||
(org-gtd-process-inbox) | ||
(let ((inhibit-message t)) | ||
(ogt-capture-single-item label) | ||
(org-gtd-process-inbox) | ||
|
||
(with-simulated-input project-heading-simulated-input | ||
(org-gtd-organize--call | ||
org-gtd-organize-add-to-project-func))) | ||
(with-simulated-input project-heading-simulated-input | ||
(org-gtd-organize--call | ||
org-gtd-organize-add-to-project-func)))) | ||
|
||
(defun ogt-capture-and-process-trash-item (label) | ||
(ogt-capture-single-item label) | ||
(org-gtd-process-inbox) | ||
(ogt-clarify-as-trash-item)) | ||
(let ((inhibit-message t)) | ||
(ogt-capture-single-item label) | ||
(org-gtd-process-inbox) | ||
(ogt-clarify-as-trash-item))) |
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
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 |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
(describe | ||
"Processing items" | ||
|
||
:var ((inhibit-message t)) | ||
|
||
(before-each | ||
(ogt--configure-emacs) | ||
|
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
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
Oops, something went wrong.