From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 8AF151F9E0 for ; Thu, 23 Apr 2020 08:34:19 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [RFC 0/2] watch behavior changes aNd ProPoSaL Date: Thu, 23 Apr 2020 08:34:17 +0000 Message-Id: <20200423083419.835-1-e@yhbt.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Now, I don't think the following two patches will cause any problems for existing users... Down the line, for matching non-List-ID headers insensitively, I'm thinking "mutt style" case-sensitivity is probably a good default. That is: Match case-sensitively iff capital letters exist in the substring. Otherwise, match case-insensitively. But, mutt allows POSIX regexps... I'm not sure if regexps are necessary for this, and I also don't want this to be tied to Perl/PCRE in case we or someone else wants to use another language/runtime. We can't use POSIX regexps from Perl w/o XS from CPAN or Inline::C, so more crap to force on the user. Otherwise, I'm not sure how a user should (or would care to) specify case-insensitivity vs case-sensitivity... Valid email headers names won't have spaces (or many other chars), so we can do somthing like attempt to parse out " -i" (like "grep -i"): watchheader = To -i:John Smith Or, add a new option: watchHeaderInsensitively = To:John Smith Ugh... Eric Wong (2): watchmaildir: scan all matching headers watchmaildir: match List-ID case-insensitively lib/PublicInbox/WatchMaildir.pm | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)