From 653326e51503ba0bddcf9dc365003886527edbe2 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sat, 5 Jun 2021 17:13:56 -0400 Subject: piem-lei-query-thread: Add bug#NNN special case when eliding subject In debbugs threads, it's not uncommon for a leading "[bug#NNN]" in the subject to be converted to "bug#NNN:" [*]. I'm not sure what the source of this is, but it prevents the suppression of an otherwise identical subject. It's probably not worth normalizing before the comparison to get full suppression, but it'd be nice to at least elide the main part of the subject so it's more obvious that it didn't change. Add a special case so that "bug#NNN:" prefix is treated the same as a bracketed prefix. [*] example: https://yhetil.org/guix-patches/20201128051435.30580-1-kyle@kyleam.com Message-Id: <20210605211402.20304-13-kyle@kyleam.com> --- tests/piem-lei-tests.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/piem-lei-tests.el b/tests/piem-lei-tests.el index 71dc109..dd58360 100644 --- a/tests/piem-lei-tests.el +++ b/tests/piem-lei-tests.el @@ -110,7 +110,11 @@ (should (equal (concat "[bug#00000] [PATCH v2] " piem-lei-tests-elide-string) (piem-lei-query--elide-subject "[bug#00000] [PATCH] abc def" - "[bug#00000] [PATCH v2] abc def")))) + "[bug#00000] [PATCH v2] abc def"))) + (should (equal (concat "bug#00000: [PATCH v2] " piem-lei-tests-elide-string) + (piem-lei-query--elide-subject + "[bug#00000] [PATCH] abc def" + "bug#00000: [PATCH v2] abc def")))) (provide 'piem-lei-tests) ;;; piem-lei-tests.el ends here -- cgit v1.2.3