rearrange and update to emacs 26
This commit is contained in:
parent
1186d5d7cb
commit
027d08e8f3
20
conf.el
20
conf.el
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
(setq inhibit-startup-screen t)
|
(setq inhibit-startup-screen t)
|
||||||
|
|
||||||
(tool-bar-mode -1)
|
(tool-bar-mode -1)
|
||||||
|
@ -70,7 +69,6 @@
|
||||||
|
|
||||||
(global-set-key (kbd "<f1>") 'org-agenda)
|
(global-set-key (kbd "<f1>") 'org-agenda)
|
||||||
(global-set-key (kbd "<f2>") 'org-capture)
|
(global-set-key (kbd "<f2>") 'org-capture)
|
||||||
(global-set-key (kbd "<f3>") 'org-iswitchb)
|
|
||||||
|
|
||||||
(use-package delight
|
(use-package delight
|
||||||
:ensure t)
|
:ensure t)
|
||||||
|
@ -263,12 +261,13 @@ event of an error or nonlocal exit."
|
||||||
(load "ess-site")
|
(load "ess-site")
|
||||||
(setq ess-history-file "session.Rhistory")
|
(setq ess-history-file "session.Rhistory")
|
||||||
(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-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)
|
||||||
|
|
||||||
(use-package org-bullets
|
(use-package org-bullets
|
||||||
:ensure t
|
:ensure t
|
||||||
|
@ -932,10 +931,10 @@ tasks with context tags"
|
||||||
(setq org-agenda-tags-todo-honor-ignore-options t)
|
(setq org-agenda-tags-todo-honor-ignore-options t)
|
||||||
|
|
||||||
(setq org-agenda-prefix-format
|
(setq org-agenda-prefix-format
|
||||||
'((agenda . " %-12:c%-7:e%?-12t% s")
|
'((agenda . " %-12:c %-5:e %?-12t% s")
|
||||||
(timeline . " % s")
|
(timeline . " % s")
|
||||||
(todo . " %-12:c")
|
(todo . " %-12:c")
|
||||||
(tags . " %-12:c%-7:e")
|
(tags . " %-12:c %-5:e ")
|
||||||
(search . " %-12:c")))
|
(search . " %-12:c")))
|
||||||
|
|
||||||
(defconst nd/org-agenda-todo-sort-order '("NEXT" "WAIT" "HOLD" "TODO"))
|
(defconst nd/org-agenda-todo-sort-order '("NEXT" "WAIT" "HOLD" "TODO"))
|
||||||
|
@ -1028,8 +1027,8 @@ tasks with context tags"
|
||||||
"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-command task-match "Undone Closed" ''nd/skip-non-undone-closed-todoitems)
|
||||||
,(nd/agenda-base-header-command task-match "Done Unclosed" ''nd/skip-non-done-unclosed-todoitems)
|
,(nd/agenda-base-header-command task-match "Done Unclosed" ''nd/skip-non-done-unclosed-todoitems)
|
||||||
,(nd/agenda-base-project-command project-match "Undone Completed" :undone-complete)
|
,(nd/agenda-base-project-command task-match "Undone Completed" :undone-complete)
|
||||||
,(nd/agenda-base-project-command project-match "Done Incompleted" :done-incomplete)))
|
,(nd/agenda-base-project-command task-match "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-command task-match "Archivable Atomic Tasks" ''nd/skip-non-archivable-atomic-tasks)
|
||||||
|
@ -1039,9 +1038,10 @@ tasks with context tags"
|
||||||
|
|
||||||
(setq org-agenda-start-on-weekday 0)
|
(setq org-agenda-start-on-weekday 0)
|
||||||
(setq org-agenda-span 'day)
|
(setq org-agenda-span 'day)
|
||||||
(setq org-agenda-time-grid (quote ((daily today remove-match)
|
(setq org-agenda-current-time-string "### -- NOW -- ###")
|
||||||
#("----------------" 0 16 (org-heading t))
|
(setq org-agenda-time-grid '((daily today remove-match)
|
||||||
(0900 1100 1300 1500 1700))))
|
(0800 1000 1200 1200 1400 1600)
|
||||||
|
"......" "-----------------"))
|
||||||
|
|
||||||
(add-hook 'org-finalize-agenda-hook 'place-agenda-tags)
|
(add-hook 'org-finalize-agenda-hook 'place-agenda-tags)
|
||||||
(defun place-agenda-tags ()
|
(defun place-agenda-tags ()
|
||||||
|
|
491
conf.org
491
conf.org
|
@ -113,7 +113,6 @@ These are commands that should work in any mode. Make the assumption that functi
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(global-set-key (kbd "<f1>") 'org-agenda)
|
(global-set-key (kbd "<f1>") 'org-agenda)
|
||||||
(global-set-key (kbd "<f2>") 'org-capture)
|
(global-set-key (kbd "<f2>") 'org-capture)
|
||||||
(global-set-key (kbd "<f3>") 'org-iswitchb)
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
* printing
|
* printing
|
||||||
**
|
**
|
||||||
|
@ -406,6 +405,7 @@ event of an error or nonlocal exit."
|
||||||
(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)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
** ui
|
** ui
|
||||||
*** bullets
|
*** bullets
|
||||||
|
@ -804,154 +804,154 @@ Returns t if heading has certain relationship to other headings
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
**** project level testing
|
**** project level testing
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(defconst nd/project-invalid-todostates
|
(defconst nd/project-invalid-todostates
|
||||||
'("WAIT" "NEXT")
|
'("WAIT" "NEXT")
|
||||||
"projects cannot have these todostates")
|
"projects cannot have these todostates")
|
||||||
|
|
||||||
(defconst nd/project-statuscodes
|
(defconst nd/project-statuscodes
|
||||||
'(:archivable
|
'(:archivable
|
||||||
:complete
|
:complete
|
||||||
:stuck
|
:stuck
|
||||||
:held
|
:held
|
||||||
:waiting
|
:waiting
|
||||||
:active
|
:active
|
||||||
:done-incomplete
|
:done-incomplete
|
||||||
:undone-complete
|
:undone-complete
|
||||||
:invalid-todostate
|
:invalid-todostate
|
||||||
:scheduled-project)
|
:scheduled-project)
|
||||||
"list of statuscodes to be used in assessing projects
|
"list of statuscodes to be used in assessing projects
|
||||||
Note they are listed in order of priority (eg items further
|
Note they are listed in order of priority (eg items further
|
||||||
down the list override higher items")
|
down the list override higher items")
|
||||||
|
|
||||||
(defmacro nd/compare-statuscodes (operator statuscode-1 statuscode-2)
|
(defmacro nd/compare-statuscodes (operator statuscode-1 statuscode-2)
|
||||||
"syntactic suger to compare statuscodes by position"
|
"syntactic suger to compare statuscodes by position"
|
||||||
`(,operator (position ,statuscode-1 nd/project-statuscodes)
|
`(,operator (position ,statuscode-1 nd/project-statuscodes)
|
||||||
(position ,statuscode-2 nd/project-statuscodes)))
|
(position ,statuscode-2 nd/project-statuscodes)))
|
||||||
|
|
||||||
(defun nd/status< (statuscode-1 statuscode-2)
|
(defun nd/status< (statuscode-1 statuscode-2)
|
||||||
"returns t is statuscode-1 is lesser priority than statuscode-2"
|
"returns t is statuscode-1 is lesser priority than statuscode-2"
|
||||||
(nd/compare-statuscodes < statuscode-1 statuscode-2))
|
(nd/compare-statuscodes < statuscode-1 statuscode-2))
|
||||||
|
|
||||||
(defun nd/status> (statuscode-1 statuscode-2)
|
(defun nd/status> (statuscode-1 statuscode-2)
|
||||||
"returns t is statuscode-1 is greater priority than statuscode-2"
|
"returns t is statuscode-1 is greater priority than statuscode-2"
|
||||||
(nd/compare-statuscodes > statuscode-1 statuscode-2))
|
(nd/compare-statuscodes > statuscode-1 statuscode-2))
|
||||||
|
|
||||||
(defun nd/status= (statuscode-1 statuscode-2)
|
(defun nd/status= (statuscode-1 statuscode-2)
|
||||||
"returns t is statuscode-1 is equal priority than statuscode-2"
|
"returns t is statuscode-1 is equal priority than statuscode-2"
|
||||||
(nd/compare-statuscodes = statuscode-1 statuscode-2))
|
(nd/compare-statuscodes = statuscode-1 statuscode-2))
|
||||||
|
|
||||||
(defun nd/descend-into-project ()
|
(defun nd/descend-into-project ()
|
||||||
"returns statuscode of project and recursively descends into subprojects"
|
"returns statuscode of project and recursively descends into subprojects"
|
||||||
(let ((project-state :archivable)
|
(let ((project-state :archivable)
|
||||||
(previous-point))
|
(previous-point))
|
||||||
(save-excursion
|
(save-excursion
|
||||||
|
(setq previous-point (point))
|
||||||
|
(outline-next-heading)
|
||||||
|
;; loop breaks if active or higher priority
|
||||||
|
;; note that all invalid statuscodes are higher
|
||||||
|
;; thus this function will only return the first
|
||||||
|
;; encountered error
|
||||||
|
(while (and (nd/status< project-state :active)
|
||||||
|
(> (point) previous-point))
|
||||||
|
(let ((keyword (nd/is-todoitem-p)))
|
||||||
|
(if keyword
|
||||||
|
(let ((cur-state
|
||||||
|
(if (nd/heading-has-children 'nd/is-todoitem-p)
|
||||||
|
(cond ((member keyword nd/project-invalid-todostates) :invalid-todostate)
|
||||||
|
((nd/is-scheduled-heading-p) :scheduled-project)
|
||||||
|
((equal keyword "CANC") (if (nd/is-archivable-heading-p)
|
||||||
|
:archivable
|
||||||
|
:complete))
|
||||||
|
((equal keyword "HOLD") :held)
|
||||||
|
(t (let ((child-statuscode (nd/descend-into-project)))
|
||||||
|
(cond ((equal keyword "TODO")
|
||||||
|
(if (nd/status> child-statuscode :complete)
|
||||||
|
child-statuscode
|
||||||
|
:undone-complete))
|
||||||
|
(t (case child-statuscode
|
||||||
|
(:complete :complete)
|
||||||
|
(:archivable (if (nd/is-archivable-heading-p)
|
||||||
|
:archivable
|
||||||
|
:complete))
|
||||||
|
(t (if (nd/status= child-statuscode :complete)
|
||||||
|
:complete
|
||||||
|
:done-incomplete))))))))
|
||||||
|
(cond ((equal keyword "HOLD") :held)
|
||||||
|
((equal keyword "WAIT") :waiting)
|
||||||
|
((equal keyword "NEXT") :active)
|
||||||
|
((and (equal keyword "TODO") (nd/is-scheduled-heading-p)) :active)
|
||||||
|
((equal keyword "TODO") :stuck)
|
||||||
|
((nd/is-archivable-heading-p) :archivable)
|
||||||
|
(t :complete)))))
|
||||||
|
(if (nd/status> cur-state project-state)
|
||||||
|
(setq project-state cur-state)))))
|
||||||
(setq previous-point (point))
|
(setq previous-point (point))
|
||||||
(outline-next-heading)
|
(org-forward-heading-same-level 1 t)))
|
||||||
;; loop breaks if active or higher priority
|
project-state))
|
||||||
;; note that all invalid statuscodes are higher
|
|
||||||
;; thus this function will only return the first
|
|
||||||
;; encountered error
|
|
||||||
(while (and (nd/status< project-state :active)
|
|
||||||
(> (point) previous-point))
|
|
||||||
(let ((keyword (nd/is-todoitem-p)))
|
|
||||||
(if keyword
|
|
||||||
(let ((cur-state
|
|
||||||
(if (nd/heading-has-children 'nd/is-todoitem-p)
|
|
||||||
(cond ((member keyword nd/project-invalid-todostates) :invalid-todostate)
|
|
||||||
((nd/is-scheduled-heading-p) :scheduled-project)
|
|
||||||
((equal keyword "CANC") (if (nd/is-archivable-heading-p)
|
|
||||||
:archivable
|
|
||||||
:complete))
|
|
||||||
((equal keyword "HOLD") :held)
|
|
||||||
(t (let ((child-statuscode (nd/descend-into-project)))
|
|
||||||
(cond ((equal keyword "TODO")
|
|
||||||
(if (nd/status> child-statuscode :complete)
|
|
||||||
child-statuscode
|
|
||||||
:undone-complete))
|
|
||||||
(t (case child-statuscode
|
|
||||||
(:complete :complete)
|
|
||||||
(:archivable (if (nd/is-archivable-heading-p)
|
|
||||||
:archivable
|
|
||||||
:complete))
|
|
||||||
(t (if (nd/status= child-statuscode :complete)
|
|
||||||
:complete
|
|
||||||
:done-incomplete))))))))
|
|
||||||
(cond ((equal keyword "HOLD") :held)
|
|
||||||
((equal keyword "WAIT") :waiting)
|
|
||||||
((equal keyword "NEXT") :active)
|
|
||||||
((and (equal keyword "TODO") (nd/is-scheduled-heading-p)) :active)
|
|
||||||
((equal keyword "TODO") :stuck)
|
|
||||||
((nd/is-archivable-heading-p) :archivable)
|
|
||||||
(t :complete)))))
|
|
||||||
(if (nd/status> cur-state project-state)
|
|
||||||
(setq project-state cur-state)))))
|
|
||||||
(setq previous-point (point))
|
|
||||||
(org-forward-heading-same-level 1 t)))
|
|
||||||
project-state))
|
|
||||||
|
|
||||||
(defmacro nd/is-project-keyword-status-p (test-keyword operator statuscode)
|
(defmacro nd/is-project-keyword-status-p (test-keyword operator statuscode)
|
||||||
"tests if a project has toplevel heading of top-keyword and
|
"tests if a project has toplevel heading of top-keyword and
|
||||||
child status equal to status code and returns keyword if
|
child status equal to status code and returns keyword if
|
||||||
both are true"
|
both are true"
|
||||||
`(and
|
`(and
|
||||||
(equal ,keyword ,test-keyword)
|
(equal ,keyword ,test-keyword)
|
||||||
(nd/compare-statuscodes ,operator (nd/descend-into-project) ,statuscode)))
|
(nd/compare-statuscodes ,operator (nd/descend-into-project) ,statuscode)))
|
||||||
|
|
||||||
(defun nd/is-project-status-p (statuscode)
|
(defun nd/is-project-status-p (statuscode)
|
||||||
"Returns t if project matches statuscode given.
|
"Returns t if project matches statuscode given.
|
||||||
Note that this assumes the headline being tested is a valid project"
|
Note that this assumes the headline being tested is a valid project"
|
||||||
(case statuscode
|
(case statuscode
|
||||||
;; projects closed more than 30 days ago
|
;; projects closed more than 30 days ago
|
||||||
;; note CANC overrides all subtasks/projects
|
;; note CANC overrides all subtasks/projects
|
||||||
(:archivable
|
(:archivable
|
||||||
(if (nd/is-archivable-heading-p)
|
(if (nd/is-archivable-heading-p)
|
||||||
(or (equal keyword "CANC")
|
(or (equal keyword "CANC")
|
||||||
(nd/is-project-keyword-status-p "DONE" = :archivable))))
|
(nd/is-project-keyword-status-p "DONE" = :archivable))))
|
||||||
|
|
||||||
;; projects closed less than 30 days ago
|
;; projects closed less than 30 days ago
|
||||||
;; note CANC overrides all subtasks/projects
|
;; note CANC overrides all subtasks/projects
|
||||||
(:complete
|
(:complete
|
||||||
(if (not (nd/is-archivable-heading-p))
|
(if (not (nd/is-archivable-heading-p))
|
||||||
(or (equal keyword "CANC")
|
(or (equal keyword "CANC")
|
||||||
(nd/is-project-keyword-status-p "DONE" = :complete))))
|
(nd/is-project-keyword-status-p "DONE" = :complete))))
|
||||||
|
|
||||||
;; projects with no waiting, held, or active components
|
;; projects with no waiting, held, or active components
|
||||||
(:stuck
|
(:stuck
|
||||||
(nd/is-project-keyword-status-p "TODO" = :stuck))
|
(nd/is-project-keyword-status-p "TODO" = :stuck))
|
||||||
|
|
||||||
;; held projects
|
;; held projects
|
||||||
;; note toplevel HOLD overrides all subtasks/projects
|
;; note toplevel HOLD overrides all subtasks/projects
|
||||||
(:held
|
(:held
|
||||||
(or (equal keyword "HOLD")
|
(or (equal keyword "HOLD")
|
||||||
(nd/is-project-keyword-status-p "TODO" = :held)))
|
(nd/is-project-keyword-status-p "TODO" = :held)))
|
||||||
|
|
||||||
;; projects with at least one waiting component
|
;; projects with at least one waiting component
|
||||||
(:waiting
|
(:waiting
|
||||||
(nd/is-project-keyword-status-p "TODO" = :waiting))
|
(nd/is-project-keyword-status-p "TODO" = :waiting))
|
||||||
|
|
||||||
;; projects with at least one active component
|
;; projects with at least one active component
|
||||||
(:active
|
(:active
|
||||||
(nd/is-project-keyword-status-p "TODO" = :active))
|
(nd/is-project-keyword-status-p "TODO" = :active))
|
||||||
|
|
||||||
;; projects marked DONE but still have undone subtasks
|
;; projects marked DONE but still have undone subtasks
|
||||||
(:done-incomplete
|
(:done-incomplete
|
||||||
(nd/is-project-keyword-status-p "DONE" > :complete))
|
(nd/is-project-keyword-status-p "DONE" > :complete))
|
||||||
|
|
||||||
;; projects marked TODO but all subtasks are done
|
;; projects marked TODO but all subtasks are done
|
||||||
(:undone-complete
|
(:undone-complete
|
||||||
(nd/is-project-keyword-status-p "TODO" < :stuck))
|
(nd/is-project-keyword-status-p "TODO" < :stuck))
|
||||||
|
|
||||||
;; projects with invalid todo keywords
|
;; projects with invalid todo keywords
|
||||||
(:invalid-todostate
|
(:invalid-todostate
|
||||||
(member keyword nd/project-invalid-todostates))
|
(member keyword nd/project-invalid-todostates))
|
||||||
|
|
||||||
;; projects with scheduled heading (only subtasks should be scheduled)
|
;; projects with scheduled heading (only subtasks should be scheduled)
|
||||||
(:scheduled-project
|
(:scheduled-project
|
||||||
(nd/is-scheduled-heading-p))
|
(nd/is-scheduled-heading-p))
|
||||||
|
|
||||||
;; error if not known
|
;; error if not known
|
||||||
(t (if (not (member statuscode nd/project-statuscodes))
|
(t (if (not (member statuscode nd/project-statuscodes))
|
||||||
(error "unknown statuscode")))))
|
(error "unknown statuscode")))))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
*** skip functions
|
*** skip functions
|
||||||
These are the primary means we use to sort through tasks. Note that we could do this with
|
These are the primary means we use to sort through tasks. Note that we could do this with
|
||||||
|
@ -1213,123 +1213,124 @@ Note that this is used for "normal" projects as well as iterators
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
*** custom commands
|
*** custom commands
|
||||||
#+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)
|
||||||
|
|
||||||
(setq org-agenda-prefix-format
|
(setq org-agenda-prefix-format
|
||||||
'((agenda . " %-12:c%-7:e%?-12t% s")
|
'((agenda . " %-12:c %-5:e %?-12t% s")
|
||||||
(timeline . " % s")
|
(timeline . " % s")
|
||||||
(todo . " %-12:c")
|
(todo . " %-12:c")
|
||||||
(tags . " %-12:c%-7:e")
|
(tags . " %-12:c %-5:e ")
|
||||||
(search . " %-12:c")))
|
(search . " %-12:c")))
|
||||||
|
|
||||||
(defconst nd/org-agenda-todo-sort-order '("NEXT" "WAIT" "HOLD" "TODO"))
|
(defconst nd/org-agenda-todo-sort-order '("NEXT" "WAIT" "HOLD" "TODO"))
|
||||||
|
|
||||||
(setq org-agenda-cmp-user-defined
|
(setq org-agenda-cmp-user-defined
|
||||||
'(lambda (a b)
|
'(lambda (a b)
|
||||||
(let ((pa (- (length (member
|
(let ((pa (- (length (member
|
||||||
(get-text-property 1 'todo-state a)
|
(get-text-property 1 'todo-state a)
|
||||||
nd/org-agenda-todo-sort-order))))
|
nd/org-agenda-todo-sort-order))))
|
||||||
(pb (- (length (member
|
(pb (- (length (member
|
||||||
(get-text-property 1 'todo-state b)
|
(get-text-property 1 'todo-state b)
|
||||||
nd/org-agenda-todo-sort-order)))))
|
nd/org-agenda-todo-sort-order)))))
|
||||||
(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)))))
|
||||||
|
|
||||||
(defun nd/agenda-base-header-command (match header skip-fun)
|
(defun nd/agenda-base-header-command (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-command (match header skip-fun &optional sort)
|
||||||
(or sort (setq sort ''(category-keep)))
|
(or sort (setq sort ''(category-keep)))
|
||||||
`(tags-todo
|
`(tags-todo
|
||||||
,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-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-project-command (match header statuscode)
|
||||||
`(tags
|
`(tags
|
||||||
,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 ((task-match "-NA-REFILE-%inc-PARENT_TYPE=\"periodical\"/")
|
||||||
(project-match "-NA-REFILE-%inc-PARENT_TYPE=\"periodical\"-PARENT_TYPE=\"iterator\"/")
|
(project-match "-NA-REFILE-%inc-PARENT_TYPE=\"periodical\"-PARENT_TYPE=\"iterator\"/")
|
||||||
(periodical-match "-NA-REFILE+PARENT_TYPE=\"periodical\"-PARENT_TYPE=\"iterator\"/")
|
(periodical-match "-NA-REFILE+PARENT_TYPE=\"periodical\"-PARENT_TYPE=\"iterator\"/")
|
||||||
(iterator-match "-NA-REFILE-PARENT_TYPE=\"periodical\"+PARENT_TYPE=\"iterator\"/"))
|
(iterator-match "-NA-REFILE-PARENT_TYPE=\"periodical\"+PARENT_TYPE=\"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-command project-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-command project-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-project-command project-match "Stuck Projects" :stuck)
|
||||||
,(nd/agenda-base-project-command project-match "Waiting Projects" :waiting)
|
,(nd/agenda-base-project-command project-match "Waiting Projects" :waiting)
|
||||||
,(nd/agenda-base-project-command project-match "Active Projects" :active)
|
,(nd/agenda-base-project-command project-match "Active Projects" :active)
|
||||||
,(nd/agenda-base-project-command project-match "Held Projects" :held)))
|
,(nd/agenda-base-project-command project-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-command periodical-match "Empty Periodicals" ''nd/skip-non-empty-periodical-parent-headers)
|
||||||
,(nd/agenda-base-header-command periodical-match "Stale Periodicals" ''nd/skip-non-stale-periodical-parent-headers)
|
,(nd/agenda-base-header-command periodical-match "Stale Periodicals" ''nd/skip-non-stale-periodical-parent-headers)
|
||||||
,(nd/agenda-base-header-command periodical-match "Fresh Periodicals" ''nd/skip-non-fresh-periodical-parent-headers)))
|
,(nd/agenda-base-header-command periodical-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-project-command iterator-match "Stuck Iterators (require NEXT or schedule)" :stuck)
|
||||||
,(nd/agenda-base-project-command iterator-match "Empty Iterators (require new tasks)" :undone-complete)
|
,(nd/agenda-base-project-command iterator-match "Empty Iterators (require new tasks)" :undone-complete)
|
||||||
,(nd/agenda-base-task-command iterator-match "Uninitialized Iterators (no tasks added)" ''nd/skip-non-iterator-atomic-tasks)
|
,(nd/agenda-base-task-command iterator-match "Uninitialized Iterators (no tasks added)" ''nd/skip-non-iterator-atomic-tasks)
|
||||||
,(nd/agenda-base-project-command iterator-match "Active Iterators" :active)
|
,(nd/agenda-base-project-command iterator-match "Active Iterators" :active)
|
||||||
,(nd/agenda-base-project-command iterator-match "Waiting Iterators" :waiting)
|
,(nd/agenda-base-project-command iterator-match "Waiting Iterators" :waiting)
|
||||||
,(nd/agenda-base-project-command iterator-match "Held Iterators" :held)))
|
,(nd/agenda-base-project-command iterator-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-command "-NA-REFILE+%inc/" "Incubated Tasks" ''nd/skip-non-atomic-tasks)
|
||||||
,(nd/agenda-base-project-command "-NA-REFILE+%inc/" "Incubated Projects" :held)))
|
,(nd/agenda-base-project-command "-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-command task-match "Discontinous Project" ''nd/skip-non-discontinuous-project-tasks)
|
||||||
,(nd/agenda-base-project-command project-match "Invalid Todostate" :invalid-todostate)))
|
,(nd/agenda-base-project-command project-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-command task-match "Undone Closed" ''nd/skip-non-undone-closed-todoitems)
|
||||||
,(nd/agenda-base-header-command task-match "Done Unclosed" ''nd/skip-non-done-unclosed-todoitems)
|
,(nd/agenda-base-header-command task-match "Done Unclosed" ''nd/skip-non-done-unclosed-todoitems)
|
||||||
,(nd/agenda-base-project-command project-match "Undone Completed" :undone-complete)
|
,(nd/agenda-base-project-command task-match "Undone Completed" :undone-complete)
|
||||||
,(nd/agenda-base-project-command project-match "Done Incompleted" :done-incomplete)))
|
,(nd/agenda-base-project-command task-match "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-command task-match "Archivable Atomic Tasks" ''nd/skip-non-archivable-atomic-tasks)
|
||||||
,(nd/agenda-base-header-command task-match "Stale Tasks" ''nd/skip-non-stale-headings)
|
,(nd/agenda-base-header-command task-match "Stale Tasks" ''nd/skip-non-stale-headings)
|
||||||
,(nd/agenda-base-project-command iterator-match "Archivable Iterators" :archivable)
|
,(nd/agenda-base-project-command iterator-match "Archivable Iterators" :archivable)
|
||||||
,(nd/agenda-base-project-command project-match "Archivable Projects" :archivable))))))
|
,(nd/agenda-base-project-command project-match "Archivable Projects" :archivable))))))
|
||||||
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
*** views
|
*** views
|
||||||
**** calendar display
|
**** calendar display
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(setq org-agenda-start-on-weekday 0)
|
(setq org-agenda-start-on-weekday 0)
|
||||||
(setq org-agenda-span 'day)
|
(setq org-agenda-span 'day)
|
||||||
(setq org-agenda-time-grid (quote ((daily today remove-match)
|
(setq org-agenda-current-time-string "### -- NOW -- ###")
|
||||||
#("----------------" 0 16 (org-heading t))
|
(setq org-agenda-time-grid '((daily today remove-match)
|
||||||
(0900 1100 1300 1500 1700))))
|
(0800 1000 1200 1200 1400 1600)
|
||||||
|
"......" "-----------------"))
|
||||||
#+End_src
|
#+End_src
|
||||||
**** right align tags
|
**** right align tags
|
||||||
the agenda does not do this by default...it's annoying
|
the agenda does not do this by default...it's annoying
|
||||||
|
|
Loading…
Reference in New Issue