summaryrefslogtreecommitdiff
path: root/.gnus
diff options
context:
space:
mode:
Diffstat (limited to '.gnus')
-rw-r--r--.gnus37
1 files changed, 25 insertions, 12 deletions
diff --git a/.gnus b/.gnus
index 18873aa..8bca6a2 100644
--- a/.gnus
+++ b/.gnus
@@ -41,18 +41,31 @@
. "%b %d")
(t
. "%F"))
- gnus-gcc-mark-as-read t
- ;; This regexp is used both in Gnus summary buffers to detect
- ;; and elide similar subjects in a thread, and by message mode
- ;; when replying, to determine what to strip from the subject.
- message-subject-re-regexp
- (rx bol (+ (* space)
- (or "re" "Re" "RE"
- "aw" "Aw" "AW"
- "sv" "Sv" "SV"
- (seq "bug#" (+ digit))
- "[External]")
- (* space) ":" (* space))))
+ gnus-gcc-mark-as-read t)
+
+;; message-subject-re-regexp is used both in Gnus summary buffers to
+;; detect and elide similar subjects in a thread, and by message mode
+;; when replying, to determine what to strip from the subject.
+;;
+;; Some MUAs add cruft to the subject, turning "Re: bug#123: foobar"
+;; into "RE: [External] : Re: bug#1234: foobar", which Debbugs will
+;; then turn into "bug#1234: [External] : Re: bug#1234: foobar".
+;;
+;; The only way I can find to tell the Gnus summary code to
+;; canonicalize all that cruft away is by tweaking this regexp, but
+;; 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.
+(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))))))
(gnus-add-configuration
'(summary