diff --git a/etc/conf.org b/etc/conf.org index 03b5e4d..1aa696b 100644 --- a/etc/conf.org +++ b/etc/conf.org @@ -1933,12 +1933,16 @@ Also here are the properties for repeated tasks and a few others (see comments i ;; defines a goal "GOAL" + "X-ROUTINE" + ;; for sorting routines in the agenda + ;; date of header creation "CREATED")) (setq org-global-properties '(("PARENT_TYPE_ALL" . "periodical iterator") - ("Effort_ALL" . "0:05 0:15 0:30 1:00 1:30 2:00 3:00 4:00 5:00 6:00")) + ("Effort_ALL" . "0:05 0:15 0:30 1:00 1:30 2:00 3:00 4:00 5:00 6:00") + ("X-ROUTINE" . "morning evening")) org-use-property-inheritance '("PARENT_TYPE" "TIME_SHIFT")) @@ -2880,7 +2884,7 @@ This is meant to be used in `org-super-agenda-groups'. For each item, the returned function will navigate from the agenda buffer to the original org entry before executing BODY." `(lambda (item) - (let ((marker (get-text-property 1 'org-marker item))) + (-when-let (marker (get-text-property 1 'org-marker item)) (with-current-buffer (marker-buffer marker) (goto-char marker) ,@body)))) @@ -2910,10 +2914,24 @@ original org entry before executing BODY." org-agenda-custom-commands `(("a" "Calendar View" - ((agenda "" ((org-agenda-skip-function - '(org-x-skip-headings-with-tags - '("NA" "%maybe" "REFILE"))) - (org-agenda-include-diary t))))) + ((agenda + "" + ((org-agenda-skip-function + '(org-x-skip-headings-with-tags + '("NA" "%maybe" "REFILE"))) + (org-agenda-include-diary t) + (org-super-agenda-groups + `((:name "Morning routine" + :pred ,(nd/org-x-mk-super-agenda-pred + (equal "morning" (org-entry-get nil "X-ROUTINE"))) + :order 0) + (:name "Evening routine" + :pred ,(nd/org-x-mk-super-agenda-pred + (equal "evening" (org-entry-get nil "X-ROUTINE"))) + :order 3) + (:name "Calendar" + :time-grid t + :order 1))))))) ("t" "Task View"