clear logs for clones and clean up custom agenda cmds

This commit is contained in:
petrucci4prez 2018-06-05 09:11:35 -04:00
parent 38c96c075f
commit ba61f00f16
2 changed files with 289 additions and 128 deletions

159
conf.el
View File

@ -263,12 +263,14 @@ event of an error or nonlocal exit."
(setq ess-history-directory (setq ess-history-directory
(substitute-in-file-name "${XDG_CONFIG_HOME}/r/")) (substitute-in-file-name "${XDG_CONFIG_HOME}/r/"))
(setq org-log-done t)
(setq org-startup-indented t) (setq org-startup-indented t)
(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-log-into-drawer "LOGBOOK")
(setq org-log-done t)
(use-package org-bullets (use-package org-bullets
:ensure t :ensure t
:config :config
@ -393,12 +395,12 @@ event of an error or nonlocal exit."
("@errand" . ?e) ("@errand" . ?e)
("@home" . ?h) ("@home" . ?h)
("@work" . ?w) ("@work" . ?w)
("@travel" . ?t) ("@travel" . ?r)
(:endgroup) (:endgroup)
("#laptop" . ?L) ("#laptop" . ?l)
("#tcult" . ?T) ("#tcult" . ?t)
("#phone" . ?O) ("#phone" . ?p)
("%note" . ?n) ("%note" . ?n)
("%inc" . ?i) ("%inc" . ?i)
@ -953,14 +955,14 @@ tasks with context tags"
((> pa pb) +1) ((> pa pb) +1)
((< pa pb) -1))))) ((< pa pb) -1)))))
(defun nd/agenda-base-header-command (match header skip-fun) (defun nd/agenda-base-header-cmd (match header skip-fun)
`(tags `(tags
,match ,match
((org-agenda-overriding-header ,header) ((org-agenda-overriding-header ,header)
(org-agenda-skip-function ,skip-fun) (org-agenda-skip-function ,skip-fun)
(org-agenda-sorting-strategy '(category-keep))))) (org-agenda-sorting-strategy '(category-keep)))))
(defun nd/agenda-base-task-command (match header skip-fun &optional sort) (defun nd/agenda-base-task-cmd (match header skip-fun &optional sort)
(or sort (setq sort ''(category-keep))) (or sort (setq sort ''(category-keep)))
`(tags-todo `(tags-todo
,match ,match
@ -969,74 +971,135 @@ tasks with context tags"
(org-agenda-todo-ignore-with-date t) (org-agenda-todo-ignore-with-date t)
(org-agenda-sorting-strategy ,sort)))) (org-agenda-sorting-strategy ,sort))))
(defun nd/agenda-base-project-command (match header statuscode) (defun nd/agenda-base-proj-cmd (match header statuscode)
`(tags `(tags-todo
,match ,match
((org-agenda-overriding-header ((org-agenda-overriding-header
(concat (and nd/agenda-limit-project-toplevel "Toplevel ") ,header)) (concat (and nd/agenda-limit-project-toplevel "Toplevel ") ,header))
(org-agenda-skip-function '(nd/skip-projects-without-statuscode ,statuscode)) (org-agenda-skip-function '(nd/skip-projects-without-statuscode ,statuscode))
(org-agenda-sorting-strategy '(category-keep))))) (org-agenda-sorting-strategy '(category-keep)))))
(let ((task-match "-NA-REFILE-%inc-PARENT_TYPE=\"periodical\"/") (let* ((actionable "-NA-REFILE-%inc")
(project-match "-NA-REFILE-%inc-PARENT_TYPE=\"periodical\"-PARENT_TYPE=\"iterator\"/") (periodical "PARENT_TYPE=\"periodical\"")
(periodical-match "-NA-REFILE+PARENT_TYPE=\"periodical\"-PARENT_TYPE=\"iterator\"/") (iterator "PARENT_TYPE=\"iterator\"")
(iterator-match "-NA-REFILE-PARENT_TYPE=\"periodical\"+PARENT_TYPE=\"iterator\"/")) (task-match (concat actionable "-" periodical "/!"))
(act-no-rep-match (concat actionable "-" periodical "-" iterator "/!"))
(peri-match (concat actionable "+" periodical "-" iterator "/!"))
(iter-match (concat actionable "-" periodical "+" iterator "/!")))
(setq org-agenda-custom-commands (setq org-agenda-custom-commands
`(("t" `(("t"
"Task View" "Task View"
((agenda "" (org-agenda-skip-function '(nd/skip-headings-with-tags '("%inc")))) ((agenda "" (org-agenda-skip-function '(nd/skip-headings-with-tags '("%inc"))))
,(nd/agenda-base-task-command project-match ,(nd/agenda-base-task-cmd act-no-rep-match
"Project Tasks" "Project Tasks"
''nd/skip-non-project-tasks ''nd/skip-non-project-tasks
''(user-defined-up category-keep)) ''(user-defined-up category-keep))
,(nd/agenda-base-task-command project-match ,(nd/agenda-base-task-cmd act-no-rep-match
"Atomic Tasks" "Atomic Tasks"
''nd/skip-non-atomic-tasks))) ''nd/skip-non-atomic-tasks)))
("p" ("p"
"Project View" "Project View"
(,(nd/agenda-base-project-command project-match "Stuck Projects" :stuck) (,(nd/agenda-base-proj-cmd act-no-rep-match
,(nd/agenda-base-project-command project-match "Waiting Projects" :waiting) "Stuck Projects"
,(nd/agenda-base-project-command project-match "Active Projects" :active) :stuck)
,(nd/agenda-base-project-command project-match "Held Projects" :held))) ,(nd/agenda-base-proj-cmd act-no-rep-match
"Waiting Projects"
:waiting)
,(nd/agenda-base-proj-cmd act-no-rep-match
"Active Projects"
:active)
,(nd/agenda-base-proj-cmd act-no-rep-match
"Held Projects"
:held)))
("P" ("P"
"Periodical View" "Periodical View"
(,(nd/agenda-base-header-command periodical-match "Empty Periodicals" ''nd/skip-non-empty-periodical-parent-headers) (,(nd/agenda-base-header-cmd peri-match
,(nd/agenda-base-header-command periodical-match "Stale Periodicals" ''nd/skip-non-stale-periodical-parent-headers) "Empty Periodicals"
,(nd/agenda-base-header-command periodical-match "Fresh Periodicals" ''nd/skip-non-fresh-periodical-parent-headers))) ''nd/skip-non-empty-periodical-parent-headers)
,(nd/agenda-base-header-cmd peri-match
"Stale Periodicals"
''nd/skip-non-stale-periodical-parent-headers)
,(nd/agenda-base-header-cmd peri-match
"Fresh Periodicals"
''nd/skip-non-fresh-periodical-parent-headers)))
("i" ("i"
"Iterator View" "Iterator View"
(,(nd/agenda-base-project-command iterator-match "Stuck Iterators (require NEXT or schedule)" :stuck) (,(nd/agenda-base-proj-cmd iter-match
,(nd/agenda-base-project-command iterator-match "Empty Iterators (require new tasks)" :undone-complete) "Stuck Iterators (require NEXT or schedule)"
,(nd/agenda-base-task-command iterator-match "Uninitialized Iterators (no tasks added)" ''nd/skip-non-iterator-atomic-tasks) :stuck)
,(nd/agenda-base-project-command iterator-match "Active Iterators" :active) ,(nd/agenda-base-proj-cmd iter-match
,(nd/agenda-base-project-command iterator-match "Waiting Iterators" :waiting) "Empty Iterators (require new tasks)"
,(nd/agenda-base-project-command iterator-match "Held Iterators" :held))) :undone-complete)
,(nd/agenda-base-task-cmd iter-match
"Uninitialized Iterators (no tasks added)"
''nd/skip-non-iterator-atomic-tasks)
,(nd/agenda-base-proj-cmd iter-match
"Active Iterators"
:active)
,(nd/agenda-base-proj-cmd iter-match
"Waiting Iterators"
:waiting)
,(nd/agenda-base-proj-cmd iter-match
"Held Iterators"
:held)))
("I" ("I"
"Incubator View" "Incubator View"
((agenda "" ((org-agenda-span 7) ((agenda "" ((org-agenda-span 7)
(org-agenda-time-grid nil) (org-agenda-time-grid nil)
(org-agenda-entry-types '(:deadline :timestamp)))) (org-agenda-entry-types '(:deadline :timestamp))))
,(nd/agenda-base-task-command "-NA-REFILE+%inc/" "Incubated Tasks" ''nd/skip-non-atomic-tasks) ,(nd/agenda-base-task-cmd "-NA-REFILE+%inc/!"
,(nd/agenda-base-project-command "-NA-REFILE+%inc/" "Incubated Projects" :held))) "Incubated Tasks"
''nd/skip-non-atomic-tasks)
,(nd/agenda-base-proj-cmd "-NA-REFILE+%inc/!"
"Incubated Projects"
:held)))
("r" ("r"
"Refile and Critical Errors" "Refile and Critical Errors"
((tags "REFILE" ((tags "REFILE"
((org-agenda-overriding-header "Tasks to Refile")) ((org-agenda-overriding-header "Tasks to Refile"))
(org-tags-match-list-sublevels nil)) (org-tags-match-list-sublevels nil))
,(nd/agenda-base-task-command task-match "Discontinous Project" ''nd/skip-non-discontinuous-project-tasks) ,(nd/agenda-base-task-cmd task-match
,(nd/agenda-base-project-command project-match "Invalid Todostate" :invalid-todostate))) "Discontinous Project"
''nd/skip-non-discontinuous-project-tasks)
,(nd/agenda-base-proj-cmd act-no-rep-match
"Invalid Todostate"
:invalid-todostate)))
("e" ("e"
"Non-critical Errors" "Non-critical Errors"
(,(nd/agenda-base-header-command task-match "Undone Closed" ''nd/skip-non-undone-closed-todoitems) (,(nd/agenda-base-header-cmd task-match
,(nd/agenda-base-header-command task-match "Done Unclosed" ''nd/skip-non-done-unclosed-todoitems) "Undone Closed"
,(nd/agenda-base-project-command task-match "Undone Completed" :undone-complete) ''nd/skip-non-undone-closed-todoitems)
,(nd/agenda-base-project-command task-match "Done Incompleted" :done-incomplete))) ,(nd/agenda-base-header-cmd (concat actionable "-" periodical)
"Done Unclosed"
''nd/skip-non-done-unclosed-todoitems)
,(nd/agenda-base-proj-cmd task-match
"Undone Completed"
:undone-complete)
,(nd/agenda-base-proj-cmd (concat actionable "-" periodical)
"Done Incompleted"
:done-incomplete)))
("A" ("A"
"Archivable Tasks and Projects" "Archivable Tasks and Projects"
(,(nd/agenda-base-header-command task-match "Archivable Atomic Tasks" ''nd/skip-non-archivable-atomic-tasks) (,(nd/agenda-base-header-cmd (concat actionable "-" periodical)
,(nd/agenda-base-header-command task-match "Stale Tasks" ''nd/skip-non-stale-headings) "Archivable Atomic Tasks"
,(nd/agenda-base-project-command iterator-match "Archivable Iterators" :archivable) ''nd/skip-non-archivable-atomic-tasks)
,(nd/agenda-base-project-command project-match "Archivable Projects" :archivable)))))) ,(nd/agenda-base-header-cmd (concat actionable "-" periodical)
"Stale Tasks"
''nd/skip-non-stale-headings)
,(nd/agenda-base-proj-cmd (concat actionable "-" periodical "+" iterator)
"Archivable Iterators"
:archivable)
,(nd/agenda-base-proj-cmd (concat actionable "-" periodical "-" iterator)
"Archivable Projects"
:archivable))))))
(setq org-agenda-start-on-weekday 0) (setq org-agenda-start-on-weekday 0)
(setq org-agenda-span 'day) (setq org-agenda-span 'day)
@ -1100,6 +1163,7 @@ and reverts all todo keywords to TODO"
(org-forward-heading-same-level 1 t) (org-forward-heading-same-level 1 t)
(org-reset-checkbox-state-subtree) (org-reset-checkbox-state-subtree)
(nd/mark-subtree-keyword "TODO") (nd/mark-subtree-keyword "TODO")
(call-interactively 'nd/org-log-delete)
(org-cycle) (org-cycle)
;; clone reset tree again if we need more than one clone ;; clone reset tree again if we need more than one clone
(if (> n 1) (if (> n 1)
@ -1110,6 +1174,21 @@ and reverts all todo keywords to TODO"
(org-cycle)))))) (org-cycle))))))
(error (message "%s" (error-message-string err)))))) (error (message "%s" (error-message-string err))))))
(defun nd/org-log-delete ()
"Delete logbook drawer of subtree."
(interactive)
(save-excursion
(goto-char (org-log-beginning))
(when (save-excursion
(save-match-data
(beginning-of-line 0)
(search-forward-regexp org-drawer-regexp)
(goto-char (match-beginning 1))
(looking-at "LOGBOOK")))
(org-mark-element)
(delete-region (region-beginning) (region-end))
(org-remove-empty-drawer-at (point)))))
(use-package calfw-org (use-package calfw-org
:init :init
:ensure t :ensure t

168
conf.org
View File

@ -401,12 +401,16 @@ event of an error or nonlocal exit."
* org-mode * org-mode
** basic ** basic
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(setq org-log-done t)
(setq org-startup-indented t) (setq org-startup-indented t)
(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)
#+END_SRC #+END_SRC
** logging
#+BEGIN_SRC emacs-lisp
(setq org-log-into-drawer "LOGBOOK")
(setq org-log-done t)
#+END_SRC
** ui ** ui
*** bullets *** bullets
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
@ -580,12 +584,12 @@ There are several types of tags I use:
("@errand" . ?e) ("@errand" . ?e)
("@home" . ?h) ("@home" . ?h)
("@work" . ?w) ("@work" . ?w)
("@travel" . ?t) ("@travel" . ?r)
(:endgroup) (:endgroup)
("#laptop" . ?L) ("#laptop" . ?l)
("#tcult" . ?T) ("#tcult" . ?t)
("#phone" . ?O) ("#phone" . ?p)
("%note" . ?n) ("%note" . ?n)
("%inc" . ?i) ("%inc" . ?i)
@ -1217,7 +1221,7 @@ when the iterator will run out
(mapcar (lambda(tag) (concat "-" tag)) context-tags)) (mapcar (lambda(tag) (concat "-" tag)) context-tags))
(org-agenda-filter-apply org-agenda-tag-filter 'tag))) (org-agenda-filter-apply org-agenda-tag-filter 'tag)))
#+END_SRC #+END_SRC
*** custom commands *** agenda aesthetics
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(setq org-agenda-tags-todo-honor-ignore-options t) (setq org-agenda-tags-todo-honor-ignore-options t)
@ -1241,15 +1245,17 @@ when the iterator will run out
(cond ((or (null pa) (null pb)) nil) (cond ((or (null pa) (null pb)) nil)
((> pa pb) +1) ((> pa pb) +1)
((< pa pb) -1))))) ((< pa pb) -1)))))
#+END_SRC
(defun nd/agenda-base-header-command (match header skip-fun) *** custom commands
#+BEGIN_SRC emacs-lisp
(defun nd/agenda-base-header-cmd (match header skip-fun)
`(tags `(tags
,match ,match
((org-agenda-overriding-header ,header) ((org-agenda-overriding-header ,header)
(org-agenda-skip-function ,skip-fun) (org-agenda-skip-function ,skip-fun)
(org-agenda-sorting-strategy '(category-keep))))) (org-agenda-sorting-strategy '(category-keep)))))
(defun nd/agenda-base-task-command (match header skip-fun &optional sort) (defun nd/agenda-base-task-cmd (match header skip-fun &optional sort)
(or sort (setq sort ''(category-keep))) (or sort (setq sort ''(category-keep)))
`(tags-todo `(tags-todo
,match ,match
@ -1258,75 +1264,135 @@ when the iterator will run out
(org-agenda-todo-ignore-with-date t) (org-agenda-todo-ignore-with-date t)
(org-agenda-sorting-strategy ,sort)))) (org-agenda-sorting-strategy ,sort))))
(defun nd/agenda-base-project-command (match header statuscode) (defun nd/agenda-base-proj-cmd (match header statuscode)
`(tags `(tags-todo
,match ,match
((org-agenda-overriding-header ((org-agenda-overriding-header
(concat (and nd/agenda-limit-project-toplevel "Toplevel ") ,header)) (concat (and nd/agenda-limit-project-toplevel "Toplevel ") ,header))
(org-agenda-skip-function '(nd/skip-projects-without-statuscode ,statuscode)) (org-agenda-skip-function '(nd/skip-projects-without-statuscode ,statuscode))
(org-agenda-sorting-strategy '(category-keep))))) (org-agenda-sorting-strategy '(category-keep)))))
(let ((task-match "-NA-REFILE-%inc-PARENT_TYPE=\"periodical\"/") (let* ((actionable "-NA-REFILE-%inc")
(project-match "-NA-REFILE-%inc-PARENT_TYPE=\"periodical\"-PARENT_TYPE=\"iterator\"/") (periodical "PARENT_TYPE=\"periodical\"")
(periodical-match "-NA-REFILE+PARENT_TYPE=\"periodical\"-PARENT_TYPE=\"iterator\"/") (iterator "PARENT_TYPE=\"iterator\"")
(iterator-match "-NA-REFILE-PARENT_TYPE=\"periodical\"+PARENT_TYPE=\"iterator\"/")) (task-match (concat actionable "-" periodical "/!"))
(act-no-rep-match (concat actionable "-" periodical "-" iterator "/!"))
(peri-match (concat actionable "+" periodical "-" iterator "/!"))
(iter-match (concat actionable "-" periodical "+" iterator "/!")))
(setq org-agenda-custom-commands (setq org-agenda-custom-commands
`(("t" `(("t"
"Task View" "Task View"
((agenda "" (org-agenda-skip-function '(nd/skip-headings-with-tags '("%inc")))) ((agenda "" (org-agenda-skip-function '(nd/skip-headings-with-tags '("%inc"))))
,(nd/agenda-base-task-command project-match ,(nd/agenda-base-task-cmd act-no-rep-match
"Project Tasks" "Project Tasks"
''nd/skip-non-project-tasks ''nd/skip-non-project-tasks
''(user-defined-up category-keep)) ''(user-defined-up category-keep))
,(nd/agenda-base-task-command project-match ,(nd/agenda-base-task-cmd act-no-rep-match
"Atomic Tasks" "Atomic Tasks"
''nd/skip-non-atomic-tasks))) ''nd/skip-non-atomic-tasks)))
("p" ("p"
"Project View" "Project View"
(,(nd/agenda-base-project-command project-match "Stuck Projects" :stuck) (,(nd/agenda-base-proj-cmd act-no-rep-match
,(nd/agenda-base-project-command project-match "Waiting Projects" :waiting) "Stuck Projects"
,(nd/agenda-base-project-command project-match "Active Projects" :active) :stuck)
,(nd/agenda-base-project-command project-match "Held Projects" :held))) ,(nd/agenda-base-proj-cmd act-no-rep-match
"Waiting Projects"
:waiting)
,(nd/agenda-base-proj-cmd act-no-rep-match
"Active Projects"
:active)
,(nd/agenda-base-proj-cmd act-no-rep-match
"Held Projects"
:held)))
("P" ("P"
"Periodical View" "Periodical View"
(,(nd/agenda-base-header-command periodical-match "Empty Periodicals" ''nd/skip-non-empty-periodical-parent-headers) (,(nd/agenda-base-header-cmd peri-match
,(nd/agenda-base-header-command periodical-match "Stale Periodicals" ''nd/skip-non-stale-periodical-parent-headers) "Empty Periodicals"
,(nd/agenda-base-header-command periodical-match "Fresh Periodicals" ''nd/skip-non-fresh-periodical-parent-headers))) ''nd/skip-non-empty-periodical-parent-headers)
,(nd/agenda-base-header-cmd peri-match
"Stale Periodicals"
''nd/skip-non-stale-periodical-parent-headers)
,(nd/agenda-base-header-cmd peri-match
"Fresh Periodicals"
''nd/skip-non-fresh-periodical-parent-headers)))
("i" ("i"
"Iterator View" "Iterator View"
(,(nd/agenda-base-project-command iterator-match "Stuck Iterators (require NEXT or schedule)" :stuck) (,(nd/agenda-base-proj-cmd iter-match
,(nd/agenda-base-project-command iterator-match "Empty Iterators (require new tasks)" :undone-complete) "Stuck Iterators (require NEXT or schedule)"
,(nd/agenda-base-task-command iterator-match "Uninitialized Iterators (no tasks added)" ''nd/skip-non-iterator-atomic-tasks) :stuck)
,(nd/agenda-base-project-command iterator-match "Active Iterators" :active) ,(nd/agenda-base-proj-cmd iter-match
,(nd/agenda-base-project-command iterator-match "Waiting Iterators" :waiting) "Empty Iterators (require new tasks)"
,(nd/agenda-base-project-command iterator-match "Held Iterators" :held))) :undone-complete)
,(nd/agenda-base-task-cmd iter-match
"Uninitialized Iterators (no tasks added)"
''nd/skip-non-iterator-atomic-tasks)
,(nd/agenda-base-proj-cmd iter-match
"Active Iterators"
:active)
,(nd/agenda-base-proj-cmd iter-match
"Waiting Iterators"
:waiting)
,(nd/agenda-base-proj-cmd iter-match
"Held Iterators"
:held)))
("I" ("I"
"Incubator View" "Incubator View"
((agenda "" ((org-agenda-span 7) ((agenda "" ((org-agenda-span 7)
(org-agenda-time-grid nil) (org-agenda-time-grid nil)
(org-agenda-entry-types '(:deadline :timestamp)))) (org-agenda-entry-types '(:deadline :timestamp))))
,(nd/agenda-base-task-command "-NA-REFILE+%inc/" "Incubated Tasks" ''nd/skip-non-atomic-tasks) ,(nd/agenda-base-task-cmd "-NA-REFILE+%inc/!"
,(nd/agenda-base-project-command "-NA-REFILE+%inc/" "Incubated Projects" :held))) "Incubated Tasks"
''nd/skip-non-atomic-tasks)
,(nd/agenda-base-proj-cmd "-NA-REFILE+%inc/!"
"Incubated Projects"
:held)))
("r" ("r"
"Refile and Critical Errors" "Refile and Critical Errors"
((tags "REFILE" ((tags "REFILE"
((org-agenda-overriding-header "Tasks to Refile")) ((org-agenda-overriding-header "Tasks to Refile"))
(org-tags-match-list-sublevels nil)) (org-tags-match-list-sublevels nil))
,(nd/agenda-base-task-command task-match "Discontinous Project" ''nd/skip-non-discontinuous-project-tasks) ,(nd/agenda-base-task-cmd task-match
,(nd/agenda-base-project-command project-match "Invalid Todostate" :invalid-todostate))) "Discontinous Project"
''nd/skip-non-discontinuous-project-tasks)
,(nd/agenda-base-proj-cmd act-no-rep-match
"Invalid Todostate"
:invalid-todostate)))
("e" ("e"
"Non-critical Errors" "Non-critical Errors"
(,(nd/agenda-base-header-command task-match "Undone Closed" ''nd/skip-non-undone-closed-todoitems) (,(nd/agenda-base-header-cmd task-match
,(nd/agenda-base-header-command task-match "Done Unclosed" ''nd/skip-non-done-unclosed-todoitems) "Undone Closed"
,(nd/agenda-base-project-command task-match "Undone Completed" :undone-complete) ''nd/skip-non-undone-closed-todoitems)
,(nd/agenda-base-project-command task-match "Done Incompleted" :done-incomplete))) ,(nd/agenda-base-header-cmd (concat actionable "-" periodical)
"Done Unclosed"
''nd/skip-non-done-unclosed-todoitems)
,(nd/agenda-base-proj-cmd task-match
"Undone Completed"
:undone-complete)
,(nd/agenda-base-proj-cmd (concat actionable "-" periodical)
"Done Incompleted"
:done-incomplete)))
("A" ("A"
"Archivable Tasks and Projects" "Archivable Tasks and Projects"
(,(nd/agenda-base-header-command task-match "Archivable Atomic Tasks" ''nd/skip-non-archivable-atomic-tasks) (,(nd/agenda-base-header-cmd (concat actionable "-" periodical)
,(nd/agenda-base-header-command task-match "Stale Tasks" ''nd/skip-non-stale-headings) "Archivable Atomic Tasks"
,(nd/agenda-base-project-command iterator-match "Archivable Iterators" :archivable) ''nd/skip-non-archivable-atomic-tasks)
,(nd/agenda-base-project-command project-match "Archivable Projects" :archivable)))))) ,(nd/agenda-base-header-cmd (concat actionable "-" periodical)
"Stale Tasks"
''nd/skip-non-stale-headings)
,(nd/agenda-base-proj-cmd (concat actionable "-" periodical "+" iterator)
"Archivable Iterators"
:archivable)
,(nd/agenda-base-proj-cmd (concat actionable "-" periodical "-" iterator)
"Archivable Projects"
:archivable))))))
#+END_SRC #+END_SRC
*** views *** views
**** calendar display **** calendar display
@ -1402,6 +1468,7 @@ and reverts all todo keywords to TODO"
(org-forward-heading-same-level 1 t) (org-forward-heading-same-level 1 t)
(org-reset-checkbox-state-subtree) (org-reset-checkbox-state-subtree)
(nd/mark-subtree-keyword "TODO") (nd/mark-subtree-keyword "TODO")
(call-interactively 'nd/org-log-delete)
(org-cycle) (org-cycle)
;; clone reset tree again if we need more than one clone ;; clone reset tree again if we need more than one clone
(if (> n 1) (if (> n 1)
@ -1411,6 +1478,21 @@ and reverts all todo keywords to TODO"
(org-forward-heading-same-level 1 t) (org-forward-heading-same-level 1 t)
(org-cycle)))))) (org-cycle))))))
(error (message "%s" (error-message-string err)))))) (error (message "%s" (error-message-string err))))))
(defun nd/org-log-delete ()
"Delete logbook drawer of subtree."
(interactive)
(save-excursion
(goto-char (org-log-beginning))
(when (save-excursion
(save-match-data
(beginning-of-line 0)
(search-forward-regexp org-drawer-regexp)
(goto-char (match-beginning 1))
(looking-at "LOGBOOK")))
(org-mark-element)
(delete-region (region-beginning) (region-end))
(org-remove-empty-drawer-at (point)))))
#+END_SRC #+END_SRC
** caldav ** caldav
+BEGIN_SRC emacs-lisp +BEGIN_SRC emacs-lisp