summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2024-04-24 23:15:51 +0100
committerjao <jao@gnu.org>2024-04-24 23:15:51 +0100
commit242a133b64cac3b30a7884ae71f30b88d6df04eb (patch)
tree91105782e1c6a6a63ec265e3e54756c9ba7707c5
parent79b3e87a66c6eacc4ed4ec6b933e32b789eec280 (diff)
downloadelibs-242a133b64cac3b30a7884ae71f30b88d6df04eb.tar.gz
elibs-242a133b64cac3b30a7884ae71f30b88d6df04eb.tar.bz2
gnus: fix for protonmail ids
-rw-r--r--custom/jao-custom-gnus.el32
1 files changed, 24 insertions, 8 deletions
diff --git a/custom/jao-custom-gnus.el b/custom/jao-custom-gnus.el
index e359029..6cbeb89 100644
--- a/custom/jao-custom-gnus.el
+++ b/custom/jao-custom-gnus.el
@@ -312,14 +312,6 @@
;;; Summary
;;;; configuration
-(setq gnus-face-1 'jao-gnus-face-tree
- gnus-show-threads t
- gnus-thread-hide-subtree t
- gnus-summary-make-false-root 'adopt
- gnus-summary-gather-subject-limit 120
- gnus-sort-gathered-threads-function 'gnus-thread-sort-by-date
- gnus-thread-sort-functions '(gnus-thread-sort-by-date))
-
(setq gnus-summary-ignore-duplicates t
gnus-suppress-duplicates t
;; gnus-summary-ignored-from-addresses jao-mails-regexp
@@ -327,6 +319,30 @@
gnus-refer-thread-use-search t
gnus-auto-select-next 'almost-quietly)
+;;;; threading
+(setq gnus-face-1 'jao-gnus-face-tree
+ gnus-show-threads t
+ gnus-thread-hide-subtree t
+ gnus-build-sparse-threads nil
+ gnus-refer-thread-use-search t
+ gnus-summary-make-false-root 'adopt
+ gnus-summary-gather-subject-limit nil ;; 120
+ gnus-summary-thread-gathering-function #'gnus-gather-threads-by-subject
+ gnus-sort-gathered-threads-function 'gnus-thread-sort-by-date
+
+ gnus-thread-sort-functions '(gnus-thread-sort-by-number))
+
+(defun jao-fix-protonmail-references (header)
+ (let ((references (mail-header-references header)))
+ (setf (mail-header-references header)
+ (mapconcat #'(lambda (x)
+ (if (string-match "protonmail.internalid" x) "" x))
+ (gnus-split-references references)
+ " "))
+ header))
+
+(setq gnus-alter-header-function 'jao-fix-protonmail-references)
+
;;;; search on enter nnselect
(defun jao-gnus--maybe-reselect (&rest _i)
(when (string-match-p "^nnselect" (or (gnus-group-name-at-point) ""))