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 9BC86431FD0 for ; Thu, 26 May 2011 01:31:26 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.799 X-Spam-Level: X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, 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 2tIukY+nYDmV for ; Thu, 26 May 2011 01:31:25 -0700 (PDT) Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com [74.125.82.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id B12C5431FB6 for ; Thu, 26 May 2011 01:31:25 -0700 (PDT) Received: by wwi36 with SMTP id 36so382374wwi.2 for ; Thu, 26 May 2011 01:31:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:subject:from:to:date:message-id:user-agent :content-transfer-encoding:mime-version:content-type; bh=T2ESQbAGTs2QzpnGBGyewFEWJKxAF+qsQVDgOJDxABs=; b=pBsBxcifgs0Qh5gL1R4CgJFOoNjuaQZuJLMKAc/ilr/WqRs6NgMYxJpEVvRE+eH9KO f8uaVp205S9+LytLRcD7eGRl5DdwUkpZZ/kp42VXyB+HwvkANjD5nYZ90whI2vwKawKm w+F6moIY0CV4GRAKPyA2spLHSPPvqI4FRCNH4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=subject:from:to:date:message-id:user-agent :content-transfer-encoding:mime-version:content-type; b=jphURBIge7Dw76XC4FNPUNAF9wicRfN+8lHZCLh5c8GkTYlEMWe0Uqinnk/LcWP2SB E0xKlgOMvt+8/3xwXEj1Q0MHRkRZbVuRqmTBOulMk4HQdPr/TF9+RVNd6Ls1alwAQH4n 8w7ICvUvImqlsnr0HhEbwlPMjJv5fz7fVK9Ok= Received: by 10.216.253.215 with SMTP id f65mr543335wes.14.1306398684433; Thu, 26 May 2011 01:31:24 -0700 (PDT) Received: from localhost (cpc1-sgyl2-0-0-cust47.sgyl.cable.virginmedia.com [80.192.18.48]) by mx.google.com with ESMTPS id n20sm223751weq.15.2011.05.26.01.31.21 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 26 May 2011 01:31:22 -0700 (PDT) Subject: one-time-iterators From: Patrick Totzke To: notmuch Date: Thu, 26 May 2011 09:31:19 +0100 Message-Id: <1306397849-sup-3304@brick> User-Agent: Sup/git Content-Transfer-Encoding: 8bit MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-1306398679-524650-9142-3184-2-="; protocol="application/pgp-signature" 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: Thu, 26 May 2011 08:31:27 -0000 --=-1306398679-524650-9142-3184-2-= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi! I'm playing around with one-time iterators Threads in the python bindings= in combination with changes to the database. Particularly, I'd like to iterate over a list of threads partially, change the tags of a single thread and afterwards continue iterating. Of course I get "Xapian DB-changed" exceptions. As I see it, there are two possible solutions: First, I iterate over all the threads and cache all the info i'd like to = extract from each one (or just the id and re-query the info on demand). The problem here is, that this list of thread-ids might be huge and caching it will block my code. Secondly, I could replace the iterator i'm using with a fresh one after = db-changes. But then I'd need some magic that discards an initial portion of the (fresh) iteration and/or updates the pre-db-change partial iteration. Wow. This reads really complicated. All I want to say is: if I change tags in my search-results view, I get Xapian errors :) The question: How do you solve this in the emacs code? do you store all tids of a query? = Thanks, /p --=-1306398679-524650-9142-3184-2-= Content-Disposition: attachment; filename="signature.asc" Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk3eD9cACgkQlDQDZ9fWxaqPqgCgrOlLTjDD8g13LtETjofpnM9P LesAn3DBYkEIzgVp5Av476rpoKOhBhBG =W3tx -----END PGP SIGNATURE----- --=-1306398679-524650-9142-3184-2-=--