From: David Bremner Date: Sun, 28 Feb 2016 15:46:28 +0000 (+2000) Subject: Re: need to call notmuch_threads_get (..) to actually move iterator X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4c473d8a18051804217321e2f4c9bb723388cb2f;p=notmuch-archives.git Re: need to call notmuch_threads_get (..) to actually move iterator --- diff --git a/68/e871523d11ba75b8e21fa8288ec2050a3b19da b/68/e871523d11ba75b8e21fa8288ec2050a3b19da new file mode 100644 index 000000000..8d30f5e9c --- /dev/null +++ b/68/e871523d11ba75b8e21fa8288ec2050a3b19da @@ -0,0 +1,65 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id E33B16DE17BE + for ; Sun, 28 Feb 2016 07:46:34 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: -0.035 +X-Spam-Level: +X-Spam-Status: No, score=-0.035 tagged_above=-999 required=5 + tests=[AWL=-0.024, 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 9qjSNIVaiz6M for ; + Sun, 28 Feb 2016 07:46:32 -0800 (PST) +Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) + by arlo.cworth.org (Postfix) with ESMTPS id 39F056DE14D9 + for ; Sun, 28 Feb 2016 07:46:31 -0800 (PST) +Received: from remotemail by fethera.tethera.net with local (Exim 4.84) + (envelope-from ) + id 1aa3Yr-0000bA-RY; Sun, 28 Feb 2016 10:47:09 -0500 +Received: (nullmailer pid 5270 invoked by uid 1000); + Sun, 28 Feb 2016 15:46:28 -0000 +From: David Bremner +To: Gaute Hope , notmuch@notmuchmail.org +Subject: Re: need to call notmuch_threads_get (..) to actually move iterator +In-Reply-To: <1456315381-astroid-1-8aih8mdal8-11676@strange> +References: <1456315381-astroid-1-8aih8mdal8-11676@strange> +User-Agent: Notmuch/0.21+26~g9404723 (http://notmuchmail.org) Emacs/24.5.1 + (x86_64-pc-linux-gnu) +Date: Sun, 28 Feb 2016 11:46:28 -0400 +Message-ID: <87d1rg4z3f.fsf@zancas.localnet> +MIME-Version: 1.0 +Content-Type: text/plain +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.20 +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: Sun, 28 Feb 2016 15:46:35 -0000 + +Gaute Hope writes: + +> Hi, +> +> it seems to be necessary to actually call notmuch_threads_get (threads) +> to move the thread iterator from a query object, just calling +> notmuch_threads_move_to_next (..) is not enough: +> + +I'm not sure of all the details, but it is true that the +notmuch_threads_get has side effects in the database. In particular it +allocates new thread-ids. So I can easily imagine things failing if you +leave out the call. + +d