summaryrefslogtreecommitdiffhomepage
path: root/gnus.org
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-11-12 02:55:03 +0000
committerjao <jao@gnu.org>2021-11-12 02:55:03 +0000
commit9fcd6c3ea32da1a62ab402a9f37e1294d143a08d (patch)
tree0c978c3e21630f4979c54a9e489d4586f5b3f99f /gnus.org
parent0f755cffbd470508e4e8aea70e3253aaa5a61a5f (diff)
downloadelibs-9fcd6c3ea32da1a62ab402a9f37e1294d143a08d.tar.gz
elibs-9fcd6c3ea32da1a62ab402a9f37e1294d143a08d.tar.bz2
gnus clean-ups
Diffstat (limited to 'gnus.org')
-rw-r--r--gnus.org90
1 files changed, 37 insertions, 53 deletions
diff --git a/gnus.org b/gnus.org
index c9cabed..9302b17 100644
--- a/gnus.org
+++ b/gnus.org
@@ -1,17 +1,15 @@
#+property: header-args :lexical t :tangle ~/.emacs.d/gnus.el :comments yes :results silent :shebang ";; -*- lexical-binding: t -*-" :tangle-mode (identity #o644)
#+title: Gnus
-#+auto_tangle: t
* Feature switching vars
#+begin_src emacs-lisp
- (defvar jao-gnus-use-local-imap nil)
- (defvar jao-gnus-use-leafnode nil)
- (defvar jao-gnus-use-gandi-imap nil)
- (defvar jao-gnus-use-pm-imap nil)
- (defvar jao-gnus-use-gmane nil)
- (defvar jao-gnus-use-nnml nil)
- (defvar jao-gnus-use-maildirs nil)
- (defvar jao-gnus-use-nnnm nil)
+ (defvar jao-gnus-use-local-imap nil)
+ (defvar jao-gnus-use-leafnode nil)
+ (defvar jao-gnus-use-gandi-imap nil)
+ (defvar jao-gnus-use-pm-imap nil)
+ (defvar jao-gnus-use-gmane nil)
+ (defvar jao-gnus-use-nnml nil)
+ (defvar jao-gnus-use-maildirs nil)
#+end_src
* Startup and kill
#+begin_src emacs-lisp
@@ -58,7 +56,7 @@
* Looks
*** Verbosity
#+begin_src emacs-lisp
- (setq gnus-verbose 6)
+ (setq gnus-verbose 4)
#+end_src
*** Geometry
#+begin_src emacs-lisp
@@ -152,24 +150,7 @@
(setq nnheader-read-timeout 0.02
gnus-save-newsrc-file nil) ; .newsrc only needed by other newsreaders
#+end_src
-* IMAP servers
- #+begin_src emacs-lisp
- (when jao-gnus-use-local-imap
- (add-to-list 'gnus-secondary-select-methods
- `(nnimap "" (nnimap-address "localhost"))))
-
- (when jao-gnus-use-pm-imap
- (add-to-list 'gnus-secondary-select-methods
- '(nnimap "pm"
- (nnimap-address "127.0.0.1")
- (nnimap-stream network)
- (nnimap-server-port 1143))))
-
- (when jao-gnus-use-gandi-imap
- (add-to-list 'gnus-secondary-select-methods
- '(nnimap "gandi" (nnimap-address "mail.gandi.net"))))
- #+end_src
-* Local mail servers
+* Local mail
*** nnml
#+begin_src emacs-lisp
(setq mail-sources '((group))
@@ -225,12 +206,23 @@
(jao-gnus--maildir "bigml"))
#+end_src
-*** nnnm
- #+begin_src emacs-lisp
- (when (and jao-gnus-use-nnnm (require 'nnnm nil t))
- (add-to-list 'gnus-secondary-select-methods '(nnnm "")))
+* IMAP servers
+ #+begin_src emacs-lisp
+ (when jao-gnus-use-local-imap
+ (add-to-list 'gnus-secondary-select-methods
+ `(nnimap "" (nnimap-address "localhost"))))
- #+end_src
+ (when jao-gnus-use-pm-imap
+ (add-to-list 'gnus-secondary-select-methods
+ '(nnimap "pm"
+ (nnimap-address "127.0.0.1")
+ (nnimap-stream network)
+ (nnimap-server-port 1143))))
+
+ (when jao-gnus-use-gandi-imap
+ (add-to-list 'gnus-secondary-select-methods
+ '(nnimap "gandi" (nnimap-address "mail.gandi.net"))))
+ #+end_src
* Demons and notifications
#+begin_src emacs-lisp
(setq mail-user-agent 'gnus-user-agent)
@@ -329,10 +321,9 @@
(with-eval-after-load "bbdb"
(bbdb-initialize 'gnus 'message 'pgp 'mail)
(bbdb-mua-auto-update-init 'gnus)
- (eval-after-load "gnus-sum"
- '(progn
- (define-key gnus-summary-mode-map ":" 'bbdb-mua-annotate-sender)
- (define-key gnus-summary-mode-map ";" 'bbdb-mua-annotate-recipients))))
+ (with-eval-after-load "gnus-sum"
+ (define-key gnus-summary-mode-map ":" 'bbdb-mua-annotate-sender)
+ (define-key gnus-summary-mode-map ";" 'bbdb-mua-annotate-recipients)))
#+end_src
*** randomsig
#+begin_src emacs-lisp
@@ -360,17 +351,6 @@
'(define-key notmuch-show-mode-map (kbd "C-c C-c")
#'jao-notmuch-goto-message-in-gnus))
#+end_src
-*** gnus-recent
- #+begin_src emacs-lisp :tangle no
- (use-package gnus-recent
- :ensure t
- :after gnus
- :bind (:map gnus-summary-mode-map
- (("l" . #'gnus-recent-goto-previous))
- :map gnus-group-mode-map
- (("C-c l" . #'gnus-recent-goto-previous)
- ("C-c r" . #'gnus-recent))))
- #+end_src
* Groups buffer
#+begin_src emacs-lisp
;; (setq gnus-group-line-format " %m%S%p%P:%~(pad-right 35)c %3y %B\n")
@@ -430,6 +410,10 @@
#+begin_src emacs-lisp
(setq gnus-permanently-visible-groups "^nnselect:.*-today")
+ (defvar jao-gnus-image-groups-rx
+ (format "nnml:feeds\\.fun\\|gwene\\..*%s.*"
+ (regexp-opt jao-gnus-image-groups)))
+
(setq gnus-parameters
`(("^nnselect:.*\\(-today\\|bigml\\.bugs\\)"
(nnselect-rescan . t))
@@ -455,8 +439,8 @@
("nnml:bigml\\..*"
;; (posting-style (address "jao@bigml.com"))
(jao-gnus--trash-group "nnml:jao.trash")
- (jao-gnus--archiving-group "nnml:bigml.trove")
- (jao-gnus--spam-group "nnml:bigml.spam"))
+ (jao-gnus--spam-group "nnml:jao.spam")
+ (jao-gnus--archiving-group "nnml:bigml.trove"))
("nnml:bigml\\.inbox"
(gcc-self . t)
(auto-expire . t)
@@ -488,11 +472,11 @@
(expiry-wait . 7)
(expiry-target . delete)
(jao-gnus--archiving-group "nnml:feeds.trove"))
- ("nnml:feeds\\.\\(news\\|emacs\\|prog\\)$" (expiry-wait . 1))
+ ("^nnml:feeds\\.\\(news\\)$" (expiry-wait . 2))
("nnml:feeds\\.trove"
(auto-expire . nil)
(total-expire . nil))
- ("nnml:feeds.fun"
+ (,jao-gnus-image-groups-rx
(mm-html-inhibit-images nil)
(mm-html-blocked-images nil))
("\\(gmane\\|gwene\\)\\..*"
@@ -650,7 +634,7 @@
(define-key gnus-summary-mode-map "/!" 'jao-gnus-show-tickled)
(define-key gnus-summary-mode-map [f7] 'gnus-summary-force-verify-and-decrypt)
#+END_SRC
-*** Writing emails
+*** Saving emails
#+BEGIN_SRC emacs-lisp
(setq gnus-default-article-saver 'gnus-summary-save-article-mail)
(defvar jao-gnus-file-save-directory (expand-file-name "~/tmp"))