;;; -*- lexical-binding: t -*- ;; ;; this file: ;; https://dataswamp.org/~incal/emacs-init/gnus/gnus-incal.el (require 'gnus) (require 'gnus-msg) (require 'gnus-score) (require 'gnus-start) (require 'group) (setq mail-abbrev-mode-regexp "^\\(\\(Newsgroups\\|Followup-To:\\)\\|\\(Resent-\\)?\\(To\\|From\\|Cc\\|Bcc\\|Reply-To\\)\\):") (setq gnus-always-read-dribble-file t) (setq gnus-inhibit-slow-scoring t) (setq gnus-suppress-duplicates t) (setq gnus-use-full-window nil) (setq gnus-extra-headers '(Cc Followup-To Gcc Keywords Newsgroups To X-Spam-Flag)) (setq gnus-default-directory "~/News") (setq message-syntax-checks '((existing-newsgroups . disabled) (sender . disabled) )) ;; select (setq gnus-select-method '(nntp "news.gmane.io")) (setq gnus-secondary-select-methods '((nntp "news.eternal-september.org") (nnimap "Mail" (nnimap-stream shell) (nnimap-shell-program "ssh incal@dataswamp.org /usr/local/libexec/dovecot/imap -o mail_location=maildir:~/Maildir/:LAYOUT=fs")) (nnml "") )) ;; undesired groups (setq gnus-check-new-newsgroups nil) (setq gnus-save-killed-list nil) ;; Gnus' .newsrc.eld, not other's .newsrc (setq gnus-read-newsrc-file nil) (setq gnus-save-newsrc-file nil) ;; no fanfare (setq gnus-inhibit-startup-message t) (setq gnus-interactive-exit 'quiet) ;; uXu (setq gnus-novice-user nil gnus-expert-user (not gnus-novice-user) ) ;; underground experts united! (setq gnus-verbose 1 ; [0, 10] with 1 = errors gnus-verbose-backends gnus-verbose) (defun gnus-kill-if-runs () (when (gnus-alive-p) (gnus-group-exit) )) (defun new-message (&optional force) (interactive "P") (if (or force (not (eq major-mode 'message-mode))) (progn (unless (gnus-alive-p) (gnus) ) (gnus-post-news 'post "") ) (message "did nothing, %s to force" (substitute-command-keys "\\[universal-argument]") ))) (defun gnus-score-mode-hook-f () (lines) ) (add-hook 'gnus-score-mode-hook #'gnus-score-mode-hook-f) (provide 'gnus-incal)