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 2B3E340B960 for ; Fri, 16 Jul 2010 02:22:15 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -1.9 X-Spam-Level: X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9] autolearn=ham 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 Su7Ld54UiTc5 for ; Fri, 16 Jul 2010 02:22:03 -0700 (PDT) Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36]) by olra.theworths.org (Postfix) with ESMTP id 00F7940B95B for ; Fri, 16 Jul 2010 02:22:02 -0700 (PDT) Received: from localhost (unknown [192.168.200.4]) by max.feld.cvut.cz (Postfix) with ESMTP id A567319F33E6; Fri, 16 Jul 2010 11:22:00 +0200 (CEST) X-Virus-Scanned: IMAP AMAVIS Received: from max.feld.cvut.cz ([192.168.200.1]) by localhost (styx.feld.cvut.cz [192.168.200.4]) (amavisd-new, port 10044) with ESMTP id ODCbx5LnwsvT; Fri, 16 Jul 2010 11:21:59 +0200 (CEST) Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34]) by max.feld.cvut.cz (Postfix) with ESMTP id 44C2819F340B; Fri, 16 Jul 2010 11:21:59 +0200 (CEST) Received: from steelpick.2x.cz (k335-30.felk.cvut.cz [147.32.86.30]) (Authenticated sender: sojkam1) by imap.feld.cvut.cz (Postfix) with ESMTPSA id 20C6E15C027; Fri, 16 Jul 2010 11:21:58 +0200 (CEST) Received: from wsh by steelpick.2x.cz with local (Exim 4.72) (envelope-from ) id 1OZh7G-0000Ab-8z; Fri, 16 Jul 2010 11:21:58 +0200 From: Michal Sojka To: Dmitry Monakhov , notmuch@notmuchmail.org Subject: Re: couple of naive questions about search patterns In-Reply-To: <87vd8ra4jp.fsf@dmon-lap.sw.ru> References: <87vd8ra4jp.fsf@dmon-lap.sw.ru> User-Agent: Notmuch/0.3.1-79-g0637275 (http://notmuchmail.org) Emacs/23.2.1 (x86_64-pc-linux-gnu) Date: Fri, 16 Jul 2010 11:21:58 +0200 Message-ID: <87mxtr6atl.fsf@steelpick.2x.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: Fri, 16 Jul 2010 09:22:15 -0000 On Wed, 07 Jul 2010, Dmitry Monakhov wrote: > I want to tag new patches, but not replay messages. > I've tried to do it like this: > notmuch tag +patch-new "tag:inbox and subject:'patch' \ > and not subject:'re:'" > but last rule (subject:'re:') seems to be ignored, as soon as i > understand this happens because pattern 're:' is too short. > Am i right? No, this is because 're:' in subject is not indexed. See skip_re_in_subject() in index.cc. > Are any other ways to accomplish this task? A possible way would be to use an external script to find the messages you want to tag. Roughly something like notmuch tag +patch-new $(notmuch show tag:inbox and subject:'patch'|\ grep -o 'filename:[^ ]*'|\ while read fn; do fn=${fn#filename:};\ grep -q '^Subject: \[PATCH\]' $fn && grep -i ^Message-ID: $fn|\ sed -e 's/.*<\(.*\)>/id:\1/'; \ done) There was also a discussion around http://mid.gmane.org/87ochrdpjy.fsf@wsheee.2x.cz for adding some new search operators to notmuch, but no patches were sent. > BTW: Is it possible to specify beginning(^) or the end in subject > search pattern? I don't think so. -Michal