summaryrefslogtreecommitdiff
path: root/.gnus
diff options
context:
space:
mode:
authorKévin Le Gouguec <kevin.legouguec@gmail.com>2021-07-30 00:21:47 +0200
committerKévin Le Gouguec <kevin.legouguec@gmail.com>2021-07-30 00:21:47 +0200
commit3e991fe53f92f664f45cbafd183fc710119908f4 (patch)
tree3344443a11fea2f3fa39045ca050877cf937385d /.gnus
parent297729e95113f1f45c1ebb0f29dc0a3ae3989905 (diff)
downloaddotfiles-3e991fe53f92f664f45cbafd183fc710119908f4.tar.xz
Tweak Gnus subject-washing regexp
- add [SPAM UNSURE] - make tailing " :" optional
Diffstat (limited to '.gnus')
-rw-r--r--.gnus19
1 files changed, 10 insertions, 9 deletions
diff --git a/.gnus b/.gnus
index 4af2167..04ff3d7 100644
--- a/.gnus
+++ b/.gnus
@@ -57,16 +57,17 @@
;; setting its global value causes message mode to elide stuff it
;; shouldn't. Therefore, chase down the best Gnus hook for the job,
;; and set the regexp locally.
+(defun my/gnus-reply-prefixes ()
+ (mapcan (lambda (prefix) (list prefix (upcase prefix) (capitalize prefix)))
+ '("re" "aw" "sv" "fw" "fwd")))
+
(setq my/gnus-summary-normalize-subject
- (rx bol (+ (* space)
- (or "re" "Re" "RE"
- "aw" "Aw" "AW"
- "sv" "Sv" "SV"
- "fw" "Fw" "FW"
- "fwd" "Fwd" "FWD"
- (seq "bug#" (+ digit))
- "[External]")
- (* space) ":" (* space))))
+ (rx-to-string
+ `(seq bol
+ (+ (or ,@(my/gnus-reply-prefixes)
+ (seq "bug#" (+ digit))
+ (seq "[" (or "External" "SPAM UNSURE") "]"))
+ (? (* space) ":") (* space)))))
(add-hook 'gnus-summary-generate-hook
(lambda ()