From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id A9AA26DE12C2 for ; Mon, 5 Sep 2016 08:48:16 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.007 X-Spam-Level: X-Spam-Status: No, score=-0.007 tagged_above=-999 required=5 tests=[AWL=0.004, 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 D2a-MoLf7Gjp for ; Mon, 5 Sep 2016 08:48:16 -0700 (PDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id 0A6366DE12BC for ; Mon, 5 Sep 2016 08:48:16 -0700 (PDT) Received: from remotemail by fethera.tethera.net with local (Exim 4.84_2) (envelope-from ) id 1bgw80-0001bu-Rq for notmuch@notmuchmail.org; Mon, 05 Sep 2016 11:48:08 -0400 Received: (nullmailer pid 24436 invoked by uid 1000); Mon, 05 Sep 2016 15:48:12 -0000 From: David Bremner To: notmuch@notmuchmail.org Subject: Fix count/search query destructiveness Date: Mon, 5 Sep 2016 12:48:01 -0300 Message-Id: <20160905154806.4570-1-david@tethera.net> X-Mailer: git-send-email 2.9.3 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.22 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: Mon, 05 Sep 2016 15:48:16 -0000 As discussed in id:147263183913.27784.12274024193186585889@mbp, the current behaviour is destructive due to exclude handling. This makes some natural code, including notmuch-reply, buggy. I haven't updated the library prototypes for const correctness, but that would probably make sense. Before I go through that, I wanted to get some feedback on the breaking change to notmuch_query_add_tag_exclude. Another option would be to add a (take a breath) notmuch_query_add_tag_exclude_st and wrap that in notmuch_query_add_tag_exclude. I decided not to go that route in this initial series since effectively code calling the function as void impliment this same status ignoring. It depends how terrible we think bumping the SONAME is. [1] [1]: If we're going to break the ABI, I'd like to do it soon to give Debian a chance to do a transition before the next stable release.q