From: Jani Nikula Date: Sat, 29 Sep 2012 10:58:00 +0000 (+0300) Subject: Re: Searching from a folder X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=d8bfdd8bd8ce0853a609f812f08f84154f22fd25;p=notmuch-archives.git Re: Searching from a folder --- diff --git a/6b/79b522261021b2edf456bf8d7d55a590bb9445 b/6b/79b522261021b2edf456bf8d7d55a590bb9445 new file mode 100644 index 000000000..0f6b88394 --- /dev/null +++ b/6b/79b522261021b2edf456bf8d7d55a590bb9445 @@ -0,0 +1,101 @@ +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 30A94431FB6 + for ; Sat, 29 Sep 2012 03:58:08 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 D1sgDHs8uX3z for ; + Sat, 29 Sep 2012 03:58:07 -0700 (PDT) +Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com + [209.85.217.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 7C72D431FAE + for ; Sat, 29 Sep 2012 03:58:07 -0700 (PDT) +Received: by lbbgg6 with SMTP id gg6so2804478lbb.26 + for ; Sat, 29 Sep 2012 03:58:04 -0700 (PDT) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=google.com; s=20120113; + h=from:to:subject:in-reply-to:references:user-agent:date:message-id + :mime-version:content-type:x-gm-message-state; + bh=ua7bu/P3YqlwuvCyJSmpFo4StNjj1DucRMuDUFlZ7pg=; + b=khr1rxurGNadPrYDDFz/WNCSa0nbTy5s+xIWzRpUQ2VvMzgBBjCMddu52xXu3sVLPv + ocYqyQJfDAg9FSZdO2gxMzJ4JtnNe737jJl9z4QGWTuEDXJo+lWA38A7arqCYvs6+qFZ + kK3SDCFTitN9QdzWRhtMRyyorWNMOlKEOvMGigOopzqDg9kJrZXZ9hd55Sumq4I+P/cA + JWye1DBa8m96EmAVJZmk1IbgIp7Sd8XCopviAMOzoAxCMtFfuNz30EgN5riKSE7Ss7SU + u8hhdxPIRXPo+Lzje4jkl9aqJKf06RjGspdfQ6oy/S4gmqlT8nm4YlA9DWCkDRrWC31I + 7v8w== +Received: by 10.152.108.37 with SMTP id hh5mr5985973lab.52.1348916284372; + Sat, 29 Sep 2012 03:58:04 -0700 (PDT) +Received: from localhost (dsl-hkibrasgw4-fe51df00-27.dhcp.inet.fi. + [80.223.81.27]) + by mx.google.com with ESMTPS id r5sm3072965lbz.2.2012.09.29.03.58.02 + (version=SSLv3 cipher=OTHER); Sat, 29 Sep 2012 03:58:03 -0700 (PDT) +From: Jani Nikula +To: Damien Cassou , notmuch@notmuchmail.org +Subject: Re: Searching from a folder +In-Reply-To: + +References: + +User-Agent: Notmuch/0.14+40~ga9afd88 (http://notmuchmail.org) Emacs/23.3.1 + (i686-pc-linux-gnu) +Date: Sat, 29 Sep 2012 13:58:00 +0300 +Message-ID: <87vcexp03r.fsf@nikula.org> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +X-Gm-Message-State: + ALoCoQkUsT9W517mB9Obq/X0s0C3mHoMvKAFdUXz4O+qpbx7RvL8fdguNoZAL993fh3WdgQ/qzpz +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, 29 Sep 2012 10:58:08 -0000 + +On Sat, 29 Sep 2012, Damien Cassou wrote: +> I can't make notmuch search return the list of mails in [Gmail] +> folders for a particular mailbox: +> +> ~ $ notmuch search folder:"[Gmail].All Mail" +> ~ $ notmuch search folder:[Gmail].Important + +So you have folders named like that in your maildir? It *should* of +course work with proper escapes and/or quoting, but for the exact reason +of avoiding such trouble, I use this in the section corresponding to +your [Repository RemoteGmailTest] of the .offlineimaprc: + +nametrans = lambda foldername: re.sub('^\[Gmail\]/All Mail', 'gmail', foldername) + +I only sync all mail and inbox, so you may need to modify that to your +needs. + +Also note that if you have maildir.synchronize_flags=true, the gmail +"Starred" should sync to maildir flag F, which in turn syncs to notmuch +tag:flagged. + +HTH, +Jani. + +> but these folders actually contain emails. This works well for another +> gmail mailbox I have. You can reproduce by using the following +> configuration files (yes, the password is here, that's just a test +> account, don't worry): + +PS. You should probably change the password anyway. You don't want +Mallory to do stuff like send tons of spam using your account. There are +no "test accounts" from gmail POV.