add org habits
This commit is contained in:
parent
bcf210fdfa
commit
c7961430f5
31
conf.el
31
conf.el
|
@ -274,6 +274,7 @@ event of an error or nonlocal exit."
|
||||||
(delight 'org-indent-mode)
|
(delight 'org-indent-mode)
|
||||||
(setq org-directory "~/Org")
|
(setq org-directory "~/Org")
|
||||||
(run-at-time "00:59" 3600 'org-save-all-org-buffers)
|
(run-at-time "00:59" 3600 'org-save-all-org-buffers)
|
||||||
|
(setq org-modules '(org-habit))
|
||||||
|
|
||||||
(setq org-log-into-drawer "LOGBOOK")
|
(setq org-log-into-drawer "LOGBOOK")
|
||||||
(setq org-log-done t)
|
(setq org-log-done t)
|
||||||
|
@ -468,6 +469,13 @@ event of an error or nonlocal exit."
|
||||||
(not (member (nth 2 (org-heading-components)) org-done-keywords)))
|
(not (member (nth 2 (org-heading-components)) org-done-keywords)))
|
||||||
(setq org-refile-target-verify-function 'nd/verify-refile-target)
|
(setq org-refile-target-verify-function 'nd/verify-refile-target)
|
||||||
|
|
||||||
|
(setq org-habit-graph-column 50)
|
||||||
|
|
||||||
|
(run-at-time "05:00" 86400 (lambda ()
|
||||||
|
(setq org-habit-show-habits t)
|
||||||
|
(org-agenda-redo)
|
||||||
|
(message "Habits turned on")))
|
||||||
|
|
||||||
(setq org-agenda-files '("~/Org"
|
(setq org-agenda-files '("~/Org"
|
||||||
"~/Org/projects"
|
"~/Org/projects"
|
||||||
"~/Org/reference"))
|
"~/Org/reference"))
|
||||||
|
@ -902,12 +910,13 @@ tags that do not have tags in neg-tags-list"
|
||||||
nd/is-task-p
|
nd/is-task-p
|
||||||
(not (nd/heading-has-effort-p))))
|
(not (nd/heading-has-effort-p))))
|
||||||
|
|
||||||
(defun nd/skip-non-projects ()
|
(defun nd/skip-non-projects (&optional ignore-toplevel)
|
||||||
(save-restriction
|
(save-restriction
|
||||||
(widen)
|
(widen)
|
||||||
(let ((keyword (nd/is-project-p)))
|
(let ((keyword (nd/is-project-p)))
|
||||||
(if keyword
|
(if keyword
|
||||||
(if (and nd/agenda-limit-project-toplevel
|
(if (and nd/agenda-limit-project-toplevel
|
||||||
|
(not ignore-toplevel)
|
||||||
(nd/heading-has-parent 'nd/is-todoitem-p))
|
(nd/heading-has-parent 'nd/is-todoitem-p))
|
||||||
(nd/skip-subtree))
|
(nd/skip-subtree))
|
||||||
(nd/skip-heading)))))
|
(nd/skip-heading)))))
|
||||||
|
@ -1014,10 +1023,11 @@ set as a text property for further sorting"
|
||||||
(let* ((actionable "-NA-REFILE-%inc")
|
(let* ((actionable "-NA-REFILE-%inc")
|
||||||
(periodical "PARENT_TYPE=\"periodical\"")
|
(periodical "PARENT_TYPE=\"periodical\"")
|
||||||
(iterator "PARENT_TYPE=\"iterator\"")
|
(iterator "PARENT_TYPE=\"iterator\"")
|
||||||
(task-match (concat actionable "-" periodical "/!"))
|
(habit "STYLE=\"habit\"")
|
||||||
(act-no-rep-match (concat actionable "-" periodical "-" iterator "/!"))
|
(task-match (concat actionable "-" periodical "-" habit "/!"))
|
||||||
(peri-match (concat actionable "+" periodical "-" iterator))
|
(act-no-rep-match (concat actionable "-" periodical "-" iterator "-" habit "/!"))
|
||||||
(iter-match (concat actionable "-" periodical "+" iterator "/!")))
|
(peri-match (concat actionable "+" periodical "-" iterator "-" habit))
|
||||||
|
(iter-match (concat actionable "-" periodical "+" iterator "-" habit "/!")))
|
||||||
|
|
||||||
(setq org-agenda-custom-commands
|
(setq org-agenda-custom-commands
|
||||||
`(("t"
|
`(("t"
|
||||||
|
@ -1060,7 +1070,7 @@ set as a text property for further sorting"
|
||||||
("P"
|
("P"
|
||||||
"Periodical View"
|
"Periodical View"
|
||||||
((tags
|
((tags
|
||||||
"-NA-REFILE+PARENT_TYPE=\"periodical\""
|
(concat actionable "-" iterator "+" periodical "-" habit)
|
||||||
((org-agenda-overriding-header "Periodical Status")
|
((org-agenda-overriding-header "Periodical Status")
|
||||||
(org-agenda-skip-function '(nd/skip-non-periodical-parent-headers))
|
(org-agenda-skip-function '(nd/skip-non-periodical-parent-headers))
|
||||||
(org-agenda-before-sorting-filter-function
|
(org-agenda-before-sorting-filter-function
|
||||||
|
@ -1139,17 +1149,16 @@ set as a text property for further sorting"
|
||||||
|
|
||||||
("A"
|
("A"
|
||||||
"Archivable Tasks and Projects"
|
"Archivable Tasks and Projects"
|
||||||
(,(nd/agenda-base-header-cmd (concat actionable "-" periodical)
|
(,(nd/agenda-base-header-cmd (concat actionable "-" periodical "-" habit)
|
||||||
"Archivable Atomic Tasks and Iterators"
|
"Archivable Atomic Tasks and Iterators"
|
||||||
''nd/skip-non-archivable-atomic-tasks)
|
''nd/skip-non-archivable-atomic-tasks)
|
||||||
,(nd/agenda-base-header-cmd (concat actionable)
|
,(nd/agenda-base-header-cmd (concat actionable "-" habit)
|
||||||
"Stale Tasks and Periodicals"
|
"Stale Tasks and Periodicals"
|
||||||
''nd/skip-non-stale-headings)
|
''nd/skip-non-stale-headings)
|
||||||
(tags-todo
|
(tags-todo
|
||||||
,(concat actionable "-" periodical "-" iterator)
|
,(concat actionable "-" periodical "-" iterator "-" habit)
|
||||||
((org-agenda-overriding-header
|
((org-agenda-overriding-header
|
||||||
(concat (and
|
(concat (and nd/agenda-limit-project-toplevel "Toplevel ")
|
||||||
nd/agenda-limit-project-toplevel "Toplevel ")
|
|
||||||
"Archivable Projects"))
|
"Archivable Projects"))
|
||||||
(org-agenda-skip-function '(nd/skip-non-projects))
|
(org-agenda-skip-function '(nd/skip-non-projects))
|
||||||
(org-agenda-before-sorting-filter-function
|
(org-agenda-before-sorting-filter-function
|
||||||
|
|
27
conf.org
27
conf.org
|
@ -414,6 +414,7 @@ event of an error or nonlocal exit."
|
||||||
(delight 'org-indent-mode)
|
(delight 'org-indent-mode)
|
||||||
(setq org-directory "~/Org")
|
(setq org-directory "~/Org")
|
||||||
(run-at-time "00:59" 3600 'org-save-all-org-buffers)
|
(run-at-time "00:59" 3600 'org-save-all-org-buffers)
|
||||||
|
(setq org-modules '(org-habit))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
** logging
|
** logging
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
@ -675,6 +676,15 @@ There are several types of tags I use:
|
||||||
(not (member (nth 2 (org-heading-components)) org-done-keywords)))
|
(not (member (nth 2 (org-heading-components)) org-done-keywords)))
|
||||||
(setq org-refile-target-verify-function 'nd/verify-refile-target)
|
(setq org-refile-target-verify-function 'nd/verify-refile-target)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
** habits
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(setq org-habit-graph-column 50)
|
||||||
|
|
||||||
|
(run-at-time "05:00" 86400 (lambda ()
|
||||||
|
(setq org-habit-show-habits t)
|
||||||
|
(org-agenda-redo)
|
||||||
|
(message "Habits turned on")))
|
||||||
|
#+END_SRC
|
||||||
** agenda
|
** agenda
|
||||||
*** basic config
|
*** basic config
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
@ -1315,10 +1325,11 @@ set as a text property for further sorting"
|
||||||
(let* ((actionable "-NA-REFILE-%inc")
|
(let* ((actionable "-NA-REFILE-%inc")
|
||||||
(periodical "PARENT_TYPE=\"periodical\"")
|
(periodical "PARENT_TYPE=\"periodical\"")
|
||||||
(iterator "PARENT_TYPE=\"iterator\"")
|
(iterator "PARENT_TYPE=\"iterator\"")
|
||||||
(task-match (concat actionable "-" periodical "/!"))
|
(habit "STYLE=\"habit\"")
|
||||||
(act-no-rep-match (concat actionable "-" periodical "-" iterator "/!"))
|
(task-match (concat actionable "-" periodical "-" habit "/!"))
|
||||||
(peri-match (concat actionable "+" periodical "-" iterator))
|
(act-no-rep-match (concat actionable "-" periodical "-" iterator "-" habit "/!"))
|
||||||
(iter-match (concat actionable "-" periodical "+" iterator "/!")))
|
(peri-match (concat actionable "+" periodical "-" iterator "-" habit))
|
||||||
|
(iter-match (concat actionable "-" periodical "+" iterator "-" habit "/!")))
|
||||||
|
|
||||||
(setq org-agenda-custom-commands
|
(setq org-agenda-custom-commands
|
||||||
`(("t"
|
`(("t"
|
||||||
|
@ -1361,7 +1372,7 @@ set as a text property for further sorting"
|
||||||
("P"
|
("P"
|
||||||
"Periodical View"
|
"Periodical View"
|
||||||
((tags
|
((tags
|
||||||
"-NA-REFILE+PARENT_TYPE=\"periodical\""
|
(concat actionable "-" iterator "+" periodical "-" habit)
|
||||||
((org-agenda-overriding-header "Periodical Status")
|
((org-agenda-overriding-header "Periodical Status")
|
||||||
(org-agenda-skip-function '(nd/skip-non-periodical-parent-headers))
|
(org-agenda-skip-function '(nd/skip-non-periodical-parent-headers))
|
||||||
(org-agenda-before-sorting-filter-function
|
(org-agenda-before-sorting-filter-function
|
||||||
|
@ -1440,14 +1451,14 @@ set as a text property for further sorting"
|
||||||
|
|
||||||
("A"
|
("A"
|
||||||
"Archivable Tasks and Projects"
|
"Archivable Tasks and Projects"
|
||||||
(,(nd/agenda-base-header-cmd (concat actionable "-" periodical)
|
(,(nd/agenda-base-header-cmd (concat actionable "-" periodical "-" habit)
|
||||||
"Archivable Atomic Tasks and Iterators"
|
"Archivable Atomic Tasks and Iterators"
|
||||||
''nd/skip-non-archivable-atomic-tasks)
|
''nd/skip-non-archivable-atomic-tasks)
|
||||||
,(nd/agenda-base-header-cmd (concat actionable)
|
,(nd/agenda-base-header-cmd (concat actionable "-" habit)
|
||||||
"Stale Tasks and Periodicals"
|
"Stale Tasks and Periodicals"
|
||||||
''nd/skip-non-stale-headings)
|
''nd/skip-non-stale-headings)
|
||||||
(tags-todo
|
(tags-todo
|
||||||
,(concat actionable "-" periodical "-" iterator)
|
,(concat actionable "-" periodical "-" iterator "-" habit)
|
||||||
((org-agenda-overriding-header
|
((org-agenda-overriding-header
|
||||||
(concat (and nd/agenda-limit-project-toplevel "Toplevel ")
|
(concat (and nd/agenda-limit-project-toplevel "Toplevel ")
|
||||||
"Archivable Projects"))
|
"Archivable Projects"))
|
||||||
|
|
Loading…
Reference in New Issue