rearrange and update to emacs 26
This commit is contained in:
parent
1186d5d7cb
commit
027d08e8f3
18
conf.el
18
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)
|
||||||
|
@ -269,6 +267,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)
|
||||||
|
|
||||||
(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 ()
|
||||||
|
|
65
conf.org
65
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,11 +804,11 @@ 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
|
||||||
|
@ -820,27 +820,27 @@ Returns t if heading has certain relationship to other headings
|
||||||
: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))
|
||||||
|
@ -889,17 +889,17 @@ Returns t if heading has certain relationship to other headings
|
||||||
(org-forward-heading-same-level 1 t)))
|
(org-forward-heading-same-level 1 t)))
|
||||||
project-state))
|
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
|
||||||
|
@ -1213,18 +1213,18 @@ 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)
|
||||||
|
@ -1236,14 +1236,14 @@ Note that this is used for "normal" projects as well as iterators
|
||||||
((> 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
|
||||||
|
@ -1252,7 +1252,7 @@ Note that this is used for "normal" projects as well as iterators
|
||||||
(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
|
||||||
|
@ -1260,7 +1260,7 @@ Note that this is used for "normal" projects as well as iterators
|
||||||
(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\"/"))
|
||||||
|
@ -1312,8 +1312,8 @@ Note that this is used for "normal" projects as well as iterators
|
||||||
"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)
|
||||||
|
@ -1325,11 +1325,12 @@ Note that this is used for "normal" projects as well as iterators
|
||||||
*** 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