forked from Trevoke/org-gtd.el
-
Notifications
You must be signed in to change notification settings - Fork 0
/
org-gtd-customize.el
129 lines (106 loc) · 5.07 KB
/
org-gtd-customize.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
;;; org-gtd-customize.el --- Custom variables 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:
;;
;; User-customizable options for org-gtd.
;;
;;; Code:
(defgroup org-gtd nil
"Customize the org-gtd package."
:link '(url-link "https://github.com/Trevoke/org-gtd.el")
:package-version "0.1"
:group 'org)
(defcustom org-gtd-directory "~/gtd/"
"Directory for org-gtd.
The package will use this directory for all its functionality, whether it is
building the agenda or refiling items. This is the directory where you will
find the default org-gtd file, and it is the directory where you should place
your own files if you want multiple refile targets (projects, etc.)."
:group 'org-gtd
:package-version "0.1"
:type 'directory)
(defcustom org-gtd-process-item-hooks '(org-set-tags-command)
"Enhancements to add to each item as they get processed from the inbox.
This is a list of functions that modify an org element. The default value has
one function: setting org tags on the item. Some built-in examples are
provided as options here. You can create your own functions to enhance/decorate
the items once they have been processed and add them to that list."
:group 'org-gtd
:package-version "1.0.4"
:type 'hook
:options '(org-set-tags-command org-set-effort org-priority))
(defcustom org-gtd-archive-location
(lambda ()
(let ((year (number-to-string (caddr (calendar-current-date)))))
(string-join `("gtd_archive_" ,year "::datetree/"))))
"Function to generate archive location for org gtd.
That is to say, when items get cleaned up from the active files, they will go
to whatever file/tree is generated by this function. See `org-archive-location'
to learn more about the valid values generated. Note that this will only be
the file used by the standard `org-archive' functions if you
enable command `org-gtd-mode'. If not, this will be used only by
org-gtd's archive behavior.
This function has an arity of zero. By default this generates a file
called gtd_archive_<currentyear> in `org-gtd-directory' and puts the entries
into a datetree."
:group 'org-gtd
:type 'sexp
:package-version "2.0.0")
(defcustom org-gtd-capture-templates
'(("i" "Inbox" "* %?\n%U\n\n %i")
("l" "Inbox with link" "* %?\n%U\n\n %i\n %a"))
"Capture templates to be used when adding something to the inbox.
This is a list of lists. Each list is composed of three elements:
\(KEYS DESCRIPTION TEMPLATE)
see `org-capture-templates' for the definition of each of those items.
Make the sure the template string starts with a single asterisk to denote a
top level heading, or the behavior of org-gtd will be undefined."
:group 'org-gtd
:type 'sexp
:package-version "2.0.0")
(defcustom org-gtd-agenda-custom-commands
'(("g" "Scheduled today and all NEXT items"
(
(agenda "" ((org-agenda-span 1)
(org-agenda-start-day nil)))
(todo "NEXT" ((org-agenda-overriding-header "All NEXT items")))
(todo "WAIT" ((org-agenda-todo-ignore-with-date t)
(org-agenda-overriding-header "Blocked items"))))))
"Agenda custom commands to be used for org-gtd.
The provided default is to show the agenda for today and all TODOs marked as
NEXT or WAIT. See documentation for `org-agenda-custom-commands' to customize
this further.
NOTE! The function `org-gtd-engage' assumes the 'g' shortcut exists.
It's recommended you add to this list without modifying this first entry. You
can leverage this customization feature with command `org-gtd-mode'
or by wrapping your own custom functions with `with-org-gtd-context'."
:group 'org-gtd
:type 'sexp
:package-version "2.0.0")
(defcustom org-gtd-refile-to-any-target t
"Set to true if you do not need to choose where to refile processed items.
When this is true, org-gtd will refile to the first target it finds, or creates
if necessary, without confirmation. When this is false, it will ask for
confirmation regardless of the number of options. Note that setting this to
false does not mean you can safely create new targets. See the documentation
to create new refile targets.
Defaults to true to carry over pre-2.0 behavior. You will need to change this
setting if you follow the instructions to add your own refile targets."
:group 'org-gtd
:type 'boolean
:package-version "2.0.0")
(provide 'org-gtd-customize)
;;; org-gtd-customize.el ends here