added macro to simplify agenda commands
This commit is contained in:
parent
ed94b385ae
commit
4f6a058ec4
22
conf.el
22
conf.el
|
@ -522,14 +522,12 @@ Using this scheme, we simply compare the magnitude of the statuscodes"
|
|||
(org-agenda-redo))
|
||||
(message "%s project view in agenda" (if nd/agenda-project-view "Showing" "Hiding")))
|
||||
|
||||
(defun nd/agenda-base-task-command (header skip-fun)
|
||||
;;(quote
|
||||
(tags-todo "-NA-REFILE/!"
|
||||
((org-agenda-overriding-header header)
|
||||
(org-agenda-skip-function skip-fun)
|
||||
(defmacro nd/agenda-base-task-command (header skip-fun)
|
||||
`(tags-todo "-NA-REFILE/!"
|
||||
((org-agenda-overriding-header ,header)
|
||||
(org-agenda-skip-function ,skip-fun)
|
||||
(org-agenda-todo-ignore-with-date 'all)
|
||||
(org-agenda-sorting-strategy
|
||||
'(category-keep)))))
|
||||
(org-agenda-sorting-strategy '(category-keep)))))
|
||||
|
||||
;; (defvar nd/agenda-task-commands
|
||||
;; (quote
|
||||
|
@ -583,12 +581,12 @@ Using this scheme, we simply compare the magnitude of the statuscodes"
|
|||
|
||||
(setq org-agenda-tags-todo-honor-ignore-options t)
|
||||
(setq org-agenda-custom-commands
|
||||
(quote ((" " "Agenda"
|
||||
(;;(agenda "" nil)
|
||||
`((" " "Agenda"
|
||||
((agenda "" nil)
|
||||
(tags "REFILE"
|
||||
((org-agenda-overriding-header "Tasks to Refile")
|
||||
((org-agenda-overriding-header (if nd/agenda-project-view "Tasks to Refile" "Herro"))
|
||||
(org-tags-match-list-sublevels nil)))
|
||||
nd/agenda-base-task-command)
|
||||
,(macroexpand '(nd/agenda-base-task-command "Atomic tasks" 'nd/skip-non-atomic-tasks)))
|
||||
;;(nd/agenda-base-task-command "Project next tasks" 'nd/skip-non-next-project-tasks))
|
||||
;;(if nd/agenda-project-view nd/agenda-project-commands nd/agenda-task-commands))
|
||||
;; (tags-todo "-NA-REFILE/!"
|
||||
|
@ -601,7 +599,7 @@ Using this scheme, we simply compare the magnitude of the statuscodes"
|
|||
;; ((org-agenda-overriding-header "Tasks to Archive")
|
||||
;; (org-agenda-skip-function 'nd/skip-non-archivable-tasks)
|
||||
;; (org-tags-match-list-sublevels nil))))
|
||||
nil))))
|
||||
nil)))
|
||||
|
||||
(use-package org-bullets
|
||||
:ensure t
|
||||
|
|
22
conf.org
22
conf.org
|
@ -716,14 +716,12 @@ tags in the custom commands section but I find this easier to maintain and possi
|
|||
(org-agenda-redo))
|
||||
(message "%s project view in agenda" (if nd/agenda-project-view "Showing" "Hiding")))
|
||||
|
||||
(defun nd/agenda-base-task-command (header skip-fun)
|
||||
;;(quote
|
||||
(tags-todo "-NA-REFILE/!"
|
||||
((org-agenda-overriding-header header)
|
||||
(org-agenda-skip-function skip-fun)
|
||||
(defmacro nd/agenda-base-task-command (header skip-fun)
|
||||
`(tags-todo "-NA-REFILE/!"
|
||||
((org-agenda-overriding-header ,header)
|
||||
(org-agenda-skip-function ,skip-fun)
|
||||
(org-agenda-todo-ignore-with-date 'all)
|
||||
(org-agenda-sorting-strategy
|
||||
'(category-keep)))))
|
||||
(org-agenda-sorting-strategy '(category-keep)))))
|
||||
|
||||
;; (defvar nd/agenda-task-commands
|
||||
;; (quote
|
||||
|
@ -779,12 +777,12 @@ tags in the custom commands section but I find this easier to maintain and possi
|
|||
#+BEGIN_SRC emacs-lisp
|
||||
(setq org-agenda-tags-todo-honor-ignore-options t)
|
||||
(setq org-agenda-custom-commands
|
||||
(quote ((" " "Agenda"
|
||||
(;;(agenda "" nil)
|
||||
`((" " "Agenda"
|
||||
((agenda "" nil)
|
||||
(tags "REFILE"
|
||||
((org-agenda-overriding-header "Tasks to Refile")
|
||||
((org-agenda-overriding-header (if nd/agenda-project-view "Tasks to Refile" "Herro"))
|
||||
(org-tags-match-list-sublevels nil)))
|
||||
nd/agenda-base-task-command)
|
||||
,(macroexpand '(nd/agenda-base-task-command "Atomic tasks" 'nd/skip-non-atomic-tasks)))
|
||||
;;(nd/agenda-base-task-command "Project next tasks" 'nd/skip-non-next-project-tasks))
|
||||
;;(if nd/agenda-project-view nd/agenda-project-commands nd/agenda-task-commands))
|
||||
;; (tags-todo "-NA-REFILE/!"
|
||||
|
@ -797,7 +795,7 @@ tags in the custom commands section but I find this easier to maintain and possi
|
|||
;; ((org-agenda-overriding-header "Tasks to Archive")
|
||||
;; (org-agenda-skip-function 'nd/skip-non-archivable-tasks)
|
||||
;; (org-tags-match-list-sublevels nil))))
|
||||
nil))))
|
||||
nil)))
|
||||
|
||||
#+END_SRC
|
||||
** ui
|
||||
|
|
Loading…
Reference in New Issue