summaryrefslogtreecommitdiff
path: root/.gnus
diff options
context:
space:
mode:
authorKévin Le Gouguec <kevin.legouguec@gmail.com>2021-06-17 11:37:56 +0200
committerKévin Le Gouguec <kevin.legouguec@gmail.com>2021-06-17 11:37:56 +0200
commite7e46e82fa9f41b978007ba2deb93b635d21a3bc (patch)
treea2699ac51527003389d5c4f8463f3abfe77f4ee7 /.gnus
parentb3d71c9d9be3c5ac72e319eb97527f8d24e426b4 (diff)
downloaddotfiles-e7e46e82fa9f41b978007ba2deb93b635d21a3bc.tar.xz
Add more patterns to subject "canonicalization" regexp
Also move it to a dedicated variable.
Diffstat (limited to '.gnus')
-rw-r--r--.gnus19
1 files changed, 12 insertions, 7 deletions
diff --git a/.gnus b/.gnus
index 8bca6a2..271e2c6 100644
--- a/.gnus
+++ b/.gnus
@@ -56,16 +56,21 @@
;; 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.
+(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))))
+
(add-hook 'gnus-summary-generate-hook
(lambda ()
(setq-local message-subject-re-regexp
- (rx bol (+ (* space)
- (or "re" "Re" "RE"
- "aw" "Aw" "AW"
- "sv" "Sv" "SV"
- (seq "bug#" (+ digit))
- "[External]")
- (* space) ":" (* space))))))
+ my/gnus-summary-normalize-subject)))
(gnus-add-configuration
'(summary