Subject: bug#72442: 31.0.50; Gnus or message.el doesn't handle international message reply subject prefixes and insults users

From: Björn Bidar <[email-masked]>
Date: Fri, 23 Aug 2024 08:39:25 +0300

Robert Pluim <[email-masked]> writes:

>>>>>> On Thu, 22 Aug 2024 15:04:56 +0300, Björn Bidar <[email-masked]> said:
>
>     Björn> Robert Pluim <[email-masked]> writes:
>     >>>>>>> On Tue, 20 Aug 2024 15:56:24 +0200, Robert Pluim <[email-masked]> said:
>     >> 
>     Robert> The first is easy. The second is a bit more difficult, since the two
>     Robert> donʼt cover exactly the same cases, and message matches
>     Robert> case-sensitively, unlike rmail, so weʼd need to either adapt eg "ΣΧΕΤ" to
>     Robert> "[Σσ][Χχ][Εε][Ττ]" or make the breaking change of binding
>     Robert> `case-fold-search' in message. Personally Iʼd prefer the latter.
>     >> 
>     Robert> (are there really mailers that prefix the subject with "R:"?)
>     >> 
>     >> The current setting for rmail is more complete than the suggestion in
>     >> the Gnus manual, except itʼs missing:
>     >> 
>     >> - "RÉ"
>     >> - an optional "." after "Antw"
>     >> - an optional space between the "RE" string and the ":"
>     >> - "FW"/"FWD"
>     >> 
>     >> The first 3 seem obvious. Adding the last might annoy people :-)
>     >> 
>     >> I can add those to `rmail-re-abbrevs', but perhaps itʼs better to have a
>     >> new defcustom that both rmail and message would use? Something like
>     >> 'mail-re-regexps' in "mail-utils.el" perhaps? Plus some appropriate
>     >> editing of the manual.
>
>     Björn> If there would be an easy way to new prefix to the ignore list that
>     Björn> would work. Can't expect (avarage) users to build their regular
>     Björn> expression especially when multiple languages are involved.
>
> The new defcustom could be a list of regexps, ie
>
>   ("RE" "R\u00c9\\.?" "FWD?" "رد" "回复" "回覆" "SV" "Antw\\.?"
>   "VS" "REF" "AW" ΑΠ" "ΣΧΕΤ" "השב" "Vá" "R" "RIF" "BLS" "RES"
>   "Odp" "YNT" "ATB")
>
> which weʼd concatenate with "\\|" to get the real regexp. That would
> be quite easy to edit in custom.

Does it make sense to build the regexp using regexp-search-word or
regexp-opt after the user has entered the words to filter in defcustom?