From 3ab4ecfde8e3199e6f79665ac12eb040529ba654 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Mon, 30 Oct 2023 14:41:41 +0000 Subject: [PATCH] Open org-agenda in current window, import calendar events on refresh --- home/emacs/modules/custom-email-config.el | 3 ++- home/emacs/modules/custom-org-config.el | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/home/emacs/modules/custom-email-config.el b/home/emacs/modules/custom-email-config.el index ce4acfce..2b72783b 100644 --- a/home/emacs/modules/custom-email-config.el +++ b/home/emacs/modules/custom-email-config.el @@ -40,7 +40,8 @@ ("d" ("+deleted" "-inbox" "-unread") "Delete"))) (when (require 'notmuch-indicator nil :noerror) - (setq notmuch-indicator-args '((:terms "tag:unread AND tag:inbox" :label "󰮒 ")) + (setq notmuch-indicator-refresh-count 60 + notmuch-indicator-args '((:terms "tag:unread AND tag:inbox" :label "󰮒 ")) notmuch-indicator-force-refresh-commands '(notmuch-refresh-this-buffer notmuch-refresh-all-buffers notmuch-poll-and-refresh-this-buffer)) diff --git a/home/emacs/modules/custom-org-config.el b/home/emacs/modules/custom-org-config.el index 6423b226..fdc39e37 100644 --- a/home/emacs/modules/custom-org-config.el +++ b/home/emacs/modules/custom-org-config.el @@ -4,6 +4,7 @@ org-journal-file-format "%Y%m%d.org" org-agenda-files '("~/Org/") org-agenda-sticky t + org-agenda-window-setup 'current-window org-agenda-prefix-format '((agenda . " %i %t %s") (todo . " %i") (tags . " %i") @@ -50,10 +51,12 @@ )) (when (require 'khalel nil :noerror) - (setq khalel-import-org-file-read-only nil - khalel-import-org-file (expand-file-name "calendar.org" org-directory) + (setq khalel-import-org-file (expand-file-name "calendar.org" org-directory) + khalel-import-org-file-read-only nil + khalel-import-org-file-confirm-overwrite nil khalel-import-start-date "-30d" khalel-import-end-date "+30d") + (add-hook 'org-agenda-mode-hook #'khalel-import-events) (khalel-add-capture-template "e")) (provide 'custom-org-config)