summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Herklotz <git@yannherklotz.com>2023-02-18 17:44:20 +0000
committerYann Herklotz <git@yannherklotz.com>2023-02-18 17:44:20 +0000
commit0605d0afdb1224741d454648ea0eb5bf265574e2 (patch)
tree34df3a8f6d7493b1d10b4a4c615c4c67d999e316
parent7b650d6ab94cfe82c14c4ee57371a905d6433052 (diff)
downloadymh-emacs-0605d0afdb1224741d454648ea0eb5bf265574e2.tar.gz
ymh-emacs-0605d0afdb1224741d454648ea0eb5bf265574e2.zip
Reformat some of the configuration
-rw-r--r--init.el83
1 files changed, 61 insertions, 22 deletions
diff --git a/init.el b/init.el
index f15682c..350d6d7 100644
--- a/init.el
+++ b/init.el
@@ -162,7 +162,8 @@ Should be one of `:white-split', `:modified' or `:default'")
(add-hook 'text-mode-hook #'auto-fill-mode)
;; Enable those
- (dolist (c '(overwrite-mode narrow-to-region narrow-to-page upcase-region downcase-region))
+ (dolist (c '(overwrite-mode narrow-to-region narrow-to-page upcase-region
+ downcase-region))
(put c 'disabled nil))
(set-face-attribute 'default nil :font "Iosevka YMHG Semibold-14")
@@ -317,7 +318,7 @@ https://yannherklotz.com"))
(let ((map calendar-mode-map))
(define-key map (kbd "s") #'calendar-sunrise-sunset)
(define-key map (kbd "l") #'lunar-phases)
- (define-key map (kbd "i") nil) ; Org sets this, much to my chagrin (see `remove-hook' above)
+ (define-key map (kbd "i") nil)
(define-key map (kbd "i a") #'diary-insert-anniversary-entry)
(define-key map (kbd "i c") #'diary-insert-cyclic-entry)
(define-key map (kbd "i d") #'diary-insert-entry) ; for current "day"
@@ -340,7 +341,7 @@ https://yannherklotz.com"))
(setq diary-comment-end "")
(setq diary-nonmarking-symbol "!")
(setq diary-show-holidays-flag t)
- (setq diary-display-function #'diary-fancy-display) ; better than its alternative
+ (setq diary-display-function #'diary-fancy-display)
(setq diary-header-line-format nil)
(setq diary-list-include-blanks nil)
(setq diary-number-of-entries 2)
@@ -389,16 +390,18 @@ https://yannherklotz.com"))
'(modus-operandi-tinted modus-vivendi-tinted))
(setq modus-themes-italic-constructs t)
:config
- (add-hook 'modus-themes-after-load-theme-hook
- (lambda ()
- (modus-themes-with-colors
- (custom-set-faces
- `(proof-locked-face ((,c :background ,bg-cyan-nuanced :extend t)))
- `(proof-queue-face ((,c :background ,bg-magenta-nuanced :extend t)))
- `(proof-warning-face ((,c :inherit modus-themes-subtle-yellow)))
- `(coq-solve-tactics-face ((,c :inherit modus-themes-fg-red)))
- `(coq-cheat-face ((,c :inherit modus-themes-intense-red
- :box (:line-width -1 :color ,bg-red-intense :style nil))))))))
+ (add-hook
+ 'modus-themes-after-load-theme-hook
+ (lambda ()
+ (modus-themes-with-colors
+ (custom-set-faces
+ `(proof-locked-face ((,c :background ,bg-cyan-nuanced :extend t)))
+ `(proof-queue-face ((,c :background ,bg-magenta-nuanced :extend t)))
+ `(proof-warning-face ((,c :inherit modus-themes-subtle-yellow)))
+ `(coq-solve-tactics-face ((,c :inherit modus-themes-fg-red)))
+ `(coq-cheat-face ((,c :inherit modus-themes-intense-red
+ :box (:line-width -1 :color ,bg-red-intense
+ :style nil))))))))
(modus-themes-load-theme 'modus-vivendi-tinted))
(use-package pass
@@ -467,8 +470,11 @@ https://yannherklotz.com"))
(setq org-refile-targets `((,(ymh/expand-org-file "main.org") :level . 1)
(,(ymh/expand-org-file "someday.org") :level . 1)
- (,(ymh/expand-org-file "projects.org") :maxlevel . 2)
- (,(ymh/expand-org-file (format-time-string "%Y-%m.org")) :level . 1)))
+ (,(ymh/expand-org-file "projects.org")
+ :maxlevel . 2)
+ (,(ymh/expand-org-file
+ (format-time-string "%Y-%m.org"))
+ :level . 1)))
(setq org-todo-keywords
'((sequence
@@ -717,17 +723,50 @@ https://yannherklotz.com"))
(global-set-key (kbd "C-c o m") #'ymh/notmuch)
+ (defun ymh/and-search (&rest rest)
+ (apply #'concat (-interpose " and " rest)))
+
(setq notmuch-saved-searches
- `((:name "inbox" :query "date:last_month..this_month and tag:inbox not tag:deleted and tag:unread" :key "n")
+ `((:name "inbox" :key "n"
+ :query ,(ymh/and-search "date:last_month..this_month"
+ "tag:inbox"
+ "not tag:deleted"
+ "tag:unread"))
(:name "flagged" :query "tag:flagged" :key "f")
(:name "sent" :query "tag:sent" :key "s")
(:name "drafts" :query "tag:draft" :key "d")
- (:name "mailbox" :query "date:last_month..this_month and (tag:mailbox and tag:inbox) and not tag:deleted and not tag:sent" :key ,(kbd "m i"))
- (:name "mailbox-unread" :query "date:last_month..this_month and (tag:mailbox and tag:inbox) and not tag:deleted and not tag:sent and tag:unread" :key ,(kbd "m u"))
- (:name "imperial" :query "date:last_month..this_month and (tag:imperial and tag:inbox) and not tag:deleted and not tag:sent" :key ,(kbd "i i"))
- (:name "imperial-unread" :query "date:last_month..this_month and (tag:imperial and tag:inbox) and not tag:deleted and not tag:sent and tag:unread" :key ,(kbd "i u"))
- (:name "mailbox-archive" :query "date:last_month..this_month and (tag:mailbox and tag:archive) and not tag:deleted and not tag:sent" :key ,(kbd "m a"))
- (:name "imperial-archive" :query "date:last_month..this_month and (tag:imperial and tag:archive) and not tag:deleted and not tag:sent" :key ,(kbd "i a"))
+ (:name "mailbox" :key ,(kbd "m i")
+ :query ,(ymh/and-search "date:last_month..this_month"
+ "(tag:mailbox and tag:inbox)"
+ "not tag:deleted"
+ "not tag:sent"))
+ (:name "mailbox-unread" :key ,(kbd "m u")
+ :query ,(ymh/and-search "date:last_month..this_month"
+ "(tag:mailbox and tag:inbox)"
+ "not tag:deleted"
+ "not tag:sent"
+ "tag:unread"))
+ (:name "imperial" :key ,(kbd "i i")
+ :query ,(ymh/and-search "date:last_month..this_month"
+ "(tag:imperial and tag:inbox)"
+ "not tag:deleted"
+ "not tag:sent"))
+ (:name "imperial-unread" :key ,(kbd "i u")
+ :query ,(ymh/and-search "date:last_month..this_month"
+ "(tag:imperial and tag:inbox)"
+ "not tag:deleted"
+ "not tag:sent"
+ "tag:unread"))
+ (:name "mailbox-archive" :key ,(kbd "m a")
+ :query ,(ymh/and-search "date:last_month..this_month"
+ "(tag:mailbox and tag:archive)"
+ "not tag:deleted"
+ "not tag:sent"))
+ (:name "imperial-archive" :key ,(kbd "i a")
+ :query ,(ymh/and-search "date:last_month..this_month"
+ "(tag:imperial and tag:archive)"
+ "not tag:deleted"
+ "not tag:sent"))
(:name "all recent" :query "date:last_month..this_month" :key "r")))
(setq notmuch-fcc-dirs