From c86e9958098d4616fced44319b5da63fde0595d5 Mon Sep 17 00:00:00 2001 From: fpi Date: Sun, 5 Apr 2020 13:50:08 +0200 Subject: Add gnus configuration --- gnus.org | 289 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 289 insertions(+) create mode 100644 gnus.org (limited to 'gnus.org') diff --git a/gnus.org b/gnus.org new file mode 100644 index 0000000..0240d8a --- /dev/null +++ b/gnus.org @@ -0,0 +1,289 @@ +#+PROPERTY: header-args:emacs-lisp :tangle tangle/gnus.el + +#+begin_src shell :results silent +ln -s $(pwd)/tangle/gnus.el ~/.gnus.el +#+end_src + +Load private settings +#+begin_src emacs-lisp +(setq secret-file (expand-file-name "emacs-private.el.gpg" + user-emacs-directory)) +(load secret-file) +#+end_src +* Config +#+begin_src emacs-lisp +;; (add-to-list 'gnus-secondary-select-methods +(setq gnus-select-method + `(nnimap ,private/imap-name + (nnimap-address ,private/imap-address) + (nnimap-server-port 993) + (nnimap-stream ssl) + (nnir-search-engine imap))) +#+end_src +Sort by newest first +#+begin_src emacs-lisp +(setq gnus-article-sort-functions '((not gnus-thread-sort-by-date)) + gnus-thread-sort-functions '((not gnus-thread-sort-by-date))) +#+end_src + +Sending mail +#+begin_src emacs-lisp :tangle no +(setq message-send-mail-function 'smtpmail-send-it + smtpmail-starttls-credentials '(("smtp.gmail.com" 587 nil nil)) + smtpmail-auth-credentials '(("smtp.gmail.com" 587 "your-name@gmail.com" nil)) + smtpmail-default-smtp-server "smtp.gmail.com" + smtpmail-smtp-server "smtp.gmail.com" + smtpmail-smtp-service 587 + starttls-use-gnutls t) +#+end_src + +Load only groups with level < 2 for faster startup. +#+begin_src emacs-lisp +(setq gnus-activate-level 2) +#+end_src +Sent mails are read. +#+begin_src emacs-lisp +(setq gnus-gcc-mark-as-read t) +#+end_src +Save sent mails in my imap folder +#+begin_src emacs-lisp +(setq gnus-message-archive-method "dummy string") +(setq gnus-message-archive-group private/imap-sent-folder) +#+end_src + +** Adaptive scoring +See [[info:gnus#Adaptive Scoring][info:gnus#Adaptive Scoring]]. +#+begin_src emacs-lisp +(setq gnus-use-adaptive-scoring '(word line)) +(setq gnus-adaptive-word-length-limit 5) +(setq gnus-adaptive-word-no-group-words t) +(setq gnus-summary-mark-below -300) +(setq gnus-default-adaptive-score-alist + '((gnus-unread-mark) + (gnus-ticked-mark) + (gnus-dormant-mark) + (gnus-del-mark (subject -1)) + (gnus-read-mark (subject 2)) + (gnus-expirable-mark (subject -1)) + (gnus-killed-mark (subject -3)) + (gnus-kill-file-mark) + (gnus-ancient-mark) + (gnus-low-score-mark) + (gnus-catchup-mark (subject -1)))) +#+end_src +Scoring List for Groups with various From Senders: +#+begin_example +'((gnus-unread-mark) + (gnus-ticked-mark (from 4)) + (gnus-dormant-mark (from 5)) + (gnus-del-mark (from -4) (subject -1)) + (gnus-read-mark (from 4) (subject 2)) + (gnus-expirable-mark (from -1) (subject -1)) + (gnus-killed-mark (from -1) (subject -3) (followup -1)) + (gnus-kill-file-mark) + (gnus-ancient-mark) + (gnus-low-score-mark) + (gnus-catchup-mark (from -1) (subject -1))) +#+end_example +** Window Layout +See [[info:gnus#Window Layout][info:gnus#Window Layout]]. +#+begin_src emacs-lisp +(setq gnus-use-full-window nil) +#+end_src +** Format Summary buffer lines +#+begin_src emacs-lisp +(setq gnus-summary-line-format "%U%R%z%I%(%[ %d : %-23,23f %]%) %s +") +#+end_src +** Demon +Background fetching for gnus. See the manual and [[https://www.emacswiki.org/emacs/GnusDemon][emacswiki]]. +#+begin_src emacs-lisp +(defun gnus-demon-scan-news-level (level only) + (let ((win (current-window-configuration)) + (gnus-read-active-file 'some) + (gnus-check-new-newsgroups nil) + (gnus-verbose 2) + (gnus-verbose-backends 5)) + (while-no-input + (unwind-protect + (save-window-excursion + (when (gnus-alive-p) + (with-current-buffer gnus-group-buffer + (gnus-group-get-new-news level only)))) + (set-window-configuration win))))) +(defun gnus-demon-scan-news-2 () + (gnus-demon-scan-news-level 2 nil)) +(defun gnus-demon-scan-news-3 () + (gnus-demon-scan-news-level 3 t)) + +(setq gnus-demon-timestep 10) +(gnus-demon-add-handler 'gnus-demon-scan-news-2 3 nil) +(gnus-demon-add-handler 'gnus-demon-scan-news-3 360 nil) +(gnus-demon-add-handler 'gnus-demon-scan-news-3 60 1) +#+end_src +** Modeline indicator +From the [[https://www.emacswiki.org/emacs/GnusNotify][emacswiki Gnus Notify]]. +#+begin_quote +[…] use ~G p~ in the group buffer, then add ~(modeline-notify t)~ […] +#+end_quote +Activate with [[elisp:gnus-mst-show-groups-with-new-messages]]. +Code: +#+begin_src emacs-lisp +;;; gnus-notify.el --- use the modeline to indicate groups with new messages + +;; Author: Mark Triggs +;; +;; Contributions from: Frederic Couchet + +;; This file is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; This file is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to +;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Commentary: + +;; This code provides modeline notification of when certain groups contain +;; unread messages. Groups for whom unread messages should be indicated are +;; chosen by setting a group parameter. + +;; Clicking on a group in the modeline will enter that group and view the new +;; message. + +;; Code: + +(require 'cl-lib) + +(defvar gnus-notify-show-unread-counts t + "If true, show the number of unread messages in the modeline in addition to shortened group names.") + + +(when (fboundp 'gnus-define-group-parameter) + (gnus-define-group-parameter + modeline-notify + :type bool + :parameter-type '(const :tag "Notify of new messages for this group." t) + :parameter-document "\ + +If this is set, the name of this group will be placed on the modeline when it +contains new messages")) + +(defvar gnus-mst-display-new-messages "") +(defvar gnus-mst-notify-groups '()) +(defvar gnus-notify-jump-to-group-hook '() + "This hook is invoked before jumping to a gnus group with unread messages. + Each hook should take a single argument - the GROUP to be selected") + + +(add-hook 'gnus-exit-gnus-hook + (lambda () + (setq gnus-mst-display-new-messages ""))) + + +(defun gnus-mst-notify-modeline-form () + gnus-mst-display-new-messages) + + +(if (featurep 'xemacs) + (unless (member 'gnus-mst-display-new-messages global-mode-string) + (if (null global-mode-string) + (setq global-mode-string '("" gnus-mst-display-new-messages)) + (setq global-mode-string + (append global-mode-string + '(gnus-mst-display-new-messages))))) + (unless (member '(:eval (gnus-mst-notify-modeline-form)) global-mode-string) + (setq global-mode-string + (append global-mode-string + (list '(:eval (gnus-mst-notify-modeline-form))))))) + + +(defun gnus-mst-notify-shorten-group-name (group) + "shorten the group name to make it better fit on the modeline" + (let ((name (if (string-match ":" group) + (cadr (split-string group "[:]")) + group))) + (mapconcat 'identity + (mapcar + (lambda (segment) + (string (elt segment 0))) + (split-string name "[\\./]")) + "."))) + + +(defun gnus-mst-notify-update-modeline () + "Update the modeline to show groups containing new messages" + (if gnus-mst-notify-groups + (setq gnus-mst-display-new-messages + (append (list " [m: ") + (cl-maplist + (lambda (sublist) + (let ((group (car sublist)) + (map (make-sparse-keymap))) + (define-key map [mode-line mouse-1] + `(lambda () + (interactive) + (run-hook-with-args + 'gnus-notify-jump-to-group-hook ,group) + (gnus-group-read-group nil nil ,group))) + (cl-list* + (list ':propertize + (if gnus-notify-show-unread-counts + (format "[%s %s]" + (gnus-mst-notify-shorten-group-name + (car sublist)) + (gnus-group-unread (car sublist))) + (format "%s" + (gnus-mst-notify-shorten-group-name + (car sublist)))) + 'face 'bold + 'keymap map + 'help-echo "Visit this group") + (if (cdr sublist) + (list ", ") + nil)))) + gnus-mst-notify-groups) + (list "] "))) + (setq gnus-mst-display-new-messages ""))) + + +(defun gnus-mst-notify-group (group) + "Add notification for this group" + (unless (member group gnus-mst-notify-groups) + (add-to-list 'gnus-mst-notify-groups group t) + (gnus-mst-notify-update-modeline))) + + +(defun gnus-mst-show-groups-with-new-messages (&rest ignored) + (interactive) + (setq gnus-mst-notify-groups '()) + (gnus-mst-notify-update-modeline) + (mapc #'(lambda (g) + (let* ((group (car g)) + (unread (gnus-group-unread group))) + (when (and (cdr (assoc 'modeline-notify + (gnus-group-find-parameter group))) + (and (numberp unread) (> unread 0))) + (gnus-mst-notify-group group)))) + gnus-newsrc-alist)) + + +(add-hook 'gnus-after-getting-new-news-hook + 'gnus-mst-show-groups-with-new-messages) + + +(add-hook 'gnus-summary-exit-hook + 'gnus-mst-show-groups-with-new-messages) + + +(provide 'gnus-notify) +;;; gnus-notify.el ends here +#+end_src -- cgit v1.2.3 From 7982deed85a67ff7b186b25ae90a14c52844ee80 Mon Sep 17 00:00:00 2001 From: fpi Date: Sun, 5 Apr 2020 20:00:27 +0200 Subject: Update symlinks --- gnus.org | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnus.org') diff --git a/gnus.org b/gnus.org index 0240d8a..a373bde 100644 --- a/gnus.org +++ b/gnus.org @@ -1,7 +1,7 @@ #+PROPERTY: header-args:emacs-lisp :tangle tangle/gnus.el -#+begin_src shell :results silent -ln -s $(pwd)/tangle/gnus.el ~/.gnus.el +#+begin_src shell :results silent :tangle tangle/symlink.sh :shebang "#!/bin/bash" +ln -siv $(pwd)/tangle/gnus.el ~/.gnus.el #+end_src Load private settings -- cgit v1.2.3 From 1537ca57df4901d0972bab2a18a56e65175121d3 Mon Sep 17 00:00:00 2001 From: fpi Date: Thu, 9 Apr 2020 16:39:31 +0200 Subject: Add nnreddit backend --- gnus.org | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gnus.org') diff --git a/gnus.org b/gnus.org index a373bde..6454d78 100644 --- a/gnus.org +++ b/gnus.org @@ -95,6 +95,12 @@ See [[info:gnus#Window Layout][info:gnus#Window Layout]]. (setq gnus-summary-line-format "%U%R%z%I%(%[ %d : %-23,23f %]%) %s ") #+end_src +** nnreddit +#+begin_src emacs-lisp +(use-package nnreddit + :ensure t) +(add-to-list 'gnus-secondary-select-methods '(nnreddit "")) +#+end_src ** Demon Background fetching for gnus. See the manual and [[https://www.emacswiki.org/emacs/GnusDemon][emacswiki]]. #+begin_src emacs-lisp -- cgit v1.2.3 From 8fff970f2a71002ba809280c737daa7ca3dff680 Mon Sep 17 00:00:00 2001 From: fpi Date: Thu, 9 Apr 2020 16:39:38 +0200 Subject: Disable accidental topic indentation with TAB --- gnus.org | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gnus.org') diff --git a/gnus.org b/gnus.org index 6454d78..d799395 100644 --- a/gnus.org +++ b/gnus.org @@ -50,7 +50,10 @@ Save sent mails in my imap folder (setq gnus-message-archive-method "dummy string") (setq gnus-message-archive-group private/imap-sent-folder) #+end_src - +Disable indenting a topic. I always do it by accident. +#+begin_src emacs-lisp +(define-key gnus-topic-mode-map (kbd "") nil) +#+end_src ** Adaptive scoring See [[info:gnus#Adaptive Scoring][info:gnus#Adaptive Scoring]]. #+begin_src emacs-lisp -- cgit v1.2.3 From 6f0bcb50ae1e022651f909b758a1c26c0ad4feda Mon Sep 17 00:00:00 2001 From: fpi Date: Sat, 9 May 2020 13:36:19 +0200 Subject: Setup fancy imap mail splitting --- gnus.org | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) (limited to 'gnus.org') diff --git a/gnus.org b/gnus.org index d799395..e50097a 100644 --- a/gnus.org +++ b/gnus.org @@ -14,11 +14,19 @@ Load private settings #+begin_src emacs-lisp ;; (add-to-list 'gnus-secondary-select-methods (setq gnus-select-method - `(nnimap ,private/imap-name - (nnimap-address ,private/imap-address) - (nnimap-server-port 993) - (nnimap-stream ssl) - (nnir-search-engine imap))) + `(nnimap ,private/imap-name + (nnimap-address ,private/imap-address) + (nnimap-server-port 993) + (nnimap-stream ssl) + (nnir-search-engine imap) + (nnimap-inbox "INBOX") + (nnimap-split-methods 'nnimap-split-fancy) + (nnimap-split-fancy + (| (: nnmail-split-fancy-with-parent) + ,@private/imap-split-fancy + "INBOX" + )) + )) #+end_src Sort by newest first #+begin_src emacs-lisp @@ -36,6 +44,13 @@ Sending mail smtpmail-smtp-service 587 starttls-use-gnutls t) #+end_src +Setup for fancy mail splitting. Also see the parameters in ~gnus-select-method~. +#+begin_src emacs-lisp +(setq nnmail-split-methods 'nnimap-split-fancy) + +(setq nnmail-cache-accepted-message-ids t) +(setq nnmail-message-id-cache-length 10000) +#+end_src Load only groups with level < 2 for faster startup. #+begin_src emacs-lisp -- cgit v1.2.3 From d36b31f33949e6d02e5f2514d74168cbfe0ff636 Mon Sep 17 00:00:00 2001 From: fpi Date: Sat, 9 May 2020 13:36:48 +0200 Subject: Add local nntp server I use pnntprss to convert rss and atom feeds to nntp --- gnus.org | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gnus.org') diff --git a/gnus.org b/gnus.org index e50097a..91ff202 100644 --- a/gnus.org +++ b/gnus.org @@ -28,6 +28,10 @@ Load private settings )) )) #+end_src +Add local nntp server +#+begin_src emacs-lisp +(add-to-list 'gnus-secondary-select-methods '(nntp "localhost" 4321)) +#+end_src Sort by newest first #+begin_src emacs-lisp (setq gnus-article-sort-functions '((not gnus-thread-sort-by-date)) -- cgit v1.2.3 From 500385ad9ad3bdee632b93f64b4f5b549bc25875 Mon Sep 17 00:00:00 2001 From: fpi Date: Sat, 9 May 2020 13:37:52 +0200 Subject: Enable message delaying --- gnus.org | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gnus.org') diff --git a/gnus.org b/gnus.org index 91ff202..8db3b08 100644 --- a/gnus.org +++ b/gnus.org @@ -73,6 +73,10 @@ Disable indenting a topic. I always do it by accident. #+begin_src emacs-lisp (define-key gnus-topic-mode-map (kbd "") nil) #+end_src +Enable message delaying (scheduling) +#+begin_src emacs-lisp +(gnus-delay-initialize) +#+end_src ** Adaptive scoring See [[info:gnus#Adaptive Scoring][info:gnus#Adaptive Scoring]]. #+begin_src emacs-lisp -- cgit v1.2.3 From 19fdb00168cc495b25a685d4ea8c6005a18dd2e5 Mon Sep 17 00:00:00 2001 From: fpi Date: Sat, 9 May 2020 13:38:09 +0200 Subject: Verify signed mail signatures and display results --- gnus.org | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gnus.org') diff --git a/gnus.org b/gnus.org index 8db3b08..ce6c357 100644 --- a/gnus.org +++ b/gnus.org @@ -77,6 +77,14 @@ Enable message delaying (scheduling) #+begin_src emacs-lisp (gnus-delay-initialize) #+end_src +Verify mail signatures with known protocols. +#+begin_src emacs-lisp +(setq mm-verify-option 'known) +#+end_src +Show buttons for result of signature verification & for multipart mails. To show the message fully buttonized use =K b= in the summary buffer. +#+begin_src emacs-lisp +(setq gnus-buttonized-mime-types '("multipart/signed" "multipart/alternative")) +#+end_src ** Adaptive scoring See [[info:gnus#Adaptive Scoring][info:gnus#Adaptive Scoring]]. #+begin_src emacs-lisp -- cgit v1.2.3 From 97050ca686a4b0a623e0a1a33f40602e659c61c7 Mon Sep 17 00:00:00 2001 From: fpi Date: Sat, 9 May 2020 13:41:06 +0200 Subject: Enable use of bbdb mail-alias in message-mode --- gnus.org | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gnus.org') diff --git a/gnus.org b/gnus.org index ce6c357..4ae2e23 100644 --- a/gnus.org +++ b/gnus.org @@ -85,6 +85,11 @@ Show buttons for result of signature verification & for multipart mails. To show #+begin_src emacs-lisp (setq gnus-buttonized-mime-types '("multipart/signed" "multipart/alternative")) #+end_src +Enable =mail-aliases= and create aliases for all mail adresses if an entry has multiple. +#+begin_src emacs-lisp +(add-hook 'message-setup-hook 'bbdb-mail-aliases) +(setq bbdb-mail-alias 'all) +#+end_src ** Adaptive scoring See [[info:gnus#Adaptive Scoring][info:gnus#Adaptive Scoring]]. #+begin_src emacs-lisp -- cgit v1.2.3 From 60efcd27d8ab30778bc05ea84daf6f3564fc120a Mon Sep 17 00:00:00 2001 From: fpi Date: Sat, 9 May 2020 13:41:29 +0200 Subject: Dont fetch large attachments before text --- gnus.org | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gnus.org') diff --git a/gnus.org b/gnus.org index 4ae2e23..4d8d75c 100644 --- a/gnus.org +++ b/gnus.org @@ -90,6 +90,10 @@ Enable =mail-aliases= and create aliases for all mail adresses if an entry has m (add-hook 'message-setup-hook 'bbdb-mail-aliases) (setq bbdb-mail-alias 'all) #+end_src +Don't fetch attachments before showing the message text to avoid long load times with big attachments. +#+begin_src emacs-lisp +(setq nnimap-fetch-partial-articles "text/") +#+end_src ** Adaptive scoring See [[info:gnus#Adaptive Scoring][info:gnus#Adaptive Scoring]]. #+begin_src emacs-lisp -- cgit v1.2.3 From dfe5a0cc71cb8c14aee7003423a53a1f49615f19 Mon Sep 17 00:00:00 2001 From: fpi Date: Sat, 9 May 2020 13:41:46 +0200 Subject: New handlers to fetch level 4 and 5 news --- gnus.org | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'gnus.org') diff --git a/gnus.org b/gnus.org index 4d8d75c..39623e2 100644 --- a/gnus.org +++ b/gnus.org @@ -164,11 +164,16 @@ Background fetching for gnus. See the manual and [[https://www.emacswiki.org/ema (gnus-demon-scan-news-level 2 nil)) (defun gnus-demon-scan-news-3 () (gnus-demon-scan-news-level 3 t)) +(defun gnus-demon-scan-news-4 () + (gnus-demon-scan-news-level 4 t)) +(defun gnus-demon-scan-news-5 () + (gnus-demon-scan-news-level 5 t)) (setq gnus-demon-timestep 10) (gnus-demon-add-handler 'gnus-demon-scan-news-2 3 nil) -(gnus-demon-add-handler 'gnus-demon-scan-news-3 360 nil) -(gnus-demon-add-handler 'gnus-demon-scan-news-3 60 1) +(gnus-demon-add-handler 'gnus-demon-scan-news-3 60 t) +(gnus-demon-add-handler 'gnus-demon-scan-news-4 130 1) +(gnus-demon-add-handler 'gnus-demon-scan-news-5 140 1) #+end_src ** Modeline indicator From the [[https://www.emacswiki.org/emacs/GnusNotify][emacswiki Gnus Notify]]. -- cgit v1.2.3 From a650dbf28fb1f624466641e92107edec3ea0c52d Mon Sep 17 00:00:00 2001 From: fpi Date: Fri, 5 Jun 2020 15:34:53 +0200 Subject: Use windows compatible file names --- gnus.org | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gnus.org') diff --git a/gnus.org b/gnus.org index 39623e2..907136e 100644 --- a/gnus.org +++ b/gnus.org @@ -128,6 +128,10 @@ Scoring List for Groups with various From Senders: (gnus-low-score-mark) (gnus-catchup-mark (from -1) (subject -1))) #+end_example +To ensure filenames compatible with Windows and stuff: +#+begin_src emacs-lisp +(setq nnheader-file-name-translation-alist '((?: . ?_) (?[ . ?_) (?] . ?_))) +#+end_src ** Window Layout See [[info:gnus#Window Layout][info:gnus#Window Layout]]. #+begin_src emacs-lisp -- cgit v1.2.3 From 2148c0f243f9ebbeef41e171e8aea7e7e2d341e6 Mon Sep 17 00:00:00 2001 From: fpi Date: Fri, 5 Jun 2020 15:35:42 +0200 Subject: Update adaptive scoring & introduce score decaying --- gnus.org | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) (limited to 'gnus.org') diff --git a/gnus.org b/gnus.org index 907136e..b3f7327 100644 --- a/gnus.org +++ b/gnus.org @@ -95,7 +95,7 @@ Don't fetch attachments before showing the message text to avoid long load times (setq nnimap-fetch-partial-articles "text/") #+end_src ** Adaptive scoring -See [[info:gnus#Adaptive Scoring][info:gnus#Adaptive Scoring]]. +See [[info:gnus#Adaptive Scoring][info:gnus#Adaptive Scoring]] and this [[https://notes.whatthefuck.computer/1417593600.0-note.html][blog post]] by Ryan Rix. #+begin_src emacs-lisp (setq gnus-use-adaptive-scoring '(word line)) (setq gnus-adaptive-word-length-limit 5) @@ -103,16 +103,22 @@ See [[info:gnus#Adaptive Scoring][info:gnus#Adaptive Scoring]]. (setq gnus-summary-mark-below -300) (setq gnus-default-adaptive-score-alist '((gnus-unread-mark) - (gnus-ticked-mark) - (gnus-dormant-mark) - (gnus-del-mark (subject -1)) - (gnus-read-mark (subject 2)) - (gnus-expirable-mark (subject -1)) - (gnus-killed-mark (subject -3)) - (gnus-kill-file-mark) - (gnus-ancient-mark) - (gnus-low-score-mark) - (gnus-catchup-mark (subject -1)))) + (gnus-ticked-mark) + (gnus-dormant-mark) + (gnus-del-mark (subject -50)) + (gnus-read-mark (from 5) (subject 100)) + (gnus-expirable-mark) + (gnus-killed-mark (subject -300)) + (gnus-kill-file-mark) + (gnus-ancient-mark) + (gnus-low-score-mark) + (gnus-catchup-mark (subject -40)))) +(setq gnus-default-adaptive-word-score-alist + `((,gnus-read-mark . 5) + (,gnus-catchup-mark . -5) + (,gnus-killed-mark . -15) + (,gnus-del-mark . -10))) +(setq gnus-adaptive-word-score-alist gnus-default-adaptive-word-score-alist) #+end_src Scoring List for Groups with various From Senders: #+begin_example @@ -132,6 +138,13 @@ To ensure filenames compatible with Windows and stuff: #+begin_src emacs-lisp (setq nnheader-file-name-translation-alist '((?: . ?_) (?[ . ?_) (?] . ?_))) #+end_src + +Slow scoring decay prevents huge scores from building up. Only run on =.ADAPT= score files and decay each scoring rule by 1 point or 1%, whichever is larger. +#+begin_src emacs-lisp +(setq gnus-decay-scores "\\.ADAPT\\'" + gnus-score-decay-constant 1 + gnus-score-decay-scale 0.01) +#+end_src ** Window Layout See [[info:gnus#Window Layout][info:gnus#Window Layout]]. #+begin_src emacs-lisp -- cgit v1.2.3 From 62d7f1af2da4d0e961221756a2d768e336390546 Mon Sep 17 00:00:00 2001 From: fpi Date: Fri, 5 Jun 2020 15:36:09 +0200 Subject: Split imap server definition --- gnus.org | 50 +++++++++++++++++++++++++++++++++++--------------- 1 file changed, 35 insertions(+), 15 deletions(-) (limited to 'gnus.org') diff --git a/gnus.org b/gnus.org index b3f7327..e0c0a8a 100644 --- a/gnus.org +++ b/gnus.org @@ -11,22 +11,42 @@ Load private settings (load secret-file) #+end_src * Config -#+begin_src emacs-lisp -;; (add-to-list 'gnus-secondary-select-methods +I use =imap= as my primary server. Setup some generic options: +#+begin_src emacs-lisp :noweb-ref imap :tangle no +nnimap ,private/imap-name +(nnimap-address ,private/imap-address) +(nnimap-server-port 993) +(nnimap-stream ssl) +(nnir-search-engine imap) +#+end_src +Only fetch partial articles. This saves time on opening messages with +large attachments. Load any text based parts and also load any +signature if the message is signed. Unfortunately to correctly verify +the signature the full message needs to be loaded, which is why I +disabled partial fetching for now. +#+begin_src emacs-lisp :noweb-ref imap :tangle no +;; (nnimap-fetch-partial-articles "\\(text/\\|signature\\)") +#+end_src +Set my default inbox folder. This is the folder mail is split out of. +#+begin_src emacs-lisp :noweb-ref imap :tangle no +(nnimap-inbox "INBOX") +#+end_src +Use fancy splitting and setup splitting rules. See [[info:gnus#Fancy Mail Splitting][info:gnus#Fancy Mail Splitting]] for details. +#+begin_src emacs-lisp :noweb-ref imap :tangle no +(nnimap-split-methods nnimap-split-fancy) +(nnimap-split-fancy + (| (: nnmail-split-fancy-with-parent) + ,@private/imap-split-fancy + "INBOX" + )) +#+end_src + +Noweb the primary server settings together. +#+begin_src emacs-lisp :noweb yes (setq gnus-select-method - `(nnimap ,private/imap-name - (nnimap-address ,private/imap-address) - (nnimap-server-port 993) - (nnimap-stream ssl) - (nnir-search-engine imap) - (nnimap-inbox "INBOX") - (nnimap-split-methods 'nnimap-split-fancy) - (nnimap-split-fancy - (| (: nnmail-split-fancy-with-parent) - ,@private/imap-split-fancy - "INBOX" - )) - )) + `( + <> + )) #+end_src Add local nntp server #+begin_src emacs-lisp -- cgit v1.2.3 From 2befd2e7229e9a960bcb904a53c592166cfe0f89 Mon Sep 17 00:00:00 2001 From: fpi Date: Fri, 5 Jun 2020 15:36:41 +0200 Subject: Better thread display & topic fixes --- gnus.org | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 56 insertions(+), 2 deletions(-) (limited to 'gnus.org') diff --git a/gnus.org b/gnus.org index e0c0a8a..315e16c 100644 --- a/gnus.org +++ b/gnus.org @@ -57,7 +57,35 @@ Sort by newest first (setq gnus-article-sort-functions '((not gnus-thread-sort-by-date)) gnus-thread-sort-functions '((not gnus-thread-sort-by-date))) #+end_src - +Gathering loose threads, whose parent is currently not displayed. I find the default ~'adopt~ to be too confusing. +#+begin_src emacs-lisp +(setq gnus-summary-make-false-root 'dummy) +(setq gnus-summary-dummy-line-format " %(: :%) %S +") +(setq gnus-summary-make-false-root-always t) +#+end_src +Also try to connect threads by guessing which articles are missing +#+begin_src emacs-lisp +(setq gnus-fetch-old-headers nil) +(setq gnus-build-sparse-threads 'more) +#+end_src +Better thread display (from [[https://www.emacswiki.org/emacs/GnusFormatting][emacswiki/GnusFormatting)]]. +#+begin_src emacs-lisp +(setq + gnus-summary-line-format "%U%R%z %(%&user-date; %-15,15f %B%s%)\n" + gnus-user-date-format-alist '((t . "%Y-%m-%d %H:%M")) + gnus-summary-thread-gathering-function 'gnus-gather-threads-by-references + gnus-sum-thread-tree-false-root "" + gnus-sum-thread-tree-indent " " + gnus-sum-thread-tree-leaf-with-other "├► " + gnus-sum-thread-tree-root "" + gnus-sum-thread-tree-single-leaf "╰► " + gnus-sum-thread-tree-vertical "│") +#+end_src +Unicode reply symbol +#+begin_src emacs-lisp +(setq gnus-summary-to-prefix "→ ") +#+end_src Sending mail #+begin_src emacs-lisp :tangle no (setq message-send-mail-function 'smtpmail-send-it @@ -91,7 +119,33 @@ Save sent mails in my imap folder #+end_src Disable indenting a topic. I always do it by accident. #+begin_src emacs-lisp -(define-key gnus-topic-mode-map (kbd "") nil) +(use-package gnus-topic + :config + (defun fpi/gnus-topic-toggle-topic () + "Toggle display of the topic." + (interactive) + (when (gnus-group-topic-p) + (if (equal 'visible + (nth 1 (cadr (gnus-topic-find-topology (gnus-current-topic))))) + (gnus-topic-hide-topic) + (gnus-topic-show-topic)))) + (define-key gnus-topic-mode-map (kbd "") 'fpi/gnus-topic-toggle-topic) + (define-key gnus-topic-mode-map (kbd "TAB") 'fpi/gnus-topic-toggle-topic)) +#+end_src +Function to toggle display of group levels in the group buffer. +#+begin_src emacs-lisp +(defvar gnus-group-line-format-wo-levels nil) +(defun fpi/gnus-group-toggle-levels () + (interactive) + (if gnus-group-line-format-wo-levels + (setq gnus-group-line-format gnus-group-line-format-wo-levels + gnus-group-line-format-wo-levels nil) + (setq gnus-group-line-format-wo-levels gnus-group-line-format + gnus-group-line-format (concat "[%L] " gnus-group-line-format))) + ;; Hack to update display + (gnus-group-get-new-news 0)) +(define-key gnus-topic-mode-map (kbd "T L") 'fpi/gnus-group-toggle-levels) +#+end_src #+end_src Enable message delaying (scheduling) #+begin_src emacs-lisp -- cgit v1.2.3 From 58b750c90380595ca848c34d3d0e1c9ce63eb329 Mon Sep 17 00:00:00 2001 From: fpi Date: Fri, 5 Jun 2020 15:36:58 +0200 Subject: Add icalendar support --- gnus.org | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'gnus.org') diff --git a/gnus.org b/gnus.org index 315e16c..94227da 100644 --- a/gnus.org +++ b/gnus.org @@ -146,6 +146,15 @@ Function to toggle display of group levels in the group buffer. (gnus-group-get-new-news 0)) (define-key gnus-topic-mode-map (kbd "T L") 'fpi/gnus-group-toggle-levels) #+end_src +Enable responding to meeting invites. +#+begin_src emacs-lisp +(use-package gnus-icalendar + :config + (gnus-icalendar-setup) + (setq gnus-icalendar-org-capture-file "~/win/Documents/sync/appointments.org") + (setq gnus-icalendar-org-capture-headline '("Calendar")) ;;make sure to create Calendar heading first + (gnus-icalendar-org-setup) + ) #+end_src Enable message delaying (scheduling) #+begin_src emacs-lisp -- cgit v1.2.3 From 2857ea9e67b66e5479100266c754c6e557fce314 Mon Sep 17 00:00:00 2001 From: fpi Date: Fri, 5 Jun 2020 15:37:17 +0200 Subject: Fixes --- gnus.org | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'gnus.org') diff --git a/gnus.org b/gnus.org index 94227da..7f26fbd 100644 --- a/gnus.org +++ b/gnus.org @@ -175,7 +175,11 @@ Enable =mail-aliases= and create aliases for all mail adresses if an entry has m #+end_src Don't fetch attachments before showing the message text to avoid long load times with big attachments. #+begin_src emacs-lisp -(setq nnimap-fetch-partial-articles "text/") +(setq nnimap-fetch-partial-articles "\\(text/\\|signature\\)") +#+end_src +Workaround for bug with ~gnus-cloud-method~ and ~custom-variable-recalc-variable~ upon reloading the =spacemacs-*= theme. +#+begin_src emacs-lisp +(setq server "nnimap:imsmail") #+end_src ** Adaptive scoring See [[info:gnus#Adaptive Scoring][info:gnus#Adaptive Scoring]] and this [[https://notes.whatthefuck.computer/1417593600.0-note.html][blog post]] by Ryan Rix. @@ -235,8 +239,8 @@ See [[info:gnus#Window Layout][info:gnus#Window Layout]]. #+end_src ** Format Summary buffer lines #+begin_src emacs-lisp -(setq gnus-summary-line-format "%U%R%z%I%(%[ %d : %-23,23f %]%) %s -") +;; (setq gnus-summary-line-format "%U%R%z%I%(%[ %d : %-23,23f %]%) %s +;; ") #+end_src ** nnreddit #+begin_src emacs-lisp -- cgit v1.2.3 From 7436c81b662994312cf3d4078b96337538380e86 Mon Sep 17 00:00:00 2001 From: fpi Date: Mon, 15 Jun 2020 08:11:14 +0200 Subject: Update odd package specifications & reorder loading - To make sure org is loaded with straight any org-crypt stuff is moved back. - load-theme is moved to the end to ensure pdf-tools is loaded beforehand. - Fix various other warnings --- gnus.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnus.org') diff --git a/gnus.org b/gnus.org index 7f26fbd..7d6fe19 100644 --- a/gnus.org +++ b/gnus.org @@ -245,7 +245,7 @@ See [[info:gnus#Window Layout][info:gnus#Window Layout]]. ** nnreddit #+begin_src emacs-lisp (use-package nnreddit - :ensure t) + :straight t) (add-to-list 'gnus-secondary-select-methods '(nnreddit "")) #+end_src ** Demon -- cgit v1.2.3 From cea6226bb677db358da6e7d44fce906a9818fc28 Mon Sep 17 00:00:00 2001 From: fpi Date: Sat, 27 Jun 2020 13:16:29 +0200 Subject: Add personal imap --- gnus.org | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'gnus.org') diff --git a/gnus.org b/gnus.org index 7d6fe19..9dc05f0 100644 --- a/gnus.org +++ b/gnus.org @@ -13,9 +13,7 @@ Load private settings * Config I use =imap= as my primary server. Setup some generic options: #+begin_src emacs-lisp :noweb-ref imap :tangle no -nnimap ,private/imap-name -(nnimap-address ,private/imap-address) -(nnimap-server-port 993) +nnimap ,@private/imap-info (nnimap-stream ssl) (nnir-search-engine imap) #+end_src @@ -48,8 +46,14 @@ Noweb the primary server settings together. <> )) #+end_src -Add local nntp server + +Setup a secondary imap server and a local nntp server I use to fetch +RSS/Atom Feeds asynchronously. #+begin_src emacs-lisp +(add-to-list 'gnus-secondary-select-methods `(nnimap ,@private/personal-imap-info + (nnimap-stream ssl) + (nnir-search-engine imap) + (nnimap-inbox "INBOX"))) (add-to-list 'gnus-secondary-select-methods '(nntp "localhost" 4321)) #+end_src Sort by newest first -- cgit v1.2.3 From 160e0738df9f3199cb1d98381fabdc51db53cd50 Mon Sep 17 00:00:00 2001 From: fpi Date: Sat, 27 Jun 2020 13:26:56 +0200 Subject: Organize gnus.org --- gnus.org | 255 +++++++++++++++++++++++++++++++-------------------------------- 1 file changed, 124 insertions(+), 131 deletions(-) (limited to 'gnus.org') diff --git a/gnus.org b/gnus.org index 9dc05f0..ad27735 100644 --- a/gnus.org +++ b/gnus.org @@ -11,6 +11,7 @@ Load private settings (load secret-file) #+end_src * Config +** Servers I use =imap= as my primary server. Setup some generic options: #+begin_src emacs-lisp :noweb-ref imap :tangle no nnimap ,@private/imap-info @@ -56,62 +57,14 @@ RSS/Atom Feeds asynchronously. (nnimap-inbox "INBOX"))) (add-to-list 'gnus-secondary-select-methods '(nntp "localhost" 4321)) #+end_src -Sort by newest first -#+begin_src emacs-lisp -(setq gnus-article-sort-functions '((not gnus-thread-sort-by-date)) - gnus-thread-sort-functions '((not gnus-thread-sort-by-date))) -#+end_src -Gathering loose threads, whose parent is currently not displayed. I find the default ~'adopt~ to be too confusing. -#+begin_src emacs-lisp -(setq gnus-summary-make-false-root 'dummy) -(setq gnus-summary-dummy-line-format " %(: :%) %S -") -(setq gnus-summary-make-false-root-always t) -#+end_src -Also try to connect threads by guessing which articles are missing -#+begin_src emacs-lisp -(setq gnus-fetch-old-headers nil) -(setq gnus-build-sparse-threads 'more) -#+end_src -Better thread display (from [[https://www.emacswiki.org/emacs/GnusFormatting][emacswiki/GnusFormatting)]]. -#+begin_src emacs-lisp -(setq - gnus-summary-line-format "%U%R%z %(%&user-date; %-15,15f %B%s%)\n" - gnus-user-date-format-alist '((t . "%Y-%m-%d %H:%M")) - gnus-summary-thread-gathering-function 'gnus-gather-threads-by-references - gnus-sum-thread-tree-false-root "" - gnus-sum-thread-tree-indent " " - gnus-sum-thread-tree-leaf-with-other "├► " - gnus-sum-thread-tree-root "" - gnus-sum-thread-tree-single-leaf "╰► " - gnus-sum-thread-tree-vertical "│") -#+end_src -Unicode reply symbol -#+begin_src emacs-lisp -(setq gnus-summary-to-prefix "→ ") -#+end_src -Sending mail -#+begin_src emacs-lisp :tangle no -(setq message-send-mail-function 'smtpmail-send-it - smtpmail-starttls-credentials '(("smtp.gmail.com" 587 nil nil)) - smtpmail-auth-credentials '(("smtp.gmail.com" 587 "your-name@gmail.com" nil)) - smtpmail-default-smtp-server "smtp.gmail.com" - smtpmail-smtp-server "smtp.gmail.com" - smtpmail-smtp-service 587 - starttls-use-gnutls t) -#+end_src -Setup for fancy mail splitting. Also see the parameters in ~gnus-select-method~. -#+begin_src emacs-lisp -(setq nnmail-split-methods 'nnimap-split-fancy) - -(setq nnmail-cache-accepted-message-ids t) -(setq nnmail-message-id-cache-length 10000) -#+end_src - +** Options +*** General +**** Startup Load only groups with level < 2 for faster startup. #+begin_src emacs-lisp (setq gnus-activate-level 2) #+end_src +**** Message related Sent mails are read. #+begin_src emacs-lisp (setq gnus-gcc-mark-as-read t) @@ -121,35 +74,6 @@ Save sent mails in my imap folder (setq gnus-message-archive-method "dummy string") (setq gnus-message-archive-group private/imap-sent-folder) #+end_src -Disable indenting a topic. I always do it by accident. -#+begin_src emacs-lisp -(use-package gnus-topic - :config - (defun fpi/gnus-topic-toggle-topic () - "Toggle display of the topic." - (interactive) - (when (gnus-group-topic-p) - (if (equal 'visible - (nth 1 (cadr (gnus-topic-find-topology (gnus-current-topic))))) - (gnus-topic-hide-topic) - (gnus-topic-show-topic)))) - (define-key gnus-topic-mode-map (kbd "") 'fpi/gnus-topic-toggle-topic) - (define-key gnus-topic-mode-map (kbd "TAB") 'fpi/gnus-topic-toggle-topic)) -#+end_src -Function to toggle display of group levels in the group buffer. -#+begin_src emacs-lisp -(defvar gnus-group-line-format-wo-levels nil) -(defun fpi/gnus-group-toggle-levels () - (interactive) - (if gnus-group-line-format-wo-levels - (setq gnus-group-line-format gnus-group-line-format-wo-levels - gnus-group-line-format-wo-levels nil) - (setq gnus-group-line-format-wo-levels gnus-group-line-format - gnus-group-line-format (concat "[%L] " gnus-group-line-format))) - ;; Hack to update display - (gnus-group-get-new-news 0)) -(define-key gnus-topic-mode-map (kbd "T L") 'fpi/gnus-group-toggle-levels) -#+end_src Enable responding to meeting invites. #+begin_src emacs-lisp (use-package gnus-icalendar @@ -164,6 +88,13 @@ Enable message delaying (scheduling) #+begin_src emacs-lisp (gnus-delay-initialize) #+end_src +***** BBDB integration +Enable =mail-aliases= and create aliases for all mail adresses if an entry has multiple. +#+begin_src emacs-lisp +(add-hook 'message-setup-hook 'bbdb-mail-aliases) +(setq bbdb-mail-alias 'all) +#+end_src +***** Mail encryption & signing Verify mail signatures with known protocols. #+begin_src emacs-lisp (setq mm-verify-option 'known) @@ -172,20 +103,46 @@ Show buttons for result of signature verification & for multipart mails. To show #+begin_src emacs-lisp (setq gnus-buttonized-mime-types '("multipart/signed" "multipart/alternative")) #+end_src -Enable =mail-aliases= and create aliases for all mail adresses if an entry has multiple. -#+begin_src emacs-lisp -(add-hook 'message-setup-hook 'bbdb-mail-aliases) -(setq bbdb-mail-alias 'all) -#+end_src -Don't fetch attachments before showing the message text to avoid long load times with big attachments. +**** Mail splitting +Setup for fancy mail splitting. Also see the parameters in ~gnus-select-method~. #+begin_src emacs-lisp -(setq nnimap-fetch-partial-articles "\\(text/\\|signature\\)") +(setq nnmail-split-methods 'nnimap-split-fancy) + +(setq nnmail-cache-accepted-message-ids t) +(setq nnmail-message-id-cache-length 10000) #+end_src -Workaround for bug with ~gnus-cloud-method~ and ~custom-variable-recalc-variable~ upon reloading the =spacemacs-*= theme. +**** Demon +Background fetching for gnus. See the manual and [[https://www.emacswiki.org/emacs/GnusDemon][emacswiki]]. #+begin_src emacs-lisp -(setq server "nnimap:imsmail") +(defun gnus-demon-scan-news-level (level only) + (let ((win (current-window-configuration)) + (gnus-read-active-file 'some) + (gnus-check-new-newsgroups nil) + (gnus-verbose 2) + (gnus-verbose-backends 5)) + (while-no-input + (unwind-protect + (save-window-excursion + (when (gnus-alive-p) + (with-current-buffer gnus-group-buffer + (gnus-group-get-new-news level only)))) + (set-window-configuration win))))) +(defun gnus-demon-scan-news-2 () + (gnus-demon-scan-news-level 2 nil)) +(defun gnus-demon-scan-news-3 () + (gnus-demon-scan-news-level 3 t)) +(defun gnus-demon-scan-news-4 () + (gnus-demon-scan-news-level 4 t)) +(defun gnus-demon-scan-news-5 () + (gnus-demon-scan-news-level 5 t)) + +(setq gnus-demon-timestep 10) +(gnus-demon-add-handler 'gnus-demon-scan-news-2 3 nil) +(gnus-demon-add-handler 'gnus-demon-scan-news-3 60 t) +(gnus-demon-add-handler 'gnus-demon-scan-news-4 130 1) +(gnus-demon-add-handler 'gnus-demon-scan-news-5 140 1) #+end_src -** Adaptive scoring +**** Adaptive scoring See [[info:gnus#Adaptive Scoring][info:gnus#Adaptive Scoring]] and this [[https://notes.whatthefuck.computer/1417593600.0-note.html][blog post]] by Ryan Rix. #+begin_src emacs-lisp (setq gnus-use-adaptive-scoring '(word line)) @@ -236,54 +193,79 @@ Slow scoring decay prevents huge scores from building up. Only run on =.ADAPT= s gnus-score-decay-constant 1 gnus-score-decay-scale 0.01) #+end_src -** Window Layout -See [[info:gnus#Window Layout][info:gnus#Window Layout]]. +*** Display +Sort by newest first #+begin_src emacs-lisp -(setq gnus-use-full-window nil) +(setq gnus-article-sort-functions '((not gnus-thread-sort-by-date)) + gnus-thread-sort-functions '((not gnus-thread-sort-by-date))) #+end_src -** Format Summary buffer lines +Unicode reply symbol #+begin_src emacs-lisp -;; (setq gnus-summary-line-format "%U%R%z%I%(%[ %d : %-23,23f %]%) %s -;; ") +(setq gnus-summary-to-prefix "→ ") #+end_src -** nnreddit +Function to toggle display of group levels in the group buffer. #+begin_src emacs-lisp -(use-package nnreddit - :straight t) -(add-to-list 'gnus-secondary-select-methods '(nnreddit "")) +(defvar gnus-group-line-format-wo-levels nil) +(defun fpi/gnus-group-toggle-levels () + (interactive) + (if gnus-group-line-format-wo-levels + (setq gnus-group-line-format gnus-group-line-format-wo-levels + gnus-group-line-format-wo-levels nil) + (setq gnus-group-line-format-wo-levels gnus-group-line-format + gnus-group-line-format (concat "[%L] " gnus-group-line-format))) + ;; Hack to update display + (gnus-group-get-new-news 0)) +(define-key gnus-topic-mode-map (kbd "T L") 'fpi/gnus-group-toggle-levels) #+end_src -** Demon -Background fetching for gnus. See the manual and [[https://www.emacswiki.org/emacs/GnusDemon][emacswiki]]. +**** On threads +Gather loose threads, whose parent is currently not displayed, under a +dummy article. I find the default ~'adopt~ to be too confusing. #+begin_src emacs-lisp -(defun gnus-demon-scan-news-level (level only) - (let ((win (current-window-configuration)) - (gnus-read-active-file 'some) - (gnus-check-new-newsgroups nil) - (gnus-verbose 2) - (gnus-verbose-backends 5)) - (while-no-input - (unwind-protect - (save-window-excursion - (when (gnus-alive-p) - (with-current-buffer gnus-group-buffer - (gnus-group-get-new-news level only)))) - (set-window-configuration win))))) -(defun gnus-demon-scan-news-2 () - (gnus-demon-scan-news-level 2 nil)) -(defun gnus-demon-scan-news-3 () - (gnus-demon-scan-news-level 3 t)) -(defun gnus-demon-scan-news-4 () - (gnus-demon-scan-news-level 4 t)) -(defun gnus-demon-scan-news-5 () - (gnus-demon-scan-news-level 5 t)) - -(setq gnus-demon-timestep 10) -(gnus-demon-add-handler 'gnus-demon-scan-news-2 3 nil) -(gnus-demon-add-handler 'gnus-demon-scan-news-3 60 t) -(gnus-demon-add-handler 'gnus-demon-scan-news-4 130 1) -(gnus-demon-add-handler 'gnus-demon-scan-news-5 140 1) +(setq gnus-summary-make-false-root 'dummy) +(setq gnus-summary-dummy-line-format " %(: :%) %S +") +(setq gnus-summary-make-false-root-always t) +#+end_src +Also try to connect threads by guessing which articles are missing +#+begin_src emacs-lisp +(setq gnus-fetch-old-headers nil) +(setq gnus-build-sparse-threads 'more) +#+end_src +Better thread display (from [[https://www.emacswiki.org/emacs/GnusFormatting][emacswiki/GnusFormatting)]]. +#+begin_src emacs-lisp +(setq + gnus-summary-line-format "%U%R%z %(%&user-date; %-15,15f %B%s%)\n" + gnus-user-date-format-alist '((t . "%Y-%m-%d %H:%M")) + gnus-summary-thread-gathering-function 'gnus-gather-threads-by-references + gnus-sum-thread-tree-false-root "" + gnus-sum-thread-tree-indent " " + gnus-sum-thread-tree-leaf-with-other "├► " + gnus-sum-thread-tree-root "" + gnus-sum-thread-tree-single-leaf "╰► " + gnus-sum-thread-tree-vertical "│") +#+end_src +**** Topics +Disable indenting a topic. I always do it by accident. +#+begin_src emacs-lisp +(use-package gnus-topic + :config + (defun fpi/gnus-topic-toggle-topic () + "Toggle display of the topic." + (interactive) + (when (gnus-group-topic-p) + (if (equal 'visible + (nth 1 (cadr (gnus-topic-find-topology (gnus-current-topic))))) + (gnus-topic-hide-topic) + (gnus-topic-show-topic)))) + (define-key gnus-topic-mode-map (kbd "") 'fpi/gnus-topic-toggle-topic) + (define-key gnus-topic-mode-map (kbd "TAB") 'fpi/gnus-topic-toggle-topic)) #+end_src -** Modeline indicator +**** Window Layout +See [[info:gnus#Window Layout][info:gnus#Window Layout]]. +#+begin_src emacs-lisp +(setq gnus-use-full-window nil) +#+end_src +**** Modeline indicator From the [[https://www.emacswiki.org/emacs/GnusNotify][emacswiki Gnus Notify]]. #+begin_quote […] use ~G p~ in the group buffer, then add ~(modeline-notify t)~ […] @@ -449,3 +431,14 @@ contains new messages")) (provide 'gnus-notify) ;;; gnus-notify.el ends here #+end_src +*** Misc +Workaround for bug with ~gnus-cloud-method~ and ~custom-variable-recalc-variable~ upon reloading the =spacemacs-*= theme. +#+begin_src emacs-lisp +(setq server "nnimap:imsmail") +#+end_src +**** nnreddit +#+begin_src emacs-lisp +(use-package nnreddit + :straight t) +(add-to-list 'gnus-secondary-select-methods '(nnreddit "")) +#+end_src -- cgit v1.2.3 From 7009acda2889c6167dd68b765fb5212935113068 Mon Sep 17 00:00:00 2001 From: fpi Date: Wed, 1 Jul 2020 19:25:41 +0200 Subject: Fix gnus icalendar org file location --- gnus.org | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'gnus.org') diff --git a/gnus.org b/gnus.org index ad27735..84d5a33 100644 --- a/gnus.org +++ b/gnus.org @@ -79,7 +79,7 @@ Enable responding to meeting invites. (use-package gnus-icalendar :config (gnus-icalendar-setup) - (setq gnus-icalendar-org-capture-file "~/win/Documents/sync/appointments.org") + (setq gnus-icalendar-org-capture-file "~/sync/appointments.org") (setq gnus-icalendar-org-capture-headline '("Calendar")) ;;make sure to create Calendar heading first (gnus-icalendar-org-setup) ) @@ -203,20 +203,6 @@ Unicode reply symbol #+begin_src emacs-lisp (setq gnus-summary-to-prefix "→ ") #+end_src -Function to toggle display of group levels in the group buffer. -#+begin_src emacs-lisp -(defvar gnus-group-line-format-wo-levels nil) -(defun fpi/gnus-group-toggle-levels () - (interactive) - (if gnus-group-line-format-wo-levels - (setq gnus-group-line-format gnus-group-line-format-wo-levels - gnus-group-line-format-wo-levels nil) - (setq gnus-group-line-format-wo-levels gnus-group-line-format - gnus-group-line-format (concat "[%L] " gnus-group-line-format))) - ;; Hack to update display - (gnus-group-get-new-news 0)) -(define-key gnus-topic-mode-map (kbd "T L") 'fpi/gnus-group-toggle-levels) -#+end_src **** On threads Gather loose threads, whose parent is currently not displayed, under a dummy article. I find the default ~'adopt~ to be too confusing. @@ -260,6 +246,20 @@ Disable indenting a topic. I always do it by accident. (define-key gnus-topic-mode-map (kbd "") 'fpi/gnus-topic-toggle-topic) (define-key gnus-topic-mode-map (kbd "TAB") 'fpi/gnus-topic-toggle-topic)) #+end_src +Function to toggle display of group levels in the group buffer. +#+begin_src emacs-lisp +(defvar gnus-group-line-format-wo-levels nil) +(defun fpi/gnus-group-toggle-levels () + (interactive) + (if gnus-group-line-format-wo-levels + (setq gnus-group-line-format gnus-group-line-format-wo-levels + gnus-group-line-format-wo-levels nil) + (setq gnus-group-line-format-wo-levels gnus-group-line-format + gnus-group-line-format (concat "[%L] " gnus-group-line-format))) + ;; Hack to update display + (gnus-group-get-new-news 0)) +(define-key gnus-topic-mode-map (kbd "T L") 'fpi/gnus-group-toggle-levels) +#+end_src **** Window Layout See [[info:gnus#Window Layout][info:gnus#Window Layout]]. #+begin_src emacs-lisp -- cgit v1.2.3 From 29cb3385a9b60603ce9b040db1fa8ce49f38facb Mon Sep 17 00:00:00 2001 From: fpi Date: Tue, 7 Jul 2020 19:43:35 +0200 Subject: Add gnorb to combine gnus, org & bbdb --- gnus.org | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) (limited to 'gnus.org') diff --git a/gnus.org b/gnus.org index 84d5a33..d59780f 100644 --- a/gnus.org +++ b/gnus.org @@ -1,4 +1,4 @@ -#+PROPERTY: header-args:emacs-lisp :tangle tangle/gnus.el +#+PROPERTY: header-args:emacs-lisp :tangle tangle/gnus.el :noweb yes #+begin_src shell :results silent :tangle tangle/symlink.sh :shebang "#!/bin/bash" ln -siv $(pwd)/tangle/gnus.el ~/.gnus.el @@ -56,6 +56,7 @@ RSS/Atom Feeds asynchronously. (nnir-search-engine imap) (nnimap-inbox "INBOX"))) (add-to-list 'gnus-secondary-select-methods '(nntp "localhost" 4321)) +<> #+end_src ** Options *** General @@ -193,6 +194,30 @@ Slow scoring decay prevents huge scores from building up. Only run on =.ADAPT= s gnus-score-decay-constant 1 gnus-score-decay-scale 0.01) #+end_src +**** Registry +Use the [[info:gnus#The Gnus Registry][Gnus Registry]]. This is required to use [[id:990e2668-11d6-45eb-9c9b-1dc0b89b556d][Gnorb]]. +#+begin_src emacs-lisp +(gnus-registry-initialize) +#+end_src +#+begin_src emacs-lisp :tangle no :noweb-ref secondary-select-methods +(add-to-list 'gnus-secondary-select-methods '(nngnorb "Gnorb server")) +#+end_src +Enable gnorb tracking +#+begin_src emacs-lisp +(gnorb-tracking-initialize) +#+end_src +Hint for existing relevant tracked conversations in the summary buffer (see [[info:gnorb#Hinting in Gnus][info:gnorb#Hinting in Gnus]]). Already tracked messages are marked with =&= and new maybe relevant messages with =¡=. +#+begin_src fundamental :tangle no :noweb-ref gnorb-summary-line-format +%ug +#+end_src +Display [[info:gnorb#Tagging Messages and Contacts][message tags]] in the summary line. Stop other summary line content at column 120 and insert the tags after. +#+begin_src fundamental :tangle no :noweb-ref gnorb-summary-tags +%-120=%uG +#+end_src +Also automatically set message tags +#+begin_src emacs-lisp +(setq gnorb-gnus-auto-tag-messages t) +#+end_src *** Display Sort by newest first #+begin_src emacs-lisp @@ -220,8 +245,8 @@ Also try to connect threads by guessing which articles are missing Better thread display (from [[https://www.emacswiki.org/emacs/GnusFormatting][emacswiki/GnusFormatting)]]. #+begin_src emacs-lisp (setq - gnus-summary-line-format "%U%R%z %(%&user-date; %-15,15f %B%s%)\n" - gnus-user-date-format-alist '((t . "%Y-%m-%d %H:%M")) + gnus-summary-line-format "%U%R%z<> %(%&user-date; %-15,15f %B%s%) <>\n" + gnus-user-date-format-alist '((t . "%y-%m-%d %H:%M")) gnus-summary-thread-gathering-function 'gnus-gather-threads-by-references gnus-sum-thread-tree-false-root "" gnus-sum-thread-tree-indent " " -- cgit v1.2.3 From 99f445575ec26b13b1803a2bc24c3b2e8a445866 Mon Sep 17 00:00:00 2001 From: fpi Date: Wed, 8 Jul 2020 16:25:10 +0200 Subject: Fix gnorb in summary-line-format --- gnus.org | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'gnus.org') diff --git a/gnus.org b/gnus.org index d59780f..71f7041 100644 --- a/gnus.org +++ b/gnus.org @@ -244,8 +244,10 @@ Also try to connect threads by guessing which articles are missing #+end_src Better thread display (from [[https://www.emacswiki.org/emacs/GnusFormatting][emacswiki/GnusFormatting)]]. #+begin_src emacs-lisp -(setq - gnus-summary-line-format "%U%R%z<> %(%&user-date; %-15,15f %B%s%) <>\n" +(setq gnus-summary-line-format (concat "%U%R%z" + "<>" + " %(%&user-date; %-15,15f %B%s%) " + "<>" "\n") gnus-user-date-format-alist '((t . "%y-%m-%d %H:%M")) gnus-summary-thread-gathering-function 'gnus-gather-threads-by-references gnus-sum-thread-tree-false-root "" -- cgit v1.2.3 From 6903fe548d3625e1497e999a6bc71931bb2370d7 Mon Sep 17 00:00:00 2001 From: fpi Date: Wed, 8 Jul 2020 16:25:31 +0200 Subject: Enable gnus cloud --- gnus.org | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gnus.org') diff --git a/gnus.org b/gnus.org index 71f7041..d8aaa0f 100644 --- a/gnus.org +++ b/gnus.org @@ -218,6 +218,14 @@ Also automatically set message tags #+begin_src emacs-lisp (setq gnorb-gnus-auto-tag-messages t) #+end_src +**** Gnus Cloud +The [[info:gnus#The Gnus Cloud][Gnus Cloud]] lets you synchronize marks and general data (whatever that is) across different machines. This seems more complete than manually (with Nextcloud, …) syncing the news related files (=~/.newsrc.eld=, =~/News=, …). + +To enable it go to the gnus server buffer and mark the servers to be synced with =i= and the (imap) server which is used as host with =I=. +#+begin_src emacs-lisp +(setq gnus-cloud-method (concat "nnimap:" (car private/personal-imap-info))) +#+end_src +Commands to interact with the gnus cloud are prefixed with =~= in the group buffer. *** Display Sort by newest first #+begin_src emacs-lisp -- cgit v1.2.3 From 2831cc8d569b4f66e21aa7383cb6c9bf3f4127be Mon Sep 17 00:00:00 2001 From: fpi Date: Wed, 8 Jul 2020 16:25:38 +0200 Subject: Reorganize adaptive scoring & remove scoring on from --- gnus.org | 79 +++++++++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 51 insertions(+), 28 deletions(-) (limited to 'gnus.org') diff --git a/gnus.org b/gnus.org index d8aaa0f..6f0302b 100644 --- a/gnus.org +++ b/gnus.org @@ -145,44 +145,67 @@ Background fetching for gnus. See the manual and [[https://www.emacswiki.org/ema #+end_src **** Adaptive scoring See [[info:gnus#Adaptive Scoring][info:gnus#Adaptive Scoring]] and this [[https://notes.whatthefuck.computer/1417593600.0-note.html][blog post]] by Ryan Rix. +***** Score File Setup #+begin_src emacs-lisp (setq gnus-use-adaptive-scoring '(word line)) (setq gnus-adaptive-word-length-limit 5) (setq gnus-adaptive-word-no-group-words t) (setq gnus-summary-mark-below -300) (setq gnus-default-adaptive-score-alist - '((gnus-unread-mark) - (gnus-ticked-mark) - (gnus-dormant-mark) - (gnus-del-mark (subject -50)) - (gnus-read-mark (from 5) (subject 100)) - (gnus-expirable-mark) - (gnus-killed-mark (subject -300)) - (gnus-kill-file-mark) - (gnus-ancient-mark) - (gnus-low-score-mark) - (gnus-catchup-mark (subject -40)))) + '( + <>)) (setq gnus-default-adaptive-word-score-alist `((,gnus-read-mark . 5) (,gnus-catchup-mark . -5) (,gnus-killed-mark . -15) - (,gnus-del-mark . -10))) -(setq gnus-adaptive-word-score-alist gnus-default-adaptive-word-score-alist) -#+end_src -Scoring List for Groups with various From Senders: -#+begin_example -'((gnus-unread-mark) - (gnus-ticked-mark (from 4)) - (gnus-dormant-mark (from 5)) - (gnus-del-mark (from -4) (subject -1)) - (gnus-read-mark (from 4) (subject 2)) - (gnus-expirable-mark (from -1) (subject -1)) - (gnus-killed-mark (from -1) (subject -3) (followup -1)) - (gnus-kill-file-mark) - (gnus-ancient-mark) - (gnus-low-score-mark) - (gnus-catchup-mark (from -1) (subject -1))) -#+end_example + (,gnus-del-mark . -10)) + ) +;; (setq gnus-adaptive-word-score-alist gnus-default-adaptive-word-score-alist) +#+end_src +****** Using different (adaptive) scoring files for different groups +To define different adaptive scoring files for different groups I set [[info:gnus#Home Score File][home score files]] based on the group name. +#+begin_src emacs-lisp +(setq gnus-home-score-file + '(("^nnimap" "nnimap.SCORE") ;; w/ author scoring + ("gmane" "nntp_gmane.SCORE") ;; w/ author scoring + ("^nntp\\+localhost" "nntp_global.SCORE") ;; w/o author scoring + )) +(setq gnus-home-adapt-file + '(("^nnimap" "nnimap.ADAPT") + ("gmane" "nntp_gmane.ADAPT") + ("^nntp\\+localhost" "nntp_global.ADAPT"))) +#+end_src +Scoring based on the =from= header does not make sense for rss feeds with only one author or newsgroups with unset author. These files therefore contain my default adaptive scoring rules with or without =from= scoring. +#+NAME: gnus-adaptive-scoring-w-from +#+begin_src emacs-lisp :tangle no :eval never +(gnus-unread-mark) +(gnus-ticked-mark (from 4)) +(gnus-dormant-mark (from 5)) +(gnus-del-mark (from -4) (subject -50)) +(gnus-read-mark (from 5) (subject 100)) +(gnus-expirable-mark) +(gnus-killed-mark (from -5) (subject -300) (followup -150)) +(gnus-kill-file-mark) +(gnus-ancient-mark) +(gnus-low-score-mark) +(gnus-catchup-mark (from -2) (subject -40)) +#+end_src +#+NAME: gnus-adaptive-scoring-wo-from +#+begin_src emacs-lisp :tangle no :eval never +(gnus-unread-mark) +(gnus-ticked-mark) +(gnus-dormant-mark) +(gnus-del-mark (subject -50)) +(gnus-read-mark (subject 100)) +(gnus-expirable-mark) +(gnus-killed-mark (subject -300) (followup -150)) +(gnus-kill-file-mark) +(gnus-ancient-mark) +(gnus-low-score-mark) +(gnus-catchup-mark (subject -40)) +#+end_src +Unfortunately setting these on a per group basis does not work currently as it would (at least) override the word scoring setting. So I stick with the same adaptive scoring rules for all groups set above. +***** Misc Options To ensure filenames compatible with Windows and stuff: #+begin_src emacs-lisp (setq nnheader-file-name-translation-alist '((?: . ?_) (?[ . ?_) (?] . ?_))) -- cgit v1.2.3 From 07911468c09a7fe25fce4ff79ded5d05826504d5 Mon Sep 17 00:00:00 2001 From: fpi Date: Wed, 8 Jul 2020 16:44:30 +0200 Subject: Add .ADAPT files to gnus-cloud --- gnus.org | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gnus.org') diff --git a/gnus.org b/gnus.org index 6f0302b..c070a3b 100644 --- a/gnus.org +++ b/gnus.org @@ -249,6 +249,9 @@ To enable it go to the gnus server buffer and mark the servers to be synced with (setq gnus-cloud-method (concat "nnimap:" (car private/personal-imap-info))) #+end_src Commands to interact with the gnus cloud are prefixed with =~= in the group buffer. +#+begin_src emacs-lisp +(setq gnus-cloud-synced-files '("~/.authinfo.gpg" "~/.gnus.registry.eieio" (:directory "~/News" :match ".*.\\(SCORE\\|ADAPT\\)"))) +#+end_src *** Display Sort by newest first #+begin_src emacs-lisp -- cgit v1.2.3 From c7fa8bd0319449f2f6acfa31cea111f0b1e1d098 Mon Sep 17 00:00:00 2001 From: fpi Date: Sat, 1 Aug 2020 18:10:09 +0200 Subject: Add some ignored words for adaptive scoring --- gnus.org | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gnus.org') diff --git a/gnus.org b/gnus.org index c070a3b..736fa57 100644 --- a/gnus.org +++ b/gnus.org @@ -217,6 +217,13 @@ Slow scoring decay prevents huge scores from building up. Only run on =.ADAPT= s gnus-score-decay-constant 1 gnus-score-decay-scale 0.01) #+end_src +****** Ignored Words +Do not score on some common german words. I extracted these from my score file after a few weeks of using scoring. +#+begin_src emacs-lisp +(setq gnus-ignored-adaptive-words + '("loswerden" "teilweise" "übernahme" "betrieb" "kündigt" "schnittstelle" "abgewendet" "hälfte" "massiv" "massivst" "angeblich" "verschleppt" "startup" "auslistung" "wichtiger" "öffentliches" "verwenden" "asynchron" "lieber" "arbeite" "zahlreiche" "november" "entscheidung" "käufer" "findet" "mittlere" "vorstoß" "starker" "erreicht" "letzte" "geplant" "september" "nachfolger" "ankündigen" "mildern" "antrieb" "lassen" "aufsteigen" "entdeckt" "hinweise" "bedingungen" "miniserie" "funktioniert" "umfragen" "angreifbare" "fiasko" "prüfstand" "sparsamer" "steigt" "zugangsdaten" "tutorial" "details" "verfahren" "verschiebt" "enorme" "schlechtere" "erwarten" "optimierungen" "aushalten" "kratzer" "stürze" "gelöscht" "getestet" "stalker" "showcase" "warnung" "maßnahmenplan" "konstruieren" "deutsches" "großen" "probefahrt" "interesse" "preise" "verteilt" "leaken" "günstiger" "umgerüstet" "ausflug" "edition" "definitive" "schützen" "zeiten" "größte" "sicherer" "falsches" "schnelles" "wollte" "angebunden" "externe" "aktualisiertes" "zweiten" "limitiert" "überraschend" "unsicher" "schonfrist" "strukturiert" "historisches" "riesige" "gründet" "mitarbeiter" "geleakt" "mutmaßlichem" "idiotensicher" "stunden" "zornige" "schwächer" "funktionierende" "meinen" "meisten" "geringer" "gewinnen" "rennen" "halten" "synchronisation" "normal" "riesiges" "bessere" "enthält" "integriert" "project" "zurücknehmen" "verursacht" "bleibt" "angeschlossene" "verbrauchen" "berichtet" "ausmachen" "unterschied" "stoppen" "weiterhin" "ausschluss" "schaffen" "exklusives" "riesiger" "keinen" "verbesserter" "steckt" "kündigen" "dienste" "erwägt" "dürfen" "demonstriert" "unerlaubter" "möglichkeiten" "unendlicher" "unbegrenzte" "vermehrt" "greift" "veröffentlicht" "komplett" "warten" "blockiert" "freier" "erscheinen" "reicht" "fliegen" "eigene" "erweitert" "sollen" "könnte" "erscheint" "können" "arbeiten" "eigenen" "lieferbar" "kostet" "kommen" "startet" "zurück" "bestätigt" "schnell" "bietet" "unterstützen" "zahlen" "bekommt" "ersten" "schneller" "verkauft" "kaufen" "machen" "vorgestellt" "bringt" "offenbar" "geräte" "präsentiert" "videos" "stellt" "schließt" "werden" "erhält" "wieder" "endlich" "verfügbar" "deutsche" + )) +#+end_src **** Registry Use the [[info:gnus#The Gnus Registry][Gnus Registry]]. This is required to use [[id:990e2668-11d6-45eb-9c9b-1dc0b89b556d][Gnorb]]. #+begin_src emacs-lisp -- cgit v1.2.3 From ba50c87d9092724138eadb52943280594abe1ffe Mon Sep 17 00:00:00 2001 From: fpi Date: Sat, 1 Aug 2020 18:10:25 +0200 Subject: Adjust adaptive scoring rules --- gnus.org | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gnus.org') diff --git a/gnus.org b/gnus.org index 736fa57..de2a60d 100644 --- a/gnus.org +++ b/gnus.org @@ -155,10 +155,10 @@ See [[info:gnus#Adaptive Scoring][info:gnus#Adaptive Scoring]] and this [[https: '( <>)) (setq gnus-default-adaptive-word-score-alist - `((,gnus-read-mark . 5) - (,gnus-catchup-mark . -5) + `((,gnus-read-mark . 10) + (,gnus-catchup-mark . -4) (,gnus-killed-mark . -15) - (,gnus-del-mark . -10)) + (,gnus-del-mark . -8)) ) ;; (setq gnus-adaptive-word-score-alist gnus-default-adaptive-word-score-alist) #+end_src -- cgit v1.2.3 From ab3de4324bd56cde6916e183e9670f684e6f6fa8 Mon Sep 17 00:00:00 2001 From: fpi Date: Sat, 1 Aug 2020 18:44:32 +0200 Subject: Add dotfiles patch files to gnus cloud --- gnus.org | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gnus.org') diff --git a/gnus.org b/gnus.org index de2a60d..907a387 100644 --- a/gnus.org +++ b/gnus.org @@ -257,7 +257,10 @@ To enable it go to the gnus server buffer and mark the servers to be synced with #+end_src Commands to interact with the gnus cloud are prefixed with =~= in the group buffer. #+begin_src emacs-lisp -(setq gnus-cloud-synced-files '("~/.authinfo.gpg" "~/.gnus.registry.eieio" (:directory "~/News" :match ".*.\\(SCORE\\|ADAPT\\)"))) +(setq gnus-cloud-synced-files '("~/.authinfo.gpg" + "~/.gnus.registry.eieio" + (:directory "~/News" :match ".*.\\(SCORE\\|ADAPT\\)") + (:directory "~/git/projects/dotfiles" :match "[0-9]+-.*\\.patch"))) #+end_src *** Display Sort by newest first -- cgit v1.2.3 From 14ffbb4a37f34277583a3d80cb30bb760e914790 Mon Sep 17 00:00:00 2001 From: fpi Date: Sun, 23 Aug 2020 12:53:28 +0200 Subject: Add function to partially download from gnus cloud --- gnus.org | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 63 insertions(+), 9 deletions(-) (limited to 'gnus.org') diff --git a/gnus.org b/gnus.org index 907a387..f2e2cc6 100644 --- a/gnus.org +++ b/gnus.org @@ -249,18 +249,72 @@ Also automatically set message tags (setq gnorb-gnus-auto-tag-messages t) #+end_src **** Gnus Cloud -The [[info:gnus#The Gnus Cloud][Gnus Cloud]] lets you synchronize marks and general data (whatever that is) across different machines. This seems more complete than manually (with Nextcloud, …) syncing the news related files (=~/.newsrc.eld=, =~/News=, …). +The [[info:gnus#The Gnus Cloud][Gnus Cloud]] lets you synchronize marks and general data (whatever that is) across different machines. +This seems more complete than manually (with Nextcloud, …) syncing the news related files (=~/.newsrc.eld=, =~/News=, …).+ To enable it go to the gnus server buffer and mark the servers to be synced with =i= and the (imap) server which is used as host with =I=. -#+begin_src emacs-lisp -(setq gnus-cloud-method (concat "nnimap:" (car private/personal-imap-info))) -#+end_src + Commands to interact with the gnus cloud are prefixed with =~= in the group buffer. -#+begin_src emacs-lisp -(setq gnus-cloud-synced-files '("~/.authinfo.gpg" - "~/.gnus.registry.eieio" - (:directory "~/News" :match ".*.\\(SCORE\\|ADAPT\\)") - (:directory "~/git/projects/dotfiles" :match "[0-9]+-.*\\.patch"))) + +#+begin_src emacs-lisp :noweb yes +(use-package gnus-cloud + :custom + (gnus-cloud-method (concat "nnimap:" (car private/personal-imap-info))) + (gnus-cloud-synced-files '("~/.authinfo.gpg" + ;; "~/.gnus.registry.eieio" + ;; (:directory "~/News" :match ".*.\\(SCORE\\|ADAPT\\)") + (:directory "~/git/projects/dotfiles" :match "[0-9]+-.*\\.patch"))) + (gnus-cloud-storage-method 'epg) + :config + <> + ) +#+end_src + +***** Only download specific files +Gnus Cloud sync all newsrc data and the specified files. Sometimes one would only want to download and update only specific files without overwriting all newsrc data. + +This function is very similar to ~gnus-cloud-download-data~ but takes a regexp to match against filenames. Note that it does not update ~gnus-cloud-sequence~ (for now). So when only doing partial downloads repeatedly you may need to update ~gnus-cloud-sequence~ manually. +#+begin_src emacs-lisp :noweb-ref gnus-cloud-config +(defun fpi/gnus-cloud-download-some (regexp &optional sequence-override) + "Download and install files matching REGEXP." + (interactive "sRegexp to match: ") + (let ((articles nil) + (highest-sequence-seen gnus-cloud-sequence) + chunks) + (dolist (header (gnus-cloud-available-chunks)) + (let ((this-sequence (gnus-cloud-chunk-sequence (mail-header-subject header)))) + (when (> this-sequence (or sequence-override gnus-cloud-sequence -1)) + + (if (string-match (format "storage-method: %s" gnus-cloud-storage-method) + (mail-header-subject header)) + (progn + (push (mail-header-number header) articles) + (setq highest-sequence-seen (max highest-sequence-seen this-sequence))) + (gnus-message 1 "Skipping article %s because it didn't match the Gnus Cloud method %s: %s" + (mail-header-number header) + gnus-cloud-storage-method + (mail-header-subject header)))))) + (when articles + (nnimap-request-articles (nreverse articles) gnus-cloud-group-name) + (with-current-buffer nntp-server-buffer + (goto-char (point-min)) + (while (re-search-forward "^Gnus-Cloud-Version " nil t) + (beginning-of-line) + (push (gnus-cloud-parse-chunk) chunks) + (forward-line 1)))) + (mapcar (lambda (chunk) (fpi/gnus-cloud-update-some chunk regexp)) chunks))) + +(defun fpi/gnus-cloud-update-some (elems regexp) + (dolist (elem elems) + (let ((type (plist-get elem :type)) + (name (plist-get elem :file-name))) + (when (and (memq type '(:delete :file)) + (with-temp-buffer + (insert name) + (beginning-of-buffer) + (re-search-forward regexp nil t))) + (message "Match: Updating %s" name) + (gnus-cloud-update-file elem type))))) +(define-key gnus-group-mode-map (kbd "~ p") 'fpi/gnus-cloud-download-some) #+end_src *** Display Sort by newest first -- cgit v1.2.3 From 8fe2fbb28fbe36e6e44679f1bb0d9bd7f31751b8 Mon Sep 17 00:00:00 2001 From: fpi Date: Fri, 18 Sep 2020 15:54:03 +0200 Subject: Use IMAP namespaces to distinguish IMAP servers --- gnus.org | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gnus.org') diff --git a/gnus.org b/gnus.org index f2e2cc6..990eac0 100644 --- a/gnus.org +++ b/gnus.org @@ -58,6 +58,10 @@ RSS/Atom Feeds asynchronously. (add-to-list 'gnus-secondary-select-methods '(nntp "localhost" 4321)) <> #+end_src + +#+begin_src emacs-lisp +(setq nnimap-use-namespaces t) +#+end_src ** Options *** General **** Startup -- cgit v1.2.3 From 8e16453b4a7cd2644ac3a35ea8d7885bfed0846b Mon Sep 17 00:00:00 2001 From: fpi Date: Fri, 18 Sep 2020 15:54:51 +0200 Subject: Slim down registry to only mail groups --- gnus.org | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'gnus.org') diff --git a/gnus.org b/gnus.org index 990eac0..d5556d9 100644 --- a/gnus.org +++ b/gnus.org @@ -233,6 +233,21 @@ Use the [[info:gnus#The Gnus Registry][Gnus Registry]]. This is required to use #+begin_src emacs-lisp (gnus-registry-initialize) #+end_src +Remove some groups from being saved to the registry +#+begin_src emacs-lisp +(setq gnus-registry-split-strategy 'majority) +(setq gnus-registry-ignored-groups + '(("^nnreddit" t) + ("^nntp" t) + ("delayed$" t) + ("drafts$" t) + ("queue$" t) + ("INBOX$" t) + ("^nnmairix:" t) + ("^nnir:" t) + ("archive" t) + )) +#+end_src #+begin_src emacs-lisp :tangle no :noweb-ref secondary-select-methods (add-to-list 'gnus-secondary-select-methods '(nngnorb "Gnorb server")) #+end_src -- cgit v1.2.3 From 00f5d351509e13e2bd190a9b5250514523672f26 Mon Sep 17 00:00:00 2001 From: fpi Date: Fri, 18 Sep 2020 15:55:05 +0200 Subject: Delight gnus-topic mode --- gnus.org | 1 + 1 file changed, 1 insertion(+) (limited to 'gnus.org') diff --git a/gnus.org b/gnus.org index d5556d9..4f5a600 100644 --- a/gnus.org +++ b/gnus.org @@ -378,6 +378,7 @@ Better thread display (from [[https://www.emacswiki.org/emacs/GnusFormatting][em Disable indenting a topic. I always do it by accident. #+begin_src emacs-lisp (use-package gnus-topic + :delight :config (defun fpi/gnus-topic-toggle-topic () "Toggle display of the topic." -- cgit v1.2.3 From bb2f692dade71a8edd806e6d04f00ccf5ffc8b4f Mon Sep 17 00:00:00 2001 From: fpi Date: Tue, 6 Oct 2020 11:34:54 +0200 Subject: Add nnrss to ignored gnus registry groups --- gnus.org | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gnus.org') diff --git a/gnus.org b/gnus.org index 4f5a600..aebf113 100644 --- a/gnus.org +++ b/gnus.org @@ -237,7 +237,8 @@ Remove some groups from being saved to the registry #+begin_src emacs-lisp (setq gnus-registry-split-strategy 'majority) (setq gnus-registry-ignored-groups - '(("^nnreddit" t) + '(("^nnrss" t) + ("^nnreddit" t) ("^nntp" t) ("delayed$" t) ("drafts$" t) -- cgit v1.2.3 From f0bfa75c969fbb09fd000932ea1b10b2d7ba724a Mon Sep 17 00:00:00 2001 From: fpi Date: Sun, 20 Dec 2020 13:35:24 +0100 Subject: Make gnus articles use prose-mode --- gnus.org | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gnus.org') diff --git a/gnus.org b/gnus.org index aebf113..996a1c0 100644 --- a/gnus.org +++ b/gnus.org @@ -411,6 +411,11 @@ See [[info:gnus#Window Layout][info:gnus#Window Layout]]. #+begin_src emacs-lisp (setq gnus-use-full-window nil) #+end_src +**** Article Display +#+begin_src emacs-lisp +(use-package gnus-art + :hook (gnus-article-mode . prose-mode)) +#+end_src **** Modeline indicator From the [[https://www.emacswiki.org/emacs/GnusNotify][emacswiki Gnus Notify]]. #+begin_quote -- cgit v1.2.3 From 84b92d9a7b3638f9afa6db822c18b350c26126b4 Mon Sep 17 00:00:00 2001 From: fpi Date: Sat, 19 Dec 2020 18:36:30 +0100 Subject: Add symlinks for gnus state files --- gnus.org | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'gnus.org') diff --git a/gnus.org b/gnus.org index 996a1c0..d3dc7c3 100644 --- a/gnus.org +++ b/gnus.org @@ -4,7 +4,14 @@ ln -siv $(pwd)/tangle/gnus.el ~/.gnus.el #+end_src -Load private settings +I use =nextcloud= to synchronize gnus state files across devices. Alternatively one may use [[info:gnus#The Gnus Cloud][info:gnus#Gnus Cloud]]. Here i symlink the relevant files/directories to my synchronization directory. +#+begin_src shell :results silent :tangle tangle/symlink.sh :shebang "#!/bin/bash" +ln -siv ~/sync/gnus/News ~/News +ln -siv ~/sync/gnus/.newsrc.eld ~/.newsrc.eld +ln -siv ~/sync/gnus/.gnus.registry.eieio ~/.gnus.registry.eieio +#+end_src + +Load private settings. #+begin_src emacs-lisp (setq secret-file (expand-file-name "emacs-private.el.gpg" user-emacs-directory)) -- cgit v1.2.3 From ee59296fb919806374eb9d1a3eba2d2d895bfc73 Mon Sep 17 00:00:00 2001 From: fpi Date: Mon, 4 Jan 2021 15:50:51 +0100 Subject: [WIP] Add local maildir --- gnus.org | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) (limited to 'gnus.org') diff --git a/gnus.org b/gnus.org index d3dc7c3..6f069f8 100644 --- a/gnus.org +++ b/gnus.org @@ -55,19 +55,36 @@ Noweb the primary server settings together. )) #+end_src -Setup a secondary imap server and a local nntp server I use to fetch -RSS/Atom Feeds asynchronously. +To avoid confusion I enable namespaces for imap groups. +#+begin_src emacs-lisp +(setq nnimap-use-namespaces t) +#+end_src +*** Secondary servers #+begin_src emacs-lisp +<> +#+end_src +**** Personal mailbox +#+begin_src emacs-lisp :tangle no :noweb-ref secondary-select-methods (add-to-list 'gnus-secondary-select-methods `(nnimap ,@private/personal-imap-info (nnimap-stream ssl) (nnir-search-engine imap) (nnimap-inbox "INBOX"))) +#+end_src +**** RSS/Atom over nntp +Setup a secondary imap server and a local nntp server I use to fetch +RSS/Atom Feeds asynchronously. +#+begin_src emacs-lisp :tangle no :noweb-ref secondary-select-methods (add-to-list 'gnus-secondary-select-methods '(nntp "localhost" 4321)) -<> #+end_src -#+begin_src emacs-lisp -(setq nnimap-use-namespaces t) +**** Harddrive Maildir +This is still WIP, because the =nnmaildir= backend sucks. +#+begin_src emacs-lisp :tangle no +(add-to-list 'gnus-secondary-select-methods + '(nnmaildir "Local Maildir" + (directory "~/.nnmaildir") + (gnus-search-engine gnus-search-notmuch + (config-file "~/.notmuch-config")))) #+end_src ** Options *** General -- cgit v1.2.3 From ab11f2adb7b37d1ac35a1d567f802fa21279df66 Mon Sep 17 00:00:00 2001 From: fpi Date: Thu, 21 Jan 2021 16:31:17 +0100 Subject: Rename gnus group buffer --- gnus.org | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gnus.org') diff --git a/gnus.org b/gnus.org index 6f069f8..c2a47c3 100644 --- a/gnus.org +++ b/gnus.org @@ -370,6 +370,10 @@ Unicode reply symbol #+begin_src emacs-lisp (setq gnus-summary-to-prefix "→ ") #+end_src +Rename the group buffer to something more memorable. This is not intended to be customized. So some bugs may occur. So far it only seems important to set it before starting gnus the first time. So e.g. set it in your main emacs =init.el=. +#+begin_src emacs-lisp +(setq gnus-group-buffer "*Gnus*") +#+end_src **** On threads Gather loose threads, whose parent is currently not displayed, under a dummy article. I find the default ~'adopt~ to be too confusing. -- cgit v1.2.3 From 02c605d87e2b97955c2e8b3fe737f8615cfb4b83 Mon Sep 17 00:00:00 2001 From: fpi Date: Wed, 27 Jan 2021 11:00:07 +0100 Subject: Make scoring section more generic --- gnus.org | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'gnus.org') diff --git a/gnus.org b/gnus.org index c2a47c3..1a7f454 100644 --- a/gnus.org +++ b/gnus.org @@ -171,8 +171,20 @@ Background fetching for gnus. See the manual and [[https://www.emacswiki.org/ema (gnus-demon-add-handler 'gnus-demon-scan-news-4 130 1) (gnus-demon-add-handler 'gnus-demon-scan-news-5 140 1) #+end_src -**** Adaptive scoring -See [[info:gnus#Adaptive Scoring][info:gnus#Adaptive Scoring]] and this [[https://notes.whatthefuck.computer/1417593600.0-note.html][blog post]] by Ryan Rix. +**** Scoring +To define different scoring files for different groups I set [[info:gnus#Home Score File][home score files]] based on the group name. +#+begin_src emacs-lisp +(setq gnus-home-score-file + '(("^nnimap" "nnimap.SCORE") ;; w/ author scoring + ("gmane" "nntp_gmane.SCORE") ;; w/ author scoring + ("^nntp\\+localhost" "nntp_global.SCORE") ;; w/o author scoring + )) +(setq gnus-home-adapt-file + '(("^nnimap" "nnimap.ADAPT") + ("gmane" "nntp_gmane.ADAPT") + ("^nntp\\+localhost" "nntp_global.ADAPT"))) +#+end_src +For information about adaptive scoring see [[info:gnus#Adaptive Scoring][info:gnus#Adaptive Scoring]] and this [[https://notes.whatthefuck.computer/1417593600.0-note.html][blog post]] by Ryan Rix. ***** Score File Setup #+begin_src emacs-lisp (setq gnus-use-adaptive-scoring '(word line)) @@ -190,19 +202,7 @@ See [[info:gnus#Adaptive Scoring][info:gnus#Adaptive Scoring]] and this [[https: ) ;; (setq gnus-adaptive-word-score-alist gnus-default-adaptive-word-score-alist) #+end_src -****** Using different (adaptive) scoring files for different groups -To define different adaptive scoring files for different groups I set [[info:gnus#Home Score File][home score files]] based on the group name. -#+begin_src emacs-lisp -(setq gnus-home-score-file - '(("^nnimap" "nnimap.SCORE") ;; w/ author scoring - ("gmane" "nntp_gmane.SCORE") ;; w/ author scoring - ("^nntp\\+localhost" "nntp_global.SCORE") ;; w/o author scoring - )) -(setq gnus-home-adapt-file - '(("^nnimap" "nnimap.ADAPT") - ("gmane" "nntp_gmane.ADAPT") - ("^nntp\\+localhost" "nntp_global.ADAPT"))) -#+end_src +****** Scoring rules Scoring based on the =from= header does not make sense for rss feeds with only one author or newsgroups with unset author. These files therefore contain my default adaptive scoring rules with or without =from= scoring. #+NAME: gnus-adaptive-scoring-w-from #+begin_src emacs-lisp :tangle no :eval never @@ -245,7 +245,7 @@ Slow scoring decay prevents huge scores from building up. Only run on =.ADAPT= s gnus-score-decay-constant 1 gnus-score-decay-scale 0.01) #+end_src -****** Ignored Words +***** Ignored Words Do not score on some common german words. I extracted these from my score file after a few weeks of using scoring. #+begin_src emacs-lisp (setq gnus-ignored-adaptive-words -- cgit v1.2.3 From 053a3445ffbf21fab758bf44cc568db52d174d4d Mon Sep 17 00:00:00 2001 From: fpi Date: Sun, 31 Jan 2021 15:09:56 +0100 Subject: Keep temporary score rules for longer --- gnus.org | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gnus.org') diff --git a/gnus.org b/gnus.org index 1a7f454..d0bc434 100644 --- a/gnus.org +++ b/gnus.org @@ -185,6 +185,11 @@ To define different scoring files for different groups I set [[info:gnus#Home Sc ("^nntp\\+localhost" "nntp_global.ADAPT"))) #+end_src For information about adaptive scoring see [[info:gnus#Adaptive Scoring][info:gnus#Adaptive Scoring]] and this [[https://notes.whatthefuck.computer/1417593600.0-note.html][blog post]] by Ryan Rix. + +Temporary scores by default expire after 7 days. I want a slightly longer threshold. +#+begin_src emacs-lisp +(setq gnus-score-expiry-days 14) +#+end_src ***** Score File Setup #+begin_src emacs-lisp (setq gnus-use-adaptive-scoring '(word line)) -- cgit v1.2.3 From f9179aa6bd96155d101ad89977c2006a39bf508f Mon Sep 17 00:00:00 2001 From: fpi Date: Sun, 20 Feb 2022 18:33:15 +0100 Subject: BCC self and use general search syntax Also remove fix for old gnus-cloud bug --- gnus.org | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'gnus.org') diff --git a/gnus.org b/gnus.org index d0bc434..dae6d1a 100644 --- a/gnus.org +++ b/gnus.org @@ -94,6 +94,11 @@ Load only groups with level < 2 for faster startup. (setq gnus-activate-level 2) #+end_src **** Message related +Bcc self to archive sent messages & ensure proper sending +#+begin_src emacs-lisp +(setq message-default-mail-headers + (format "Bcc: %s\n" user-mail-address)) +#+end_src Sent mails are read. #+begin_src emacs-lisp (setq gnus-gcc-mark-as-read t) @@ -140,6 +145,11 @@ Setup for fancy mail splitting. Also see the parameters in ~gnus-select-method~. (setq nnmail-cache-accepted-message-ids t) (setq nnmail-message-id-cache-length 10000) #+end_src +**** Search +Use gnus search language. See [[info:gnus#Search Queries][gnus#Search Queries]] for info. +#+begin_src emacs-lisp +(setq gnus-search-use-parsed-queries t) +#+end_src **** Demon Background fetching for gnus. See the manual and [[https://www.emacswiki.org/emacs/GnusDemon][emacswiki]]. #+begin_src emacs-lisp @@ -616,10 +626,6 @@ contains new messages")) ;;; gnus-notify.el ends here #+end_src *** Misc -Workaround for bug with ~gnus-cloud-method~ and ~custom-variable-recalc-variable~ upon reloading the =spacemacs-*= theme. -#+begin_src emacs-lisp -(setq server "nnimap:imsmail") -#+end_src **** nnreddit #+begin_src emacs-lisp (use-package nnreddit -- cgit v1.2.3 From 8280177fb14b2eb98daf2523b5ccf4b90e89013a Mon Sep 17 00:00:00 2001 From: fpi Date: Sun, 20 Mar 2022 17:53:42 +0100 Subject: Use multiple personal imaps --- gnus.org | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to 'gnus.org') diff --git a/gnus.org b/gnus.org index dae6d1a..0bb355e 100644 --- a/gnus.org +++ b/gnus.org @@ -65,11 +65,18 @@ To avoid confusion I enable namespaces for imap groups. #+end_src **** Personal mailbox #+begin_src emacs-lisp :tangle no :noweb-ref secondary-select-methods -(add-to-list 'gnus-secondary-select-methods `(nnimap ,@private/personal-imap-info - (nnimap-stream ssl) - (nnir-search-engine imap) - (nnimap-inbox "INBOX"))) +(mapc + (lambda (info) + (add-to-list + 'gnus-secondary-select-methods + `(nnimap + ,@info + (nnimap-stream ssl) + (nnir-search-engine imap) + (nnimap-inbox "INBOX")))) + private/personal-imap-info) #+end_src + **** RSS/Atom over nntp Setup a secondary imap server and a local nntp server I use to fetch RSS/Atom Feeds asynchronously. @@ -185,12 +192,14 @@ Background fetching for gnus. See the manual and [[https://www.emacswiki.org/ema To define different scoring files for different groups I set [[info:gnus#Home Score File][home score files]] based on the group name. #+begin_src emacs-lisp (setq gnus-home-score-file - '(("^nnimap" "nnimap.SCORE") ;; w/ author scoring + '(("misc@" "nntp_gmane.SCORE") + ("^nnimap" "nnimap.SCORE") ;; w/ author scoring ("gmane" "nntp_gmane.SCORE") ;; w/ author scoring ("^nntp\\+localhost" "nntp_global.SCORE") ;; w/o author scoring )) (setq gnus-home-adapt-file - '(("^nnimap" "nnimap.ADAPT") + '(("misc@" "nntp_gmane.SCORE") + ("^nnimap" "nnimap.ADAPT") ("gmane" "nntp_gmane.ADAPT") ("^nntp\\+localhost" "nntp_global.ADAPT"))) #+end_src @@ -317,7 +326,7 @@ Commands to interact with the gnus cloud are prefixed with =~= in the group buff #+begin_src emacs-lisp :noweb yes (use-package gnus-cloud :custom - (gnus-cloud-method (concat "nnimap:" (car private/personal-imap-info))) + (gnus-cloud-method (concat "nnimap:" (caar private/personal-imap-info))) (gnus-cloud-synced-files '("~/.authinfo.gpg" ;; "~/.gnus.registry.eieio" ;; (:directory "~/News" :match ".*.\\(SCORE\\|ADAPT\\)") -- cgit v1.2.3 From 70b26ae4d8e9933d62451ec6461912a5df4366b9 Mon Sep 17 00:00:00 2001 From: fpi Date: Sun, 1 May 2022 17:17:59 +0200 Subject: Adjust gnus loading of secret files --- gnus.org | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'gnus.org') diff --git a/gnus.org b/gnus.org index 0bb355e..a293271 100644 --- a/gnus.org +++ b/gnus.org @@ -13,9 +13,8 @@ ln -siv ~/sync/gnus/.gnus.registry.eieio ~/.gnus.registry.eieio Load private settings. #+begin_src emacs-lisp -(setq secret-file (expand-file-name "emacs-private.el.gpg" - user-emacs-directory)) -(load secret-file) +(mapc (lambda (file) (load file)) + (directory-files user-emacs-directory t "^emacs-.*el.gpg$")) #+end_src * Config ** Servers -- cgit v1.2.3 From 5969f30c3899148dc461c50b181718d305de1e68 Mon Sep 17 00:00:00 2001 From: fpi Date: Fri, 13 May 2022 10:07:50 +0200 Subject: Add another scoring category --- gnus.org | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'gnus.org') diff --git a/gnus.org b/gnus.org index a293271..6765440 100644 --- a/gnus.org +++ b/gnus.org @@ -1,4 +1,4 @@ -#+PROPERTY: header-args:emacs-lisp :tangle tangle/gnus.el :noweb yes +#+PROPERTY: header-args:emacs-lisp :tangle tangle/gnus.el :noweb yes :tangle-mode (identity #o444) #+begin_src shell :results silent :tangle tangle/symlink.sh :shebang "#!/bin/bash" ln -siv $(pwd)/tangle/gnus.el ~/.gnus.el @@ -192,13 +192,17 @@ To define different scoring files for different groups I set [[info:gnus#Home Sc #+begin_src emacs-lisp (setq gnus-home-score-file '(("misc@" "nntp_gmane.SCORE") + ("ieee" "nn_ieee.SCORE") ("^nnimap" "nnimap.SCORE") ;; w/ author scoring + ("^INBOX" "nnimap.SCORE") ;; w/ author scoring ("gmane" "nntp_gmane.SCORE") ;; w/ author scoring ("^nntp\\+localhost" "nntp_global.SCORE") ;; w/o author scoring )) (setq gnus-home-adapt-file - '(("misc@" "nntp_gmane.SCORE") + '(("misc@" "nntp_gmane.ADAPT") + ("ieee" "nn_ieee.ADAPT") ("^nnimap" "nnimap.ADAPT") + ("^INBOX" "nnimap.ADAPT") ("gmane" "nntp_gmane.ADAPT") ("^nntp\\+localhost" "nntp_global.ADAPT"))) #+end_src -- cgit v1.2.3