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 156BE431FB6 for ; Tue, 7 Oct 2014 04:00:52 -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 friTSaOC8CSI for ; Tue, 7 Oct 2014 04:00:48 -0700 (PDT) Received: from mail-oi0-f51.google.com (mail-oi0-f51.google.com [209.85.218.51]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id AA294431FAF for ; Tue, 7 Oct 2014 04:00:48 -0700 (PDT) Received: by mail-oi0-f51.google.com with SMTP id h136so2161387oig.10 for ; Tue, 07 Oct 2014 04:00:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=LqB8w9rvkWjX4kLN3rLTwjVOYzv6MwfdCXYqhZvFIkg=; b=luqqHshEDKqBTBAJPIljHNzZDeKjh0IPiepv9Evh1kpSF8ypiI4nENNwUINNwDIRAi hoPME1pM3NciQz+1pep/RP7eK9dNlG3erwI27H4FguzWnmfpRu6pVaG/VvtNQVrJqQI8 GFnrH0Q2wvPEOmIOLlCIsMgk2uw2YHcG7nRrl43sjAWNeoZI8bPKtpe1Y28UPxNdt+Pr IL0SC1+VWT491hD9vsrtfafOtNWfmhe7B/vJQh6q5J2yFAlrGIYH3IQPtjXDO6VShMHW xyKiYelQG69dNn+95Zb9Knk2cV5fsRN9DhBkjzQYIP0Sm3xWpTjU52hEc3EQOH9fJyAu r9EQ== MIME-Version: 1.0 X-Received: by 10.182.191.102 with SMTP id gx6mr3013513obc.60.1412679647129; Tue, 07 Oct 2014 04:00:47 -0700 (PDT) Received: by 10.76.41.3 with HTTP; Tue, 7 Oct 2014 04:00:47 -0700 (PDT) Date: Tue, 7 Oct 2014 15:00:47 +0400 Message-ID: Subject: Backward scrolling notmuch_messages_t and notmuch_threads_t From: Sergei Shilovsky To: notmuch@notmuchmail.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: sshilovsky@gmail.com List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Oct 2014 11:00:52 -0000 Lets consider messages first. As far as I get there is no straightforward notmuch_messages_move_to_previous. One can usually implement such behaviour with caching previous messages which is slightly inefficient in memory consumption terms. But we can sort messages either date asc or date desc. Suppose, we're currently at the 1000th message in query "tag:whatever". So if we need to go to the previous message we could do something like notmuch search --sort=3Doldest-first tag:whatever and \ date:.. This query's result should start with our 1000th message following its previous message (in terms of the original request). So backward scrolling with no cache looks to be at least possible. Any idea of would that be fine? Is it possible to implement similar thing at low-level? --=20 =D0=A1 =D1=83=D0=B2=D0=B0=D0=B6=D0=B5=D0=BD=D0=B8=D0=B5=D0=BC, =D0=A1=D0=B5=D1=80=D0=B3=D0=B5=D0=B9 =D0=A8=D0=B8=D0=BB=D0=BE=D0=B2=D1=81= =D0=BA=D0=B8=D0=B9 Sergei Shilovsky