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 02ADD431FC9 for ; Tue, 6 Jan 2015 18:48:05 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.3 X-Spam-Level: X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_MED=-2.3] 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 46XTkuA-ZCV5 for ; Tue, 6 Jan 2015 18:48:01 -0800 (PST) Received: from outgoing.csail.mit.edu (outgoing.csail.mit.edu [128.30.2.149]) by olra.theworths.org (Postfix) with ESMTP id C5D73431FC4 for ; Tue, 6 Jan 2015 18:48:01 -0800 (PST) Received: from [104.131.20.129] (helo=awakeningjr) by outgoing.csail.mit.edu with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1Y8gfA-0001jH-Q5; Tue, 06 Jan 2015 21:48:00 -0500 Received: from amthrax by awakeningjr with local (Exim 4.84) (envelope-from ) id 1Y8gfA-0002ed-Du; Tue, 06 Jan 2015 21:48:00 -0500 Date: Tue, 6 Jan 2015 21:48:00 -0500 From: Austin Clements To: David Creelman Subject: Re: Negating searches in notmuch running via emacs? Message-ID: <20150107024800.GE22599@csail.mit.edu> References: <20150105214633.GA19398@laplace> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150105214633.GA19398@laplace> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: notmuch@notmuchmail.org 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: Wed, 07 Jan 2015 02:48:05 -0000 Hi David. In general, "-" will negate a query term. However, Xapian's query syntax (to which notmuch is beholden) ignores "-" at the beginning of a query (and immediately after an open paren). Hence, if you want to negate the first term in a query, you'll have to use "not" instead. Hope that helps. Quoth David Creelman on Jan 06 at 8:46 am: > Hi Carl (et al), > Thanks for notmuch. It's making my email setup a bit more efficient. I used to be a filter to differnt > mbox kind of person, but I'm a changed man now !! > > Just wondered, is it possible to negate a search in notmuch for emacs? > > I have a bunch of stuff that is in my inbox that I don't want to see and have tried doing things like > > -googlealerts-noreply > -from:googlealerts-noreply > > But it looks like the '-' is ignored.... > > Is there a way of getting filtering? It looks like it's possible from the command line application (with - > and + on search terms). > > Regards, > David > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch