Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Org GTD 3.0 mega-PR #124

Merged
merged 90 commits into from
May 4, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
1f6ac48
fix: run org-gtd--decorate-item in org-gtd-inbox-processing
mbeutelspacher Feb 26, 2023
5731418
Update test.yml
Trevoke Mar 1, 2023
17fd20f
fix: decorate all elements in a project
DerBeutlin Feb 26, 2023
2966f28
fix: mapping in correct order
mbeutelspacher Mar 6, 2023
865068e
Merge pull request #116 from DerBeutlin/fix/decorate-items
Trevoke Mar 8, 2023
fdc13dc
fix cond statement in custom agenda prefix
Trevoke Mar 8, 2023
9f73c69
Factor out inbox/default file initialization
cdlm Feb 13, 2023
89a0cf2
Ensure inbox file exists
cdlm Feb 13, 2023
2c87dae
Convert to full-fledged capture templates
cdlm Feb 13, 2023
9efbe52
Missing dependency
cdlm Feb 14, 2023
a026471
Avoid org-gtd-customize depending on org-gtd-files
cdlm Feb 14, 2023
d5d54c3
Cleanup uses of org-gtd--inbox-file
cdlm Feb 15, 2023
69c6689
Simplify overkill refactoring
cdlm Feb 19, 2023
770d399
Surface one-off organizing actions
Trevoke Feb 28, 2023
4266bad
fix missing line of code in inbox processing action
Trevoke Mar 1, 2023
19e3bd8
inbox-processing -> process
Trevoke Mar 6, 2023
dda6e13
tests pass again, which I hear matters
Trevoke Mar 8, 2023
2cd194d
refactor - move customize options
Trevoke Mar 10, 2023
3037ee6
Sketched new flow using temp processing buffer
Trevoke Mar 14, 2023
e9a00fe
adjust fixture file
Trevoke Mar 23, 2023
c23b96d
possibly more idiomatic buffer name template
Trevoke Mar 23, 2023
3319251
move defcustom declarations closer to the code
Trevoke Mar 23, 2023
196be5e
update agenda prototypes with dynamic date search
Trevoke Mar 24, 2023
f0d7f1b
wip - upgrading processing code
Trevoke Mar 24, 2023
00055d9
paving the way for clean single and batch clarifying
Trevoke Mar 27, 2023
09344fd
down to 6 failing tests
Trevoke Apr 1, 2023
197064d
down to fixing error flow
Trevoke Apr 3, 2023
240045b
last failing test, the big one
Trevoke Apr 3, 2023
b1d5f90
stupid blank lines in wip buffer
Trevoke Apr 3, 2023
cd07226
WIP (I hate myself)
Trevoke Apr 3, 2023
e2da90c
error display works as intended
Trevoke Apr 3, 2023
beda5cc
update documentation todo
Trevoke Apr 3, 2023
a9f1361
Merge branch 'org-gtd-3' into more-flexible-organization
Trevoke Apr 3, 2023
1de5c58
append org-gtd-directory to org-agenda-files
Trevoke Apr 3, 2023
ae3ff3d
add a forgotten test file
Trevoke Apr 3, 2023
b009301
refactor to allow todo-keywords to be dynamic
Trevoke Apr 7, 2023
75e5d48
can customize TODO/NEXT/etc. keywords
Trevoke Apr 7, 2023
644c258
add backward compatibility for ensure-list
Trevoke Apr 7, 2023
88406c4
some linting
Trevoke Apr 7, 2023
5fb5e04
declare this as 3.0 version; fix autoload issue
Trevoke Apr 9, 2023
2073131
support emacs 27 better
Trevoke Apr 9, 2023
1300c21
fix package autoloading, use new calendar implementation
Trevoke Apr 10, 2023
2d97101
hopefully fix 27.2 test failure
Trevoke Apr 11, 2023
bf191f6
First pass of function to upgrade calendar items to v3
Trevoke Apr 11, 2023
abc074a
Show horizons buffer on clarify if option is true
Trevoke Apr 11, 2023
04e0db9
respect option to show or not the horizons buffer
Trevoke Apr 11, 2023
b1d7605
compatibility with emacs 27.2
Trevoke Apr 12, 2023
b94085f
Incubate no longer uses SCHEDULED
Trevoke Apr 12, 2023
27032e5
Move delegated items away from SCHEDULED property
Trevoke Apr 12, 2023
430e6aa
ensure clarifying "knowledge" works
Trevoke Apr 17, 2023
8336595
sometimes I wonder how my tests work locally at all
Trevoke Apr 17, 2023
c97fa93
clean up kbd macros in processing test
Trevoke Apr 17, 2023
4b8e683
extract "capture-and-process" and "clarify" as functions
Trevoke Apr 17, 2023
5fbe386
if you don't commit new files, you're gonna have a bad time
Trevoke Apr 17, 2023
aad6d09
clean up helper code a little
Trevoke Apr 17, 2023
58dd0b7
add test for trash processing
Trevoke Apr 17, 2023
a6f159e
New decoration hook for choosing areas of focus
Trevoke Apr 17, 2023
d1f78ce
Update README.org
Trevoke Apr 19, 2023
c189cb7
Add sample doom config
chookity-pokk Apr 19, 2023
b98a8e6
Bring sample doom config into documentation / info file
Trevoke Apr 20, 2023
a6aca52
Merge branch 'chookity-pokk-update-readme'
Trevoke Apr 20, 2023
4fc2a0f
Merge branch 'master' into more-flexible-organization
Trevoke Apr 20, 2023
4603129
put sponsor request in README
Trevoke Apr 20, 2023
ffeacde
Merge branch 'master' into more-flexible-organization
Trevoke Apr 20, 2023
e175979
simplify logic: only one transient prefix now
Trevoke Apr 20, 2023
2c5104d
heavy linting effort
Trevoke Apr 21, 2023
f5cc056
more linting, start area of focus review agenda
Trevoke Apr 22, 2023
f6a5bba
signal error if area not in list
Trevoke Apr 22, 2023
b4e0c8c
try to use buttercup's :var tool
Trevoke Apr 23, 2023
45b6a0d
Prepare agenda for area of focus review
Trevoke Apr 24, 2023
17787cb
Toggle horizons buffer
Trevoke Apr 24, 2023
e2ddaed
Make flow for organizing a habit
Trevoke Apr 24, 2023
8b95c25
fix broken test
Trevoke Apr 25, 2023
e643350
Insert project templates while clarifying
Trevoke Apr 25, 2023
19658de
add functions to programmatically add GTD tasks
Trevoke Apr 25, 2023
3dd2b27
lint and rename hooks to org-gtd-organize-hooks
Trevoke Apr 26, 2023
6566106
move some functions from agenda namespace to GTD namespaces
Trevoke Apr 27, 2023
168f042
Update organize-hooks, allow easy customization
Trevoke Apr 28, 2023
3e73c10
discriminate more about when area of focus gets set
Trevoke Apr 28, 2023
dce739d
engage with all NEXT, by @-context
Trevoke Apr 30, 2023
b42a7bd
clean up logic for TODO/NEXT keywords on project tasks
Trevoke Apr 30, 2023
d4b03f2
keep track of implementation details
Trevoke May 1, 2023
a9630b1
Simplify file/refile target management
Trevoke May 1, 2023
e06d310
better data organization
Trevoke May 1, 2023
b613ed1
move habits to their own tree
Trevoke May 1, 2023
88015dd
implement 'review stuck bits' commands
Trevoke May 2, 2023
8b1778e
remove obsolete call; at this point, a drop in the sea
Trevoke May 2, 2023
7e448e8
Add org-gtd-oops to see missed events
Trevoke May 4, 2023
0814252
And this is why we have tests
Trevoke May 4, 2023
53a258e
add warning for 3.0.0beta
Trevoke May 4, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Toggle horizons buffer
Close #126
  • Loading branch information
