From 242a133b64cac3b30a7884ae71f30b88d6df04eb Mon Sep 17 00:00:00 2001 From: jao Date: Wed, 24 Apr 2024 23:15:51 +0100 Subject: gnus: fix for protonmail ids --- custom/jao-custom-gnus.el | 32 ++++++++++++++++++++++++-------- 1 file 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) "")) -- cgit v1.2.3