summary refs log tree commit diff
path: root/emacs
diff options
context:
space:
mode:
authornoa2024-09-17 09:37:11 +0800
committernoa2024-09-17 09:37:11 +0800
commit03203f985795c8a2d477b0d214e150254a6acd54 (patch)
treea2231ff4a157332e01689f2b1e4f07b45cd90711 /emacs
parent07520a7c58666d84aea47f64b8ea51e410caf71b (diff)
Convert rmail to use-package
Diffstat (limited to 'emacs')
-rw-r--r--emacs/init.el45
1 files changed, 24 insertions, 21 deletions
diff --git a/emacs/init.el b/emacs/init.el
index 7abbb29..553186d 100644
--- a/emacs/init.el
+++ b/emacs/init.el
@@ -1257,27 +1257,30 @@ The misspelled word is taken from OVERLAY.  WORD is the corrected word."
 ;; Reading mail
 ;; I have experimented with lots of different methods of reading mail, both in and out of emacs.  But i keep coming back to rmail, despite its many, many warts.
 
-(setopt rmail-primary-inbox-list
-        (directory-files "~/Documents/mail/inbox" t "^[^\.]"))
-(setopt rmail-file-name "~/Documents/mail/rmail.mbox")
-(setopt rmail-user-mail-address-regexp
-  	(rx "noa@noa.pub"))
-(setopt rmail-mime-prefer-html nil)
-(setopt rmail-mime-attachment-dirs-alist '(("" "~/media")))
-(setopt rmail-displayed-headers
-  	(rx bol (or "To" "Cc" "From" "Date" "Subject") ":"))
-(setopt rmail-secondary-file-directory "~/Documents/mail/archive/")
-(setopt rmail-secondary-file-regexp "\\.mbox\\'")
-(setopt rmail-delete-after-output t)
-(setopt rmail-default-file "~/Documents/mail/archive/")
-(setopt mail-dont-reply-to-names rmail-user-mail-address-regexp)
-
-(add-hook 'rmail-show-message-hook #'visual-line-fill-column-mode)
-
-(setopt rmail-display-summary nil)
-(setopt rmail-redisplay-redisplay-summary t)
-(setopt rmail-summary-line-count-flag nil)
-(setopt rmail-summary-window-size 12)
+(use-package rmail
+  :custom
+  (rmail-primary-inbox-list
+   (directory-files "~/Documents/mail/inbox" t "^[^\.]"))
+  (rmail-file-name "~/Documents/mail/rmail.mbox")
+  (rmail-user-mail-address-regexp
+   (rx "noa@noa.pub"))
+  (rmail-mime-prefer-html nil)
+  (rmail-mime-attachment-dirs-alist '(("" "~/media")))
+  (rmail-displayed-headers
+   (rx bol (or "To" "Cc" "From" "Date" "Subject") ":"))
+  (rmail-secondary-file-directory "~/Documents/mail/archive/")
+  (rmail-secondary-file-regexp "\\.mbox\\'")
+  (rmail-delete-after-output t)
+  (rmail-default-file "~/Documents/mail/archive/")
+  (mail-dont-reply-to-names rmail-user-mail-address-regexp)
+
+  (rmail-display-summary nil)
+  (rmail-redisplay-redisplay-summary t)
+  (rmail-summary-line-count-flag nil)
+  (rmail-summary-window-size 12)
+
+  :hook
+  ((rmail-show-message . visual-line-fill-column-mode)))
 
 (defun noa/message-default-headers ()
   (format "Fcc: ~/Documents/mail/outbox/%s.mbox"