From 1bd5bec9ee41ef1f52583837e46449412280c565 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Sun, 26 Jan 2014 12:58:25 +2000 Subject: [PATCH] Re: [PATCH 0/5] lib: make folder: prefix literal --- 8c/5e9dfefe37cef724c720a3052a98b01d6f36d9 | 93 +++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 8c/5e9dfefe37cef724c720a3052a98b01d6f36d9 diff --git a/8c/5e9dfefe37cef724c720a3052a98b01d6f36d9 b/8c/5e9dfefe37cef724c720a3052a98b01d6f36d9 new file mode 100644 index 000000000..6d5a64cea --- /dev/null +++ b/8c/5e9dfefe37cef724c720a3052a98b01d6f36d9 @@ -0,0 +1,93 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 13B04431FBD + for ; Sat, 25 Jan 2014 08:58:46 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id 0N8hUl3rdPG9 for ; + Sat, 25 Jan 2014 08:58:38 -0800 (PST) +Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155]) + (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 44A11431FBC + for ; Sat, 25 Jan 2014 08:58:38 -0800 (PST) +Received: from remotemail by yantan.tethera.net with local (Exim 4.80) + (envelope-from ) + id 1W76Yu-00036Z-SG; Sat, 25 Jan 2014 12:58:28 -0400 +Received: (nullmailer pid 26575 invoked by uid 1000); Sat, 25 Jan 2014 + 16:58:25 -0000 +From: David Bremner +To: Jani Nikula , Austin Clements , + notmuch@notmuchmail.org +Subject: Re: [PATCH 0/5] lib: make folder: prefix literal +In-Reply-To: <87iot8f4vg.fsf@nikula.org> +References: + <87y525m649.fsf@awakening.csail.mit.edu> <87r47wfltb.fsf@nikula.org> + <87iot8f4vg.fsf@nikula.org> +User-Agent: Notmuch/0.17+35~g3b36898 (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-pc-linux-gnu) +Date: Sat, 25 Jan 2014 12:58:25 -0400 +Message-ID: <87lhy4nglq.fsf@zancas.localnet> +MIME-Version: 1.0 +Content-Type: text/plain +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +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: Sat, 25 Jan 2014 16:58:46 -0000 + +Jani Nikula writes: + +> On Sat, 25 Jan 2014, Jani Nikula wrote: +>> Perhaps we need to have two prefixes, one of which is the literal +>> filesystem folder and another which hides the implementation details, +>> like I mentioned in my mail to Peter [1]. But consider this: my proposed +>> implementation does cover *all* use cases. +> +> Here's a thought. With boolean prefix folder:, we can devise a scheme +> where the folder: query defines what is to be matched. +> +> For example: +> +> folder:foo match files in foo, foo/new, and foo/cur. +> folder:foo/ match all files in all subdirectories under foo (this +> would handle Tomi's use case), including foo/new and +> foo/cur. + +handling hierarchies sounds useful and natural + +> folder:foo/. match in foo only, and specifically not in foo/cur or foo/new. +> folder:foo/new match in foo/new, and specifically not in foo/cur (this +> allows distinguishing between messages in cur and new). + +is "new" special cased here? or do you rely on it being a leaf +directory? + +> folder:/ match everything. +> folder:/. match in top level maildir only. +> folder:"" match in top level maildir, including cur/new. + +I could certainly support this UI, assuming the database bloat is not +too bad. + +I started to wonder about using 3 prefixes instead, but then I read your +message again and a light went on. ;). + +d + -- 2.26.2