Trevoke committed Apr 24, 2023
commit 17787cbca71c4a35c11669fd5af681687b9bec51
2 changes: 2 additions & 0 deletions changes-for-3.0.org
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
** you can customize what the functions do for each GTD action (e.g. incubate, single action, etc.)
** you can customize your TODO keywords
** areas of focus customizable variable and optional decoration hook
** horizons file customizable, can be displayed/toggled while clarifying items
suggest keybinding on keymap in doc
* required config changes
** org-gtd-process-mode is now org-gtd-clarify-mode
** org-gtd-process-map is now org-gtd-clarify-map
Expand Down
22 changes: 19 additions & 3 deletions org-gtd-clarify.el
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
;;; Code:

(require 'org-gtd-id)
(require 'org-gtd-horizons)

(defgroup org-gtd-clarify nil
"Customize the behavior when clarifying an item."
Expand All @@ -34,9 +35,10 @@
(defcustom org-gtd-clarify-show-horizons nil
"If t, show a side buffer with the higher horizons during item clarification.
The file shown can be configured in `org-gtd-horizons-file'"
:options '('right 'top 'left 'bottom 'nil)
:package-version '(org-gtd . "3.0")
:group 'org-gtd-clarify
:type 'boolean)
:type 'symbol)

(defconst org-gtd-clarify--prefix "Org-GTD WIP")

Expand Down Expand Up @@ -117,15 +119,29 @@ This function is called through the inbox clarification process."
(org-gtd-clarify-setup-windows chosen-buf-name))
(message "There are no Org-GTD WIP buffers."))))

(defun org-gtd-clarify-toggle-horizons-window ()
"Toggle the window with the horizons buffer."
(interactive)
(let* ((buffer (org-gtd--horizons-file))
(window (get-buffer-window buffer)))
(if window
(quit-window nil window)
(org-gtd-clarify--display-horizons-window))))

(defun org-gtd-clarify--display-horizons-window ()
"Display horizons window."
(let ((horizons-side (or org-gtd-clarify-show-horizons 'right)))
(display-buffer (org-gtd--horizons-file)
`(display-buffer-in-side-window . ((side . ,horizons-side))))))

(defun org-gtd-clarify-setup-windows (buffer-or-name)
"Setup clarifying windows around BUFFER-OR-NAME."
(let ((buffer (get-buffer buffer-or-name)))
(set-buffer buffer)
(display-buffer buffer)
(delete-other-windows (get-buffer-window buffer))
(if org-gtd-clarify-show-horizons
(display-buffer (org-gtd--horizons-file)
'(display-buffer-in-side-window . ((side . right)))))))
(org-gtd-clarify--display-horizons-window))))

(defun org-gtd-clarify--buffer-name (id)
"Retrieve the name of the WIP buffer for this particular ID."
Expand Down
9 changes: 0 additions & 9 deletions org-gtd-core.el
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,6 @@ your own files if you want multiple refile targets (projects, etc.)."
:package-version '(org-gtd . "0.1")
:type 'directory)

(defcustom org-gtd-horizons-file "horizons.org"
"File holding your GTD horizons.

This may get displayed during item clarification for context and focus.
This file must be in the `org-gtd-directory'."
:group 'org-gtd
:package-version '(org-gtd . "3.0")
:type 'file)

(defcustom org-gtd-next "NEXT"
"The `org-mode' keyword for an action ready to be done. Just the word."
:group 'org-gtd
Expand Down
13 changes: 0 additions & 13 deletions org-gtd-files.el
Original file line number Diff line number Diff line change
Expand Up @@ -36,26 +36,13 @@ This is the inbox. Everything goes in here when you capture it.

(defconst org-gtd-default-file-name "org-gtd-tasks")

(defconst org-gtd-file-horizons-template
"* Purpose and principles (why)
* Vision (what)
* Goals
* Areas of focus / accountabilities
")

;;;###autoload
(defun org-gtd-inbox-path ()
"Return the full path to the inbox file."
(let ((path (org-gtd--path org-gtd-inbox)))
(org-gtd--ensure-file-exists path org-gtd-inbox-template)
path))

(defun org-gtd--horizons-file ()
"Create or return the buffer to the file containing the GTD horizons."
(let ((path (f-join org-gtd-directory org-gtd-horizons-file)))
(org-gtd--ensure-file-exists path org-gtd-file-horizons-template)
(find-file-noselect path)))

(defun org-gtd--inbox-file ()
"Create or return the buffer to the GTD inbox file."
(find-file-noselect (org-gtd-inbox-path)))
Expand Down
54 changes: 54 additions & 0 deletions org-gtd-horizons.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
;;; org-gtd-horizons.el --- manage the horizons buffer -*- lexical-binding: t; coding: utf-8 -*-
;;
;; Copyright © 2019-2023 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:
;;
;; The horizons help us ensure our lives are on the right track.
;; The buffer can show up when clarifying to make sure we don't
;; get distracted.
;;
;;; Code:

(require 'org-gtd-files)

(defcustom org-gtd-horizons-file "horizons.org"
"File holding your GTD horizons.

This may get displayed during item clarification for context and focus.
This file must be in the `org-gtd-directory'."
:group 'org-gtd
:package-version '(org-gtd . "3.0")
:type 'file)

(defconst org-gtd-file-horizons-template
"* Purpose and principles (why)
* Vision (what)
* Goals
* Areas of focus / accountabilities
")

(defun org-gtd--horizons-file ()
"Create or return the buffer to the file containing the GTD horizons."
(let ((path (f-join org-gtd-directory org-gtd-horizons-file)))
(org-gtd--ensure-file-exists path org-gtd-file-horizons-template)
(find-file-noselect path)))

(provide 'org-gtd-horizons)
;;; org-gtd-horizons.el ends here
2 changes: 1 addition & 1 deletion test/horizons-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
(describe
"when org-gtd should show the horizons"

(before-each (setq org-gtd-clarify-show-horizons t))
(before-each (setq org-gtd-clarify-show-horizons 'right))
(after-each (setq org-gtd-clarify-show-horizons nil))

(describe
Expand Down