diff options
| author | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2021-04-14 23:17:24 +0200 |
|---|---|---|
| committer | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2021-04-14 23:17:24 +0200 |
| commit | d22ed9c99234149ed732deabd5ba6efe0065143f (patch) | |
| tree | 48895b480327918aba594fc9c1b80284a3d1014b /.gnus | |
| parent | d1a622cf8e03e829ac30086178cab61b64282521 (diff) | |
| download | dotfiles-d22ed9c99234149ed732deabd5ba6efe0065143f.tar.xz | |
Fix message-subject-re-regexp some more
Diffstat (limited to '.gnus')
| -rw-r--r-- | .gnus | 37 |
1 files changed, 25 insertions, 12 deletions
@@ -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 |
