~abcdw/rde

05fb9d6af88be21c4f4de908d732bbbd9569fb96 — Miguel Ángel Moreno 1 year, 3 months ago 9eb9f5b
rde: emacs-org-agenda: Allow passing in custom prefix format.
1 files changed, 14 insertions(+), 2 deletions(-)

M src/rde/features/emacs-xyz.scm
M src/rde/features/emacs-xyz.scm => src/rde/features/emacs-xyz.scm +14 -2
@@ 3891,8 3891,11 @@ Indentation and refile configurations, visual adjustment."
(define* (feature-emacs-org-agenda
          #:key
          (org-agenda-files 'nil)
          (org-agenda-custom-commands %rde-org-agenda-custom-commands))
          (org-agenda-custom-commands %rde-org-agenda-custom-commands)
          (org-agenda-prefix-format '()))
  "Configure org-agenda for GNU Emacs."
  (ensure-pred maybe-list? org-agenda-prefix-format)

  (define emacs-f-name 'org-agenda)
  (define f-name (symbol-append 'emacs- emacs-f-name))



@@ 3984,7 3987,16 @@ result is longer than LEN."
               ;; TODO: Name this value better
               ,(- (get-value 'olivetti-body-width config 85)))
         (setq org-agenda-window-setup 'current-window)
         (setq org-agenda-files ',org-agenda-files))
         (setq org-agenda-files ',org-agenda-files)
         ,@(if org-agenda-prefix-format
               (if (get-value 'org-roam-todo? config)
                   `((setq org-agenda-prefix-format
                           '((agenda . " %i %(rde-org-agenda-category 12)%?-12t% s")
                             (todo . " %i %(rde-org-agenda-category 12) ")
                             (tags . " %i %(rde-org-agenda-category 12) ")
                             (search . " %i %(rde-org-agenda-category 12) "))))
                   `((setq org-agenda-prefix-format ',org-agenda-prefix-format)))
               '()))
        (advice-add 'org-redo :after 'rde-org-agenda-to-appt)
        (add-hook 'org-capture-after-finalize-hook 'rde-org-agenda-to-appt))
      #:summary "\