From 0623b506510b3aebbba6f0ad36793e9e74291a20 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Sun, 10 Apr 2016 21:37:34 +2100 Subject: [PATCH] Re: [RFC 3/5] cli: support shell globbing patterns in new.ignore --- a1/d6785622c7b346e84a205dcaf340e7f0b241e5 | 68 +++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 a1/d6785622c7b346e84a205dcaf340e7f0b241e5 diff --git a/a1/d6785622c7b346e84a205dcaf340e7f0b241e5 b/a1/d6785622c7b346e84a205dcaf340e7f0b241e5 new file mode 100644 index 000000000..40a70e9b4 --- /dev/null +++ b/a1/d6785622c7b346e84a205dcaf340e7f0b241e5 @@ -0,0 +1,68 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id 887E16DE02BF + for ; Sat, 9 Apr 2016 17:37:46 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: -0.019 +X-Spam-Level: +X-Spam-Status: No, score=-0.019 tagged_above=-999 required=5 + tests=[AWL=-0.008, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] + autolearn=disabled +Received: from arlo.cworth.org ([127.0.0.1]) + by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id kwxFBeizl3jy for ; + Sat, 9 Apr 2016 17:37:38 -0700 (PDT) +Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) + by arlo.cworth.org (Postfix) with ESMTPS id 30DB86DE00BD + for ; Sat, 9 Apr 2016 17:37:38 -0700 (PDT) +Received: from remotemail by fethera.tethera.net with local (Exim 4.84) + (envelope-from ) + id 1ap3Nq-0001Sb-0w; Sat, 09 Apr 2016 20:37:46 -0400 +Received: (nullmailer pid 14188 invoked by uid 1000); + Sun, 10 Apr 2016 00:37:34 -0000 +From: David Bremner +To: Jani Nikula , notmuch@notmuchmail.org +Subject: Re: [RFC 3/5] cli: support shell globbing patterns in new.ignore +In-Reply-To: + <51db8c12299cb1765d346fa2c93c6c95abb92613.1446579858.git.jani@nikula.org> +References: + <51db8c12299cb1765d346fa2c93c6c95abb92613.1446579858.git.jani@nikula.org> +User-Agent: Notmuch/0.21+109~g9d467d4 (http://notmuchmail.org) Emacs/24.5.1 + (x86_64-pc-linux-gnu) +Date: Sat, 09 Apr 2016 21:37:34 -0300 +Message-ID: <871t6efgdt.fsf@maritornes.cs.unb.ca> +MIME-Version: 1.0 +Content-Type: text/plain +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.20 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Sun, 10 Apr 2016 00:37:46 -0000 + +Jani Nikula writes: + +> Keep the existing strcmp on the basename for backwards compatibility, +> and additionally use the new.ignore entries as fnmatch(3) patterns on +> the absolute filename. Note that it's not enough to add e.g. "foo*bar" +> to the list; you will need to do "*/foo*bar" to match the path also. + +I guess when you say absolute file name, you mean the obvious thing, not +relative to the root of the notmuch maildir. It seems like it would be +quite useful to e.g. ignore directory foo at the top level of the +maildir, but not anywhere else, by specifying /foo as an ignore +pattern. I guess this would just require stripping the maildir root off +the front of the path before doing the fnmatch? That's not currently +part of the add_files_state_t, but it could be. + +d -- 2.26.2