ADD advice to switch on the org-x-dag agenda view

This commit is contained in:
Nathan Dwarshuis 2022-04-10 19:23:04 -04:00
parent 949fec4f32
commit 45d5826c2d
1 changed files with 9 additions and 6 deletions

View File

@ -2946,12 +2946,15 @@ original function being advised and ARGS are the arguments."
(:inert . 4))) (:inert . 4)))
(defun org-x-agenda-run-series-advice (fun name settings) (defun org-x-agenda-run-series-advice (fun name settings)
(-if-let (org-agenda-files (->> (nth 1 settings) (nd/with-advice
(alist-get 'org-agenda-files) nil
(car) ;; ((#'org-agenda-list :override #'org-x-dag-show-daily-nodes))
(eval))) (-if-let (org-agenda-files (->> (nth 1 settings)
(funcall fun name settings) (alist-get 'org-agenda-files)
(funcall fun name settings))) (car)
(eval)))
(funcall fun name settings)
(funcall fun name settings))))
(advice-add #'org-agenda-run-series :around #'org-x-agenda-run-series-advice) (advice-add #'org-agenda-run-series :around #'org-x-agenda-run-series-advice)