diff --git a/org/init.el b/org/init.el index 63c6ccb..5564c18 100644 --- a/org/init.el +++ b/org/init.el @@ -210,15 +210,22 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; origami + super agenda config (defvar ap/org-super-agenda-auto-hide-groups - '("Low Priority")) + '(".*Low Priority.*" "^.*?[^R]+.*?(desc)$")) (defun ap/org-super-agenda-origami-fold-default () "Fold certain groups by default in Org Super Agenda buffer." (--each ap/org-super-agenda-auto-hide-groups (goto-char (point-min)) (cl-loop - while (re-search-forward (rx-to-string `(seq bol " " ,it)) nil t) - do (origami-close-node (current-buffer) (point)) + while (re-search-forward it nil t) + do + (if (not (or + (string-match "TODO" (thing-at-point 'line)) + (string-match "READY" (thing-at-point 'line)) + (string-match "WIP" (thing-at-point 'line)) + )) + (origami-close-node (current-buffer) (point)) + ) ) ) )