                                                 (* 60 (Long/parseLong hours))))))
               scheduled (get-timestamp scheduled-finder true)
               deadline  (get-timestamp deadline-finder true)
+              tags (reduce into #{} tags-with-ancestors)
               base (with-meta
                      {:todo               (if (contains? DONE-states todo) nil todo)
                       :done               (if (contains? DONE-states todo) todo)

                      :priority-cookie    priority-cookie
                      :parent-is-ordered? (-> props-with-ancestors second (get "ORDERED") (= "t"))
                      :properties         (first props-with-ancestors)
                      :tags               (reduce into #{} tags-with-ancestors)
                      :effort             effort}
                     {:raw-section section})
              date-range (->> prelude
                              (keep (fn [line]

        (println (format "== LOG: %s ==" (format-org-local-date date)))
        (print-calendar calendar-events)
        (doseq [item past-log]
          (print-todo-line item {:omit-effort? true})))
      (when (seq backlog)
        (println "\n\n--------------------------------------------------------------------------------")
        (println "|                                   backlog                                    |")
        (println "--------------------------------------------------------------------------------")
        (doseq [item backlog]
          (print-todo-line item {}))))))

(defn calculate-agenda
  [deets-by-file cfg now]
  (let [today (.toLocalDate now)
        {:keys [triage deadlines by-day past-log backlog]} (synthesize-agenda deets-by-file today)
        custom-prefix (:custom-prefix cfg (constantly nil))
        stats-by-date (into {}
                            (for [[date {:keys [todos calendar-events]}] (sort by-day)
