diff --git a/gnus.el b/gnus.el new file mode 100644 index 0000000..d211f70 --- /dev/null +++ b/gnus.el @@ -0,0 +1,45 @@ +;;; gnus.el -*- lexical-binding: t; coding: utf-8-unix -*- + +;; Author: Case Duckworth +;; Created: Sometime during Covid-19, 2020 +;; Keywords: configuration +;; URL: https://tildegit.org/acdw/emacs + +;; This file is NOT part of GNU Emacs. + +;;; License: +;; Everyone is permitted to do whatever with this software, without +;; limitation. This software comes without any warranty whatsoever, +;; but with two pieces of advice: +;; - Don't hurt yourself. +;; - Make good choices. + +;;; Code: + +;; https://github.com/redguardtoo/mastering-emacs-in-one-year-guide/blob/master/gnus-guide-en.org + +;; searching (?) +(require 'nnir) + +;; 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 +(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) diff --git a/init.el b/init.el index 4898d1a..862a2e2 100644 --- a/init.el +++ b/init.el @@ -500,6 +500,13 @@ (:option nov-text-width fill-column) (:mode "\\.epub\\'")) +(setup gnus + (:option gnus-home-directory (expand-file-name "gnus" user-emacs-directory) + gnus-directory (expand-file-name "gnus/News" user-emacs-directory) + gnus-init-file (expand-file-name "gnus.el" user-emacs-directory)) + (when (not (file-exists-p gnus-directory)) + (make-directory gnus-directory :parents))) + (when (eq acdw/system :home) (setup (:straight pdf-tools) (pdf-loader-install))