diff options
author | fpi | 2020-07-08 16:45:17 +0200 |
---|---|---|
committer | fpi | 2020-07-08 16:45:17 +0200 |
commit | 5a14fee3bb1c429a949beefba0b21e9aacd00ee3 (patch) | |
tree | d5e3786c08722f9edb9399c79a99eee76f0637d8 | |
parent | Fix gnorb in summary-line-format (diff) | |
parent | Add .ADAPT files to gnus-cloud (diff) |
Merge branch 'gnus+' into emacs
-rw-r--r-- | gnus.org | 90 |
1 files changed, 62 insertions, 28 deletions
@@ -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)))) + '( + <<gnus-adaptive-scoring-wo-from>>)) (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 '((?: . ?_) (?[ . ?_) (?] . ?_))) @@ -218,6 +241,17 @@ 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. +#+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 |