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