From fa6e89be66bddce4eb934783125a4ca5d96135ff Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 21 Apr 2021 17:22:23 -0500 Subject: Update Gnus config --- gnus.el | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 63 insertions(+), 19 deletions(-) diff --git a/gnus.el b/gnus.el index d211f70..12e594c 100644 --- a/gnus.el +++ b/gnus.el @@ -16,30 +16,74 @@ ;;; Code: -;; https://github.com/redguardtoo/mastering-emacs-in-one-year-guide/blob/master/gnus-guide-en.org +;;; Select Methods +(setq gnus-select-method '(nnnil "")) -;; searching (?) -(require 'nnir) +(setq gnus-secondary-select-methods + '((nnimap "fastmail" + (nnimap-address "imap.fastmail.com") + (nnimap-server-port 993) + (nnimap-stream ssl) + (nnir-search-engine imap)) + (nntp "news.tilde.club"))) -;; contacts -(setup (:straight bbdb) - (require 'bbdb) - (bbdb-initialize 'message 'gnus 'sendmail) - (add-hook 'gnus-startup-hook 'bbdb-insinuate-gnus) - (:option bbdb/mail-auto-create-p t - bbdb/news-auto-create-p t)) - -;; select methods -(setq gnus-select-method '(nnimap "fastmail" - (nnimap-address "imap.fastmail.com") - (nnimap-server-port 993) - (nnimap-stream ssl) - (nnir-search-engine imap))) - -;; options +;;; Gnus UI options (setq gnus-thread-sort-functions '(gnus-thread-sort-by-most-recent-date (not gnus-thread-sort-by-number)) gnus-use-cache t gnus-summary-thread-gathering-function #'gnus-gather-threads-by-subject gnus-thread-hide-subtree t gnus-thread-ignore-subject t) + +(when window-system + (setq gnus-sum-thread-tree-indent " ") + (setq gnus-sum-thread-tree-root "● ") + (setq gnus-sum-thread-tree-false-root "○ ") + (setq gnus-sum-thread-tree-single-indent "◎ ") + (setq gnus-sum-thread-tree-vertical "│") + (setq gnus-sum-thread-tree-leaf-with-other "├─ ") + (setq gnus-sum-thread-tree-single-leaf "╰─ ")) + +(setq gnus-summary-line-format + (concat + "%0{%U%R%z%}" + "%3{│%}" "%1{%d%}" "%3{│%}" ;; date + " " + "%4{%-20,20f%}" ;; name + " " + "%3{│%}" + " " + "%1{%B%}" + "%s\n")) + +(setq gnus-summary-display-arrow t) + +(add-hook 'gnus-group-mode-hook #'hl-line-mode) + +;;; Sending mail +(setq send-mail-function #'smtpmail-send-it + message-send-mail-function #'smtpmail-send-it + smtpmail-smtp-server "smtp.fastmail.com" + smtpmail-default-smtp-server "smtp.fastmail.com" + smtpmail-smtp-service 465 + smtpmail-stream-type 'ssl + smtpmail-smtp-user "acdw@fastmail.com" + message-kill-buffer-on-exit t) + +;;; Packages + +;; searching (?) +(require 'nnir) + +;; contacts +(setup (:straight bbdb) + (require 'bbdb) + (bbdb-initialize 'message 'gnus 'mail) + (bbdb-insinuate-message) + (add-hook 'gnus-startup-hook 'bbdb-insinuate-gnus) + (:option bbdb/gnus-summary-prefer-real-names t + bbdb/mail-auto-create-p t + bbdb/news-auto-create-p t + bbdb-use-pop-up t + bbdb-offer-save 1 + bbdb-update-records-p t)) -- cgit 1.4.1-21-gabe81