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 66F8D431FB6 for ; Tue, 7 Oct 2014 04:16:34 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[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 6VjD0XZW7lZR for ; Tue, 7 Oct 2014 04:16:28 -0700 (PDT) Received: from mail-wi0-f182.google.com (mail-wi0-f182.google.com [209.85.212.182]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 08544431FAF for ; Tue, 7 Oct 2014 04:16:27 -0700 (PDT) Received: by mail-wi0-f182.google.com with SMTP id n3so7510324wiv.3 for ; Tue, 07 Oct 2014 04:16:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:in-reply-to:references :user-agent:date:message-id:mime-version:content-type :content-transfer-encoding; bh=kBbQzoymrs8Q1WTEpz4x5mNi2WR4b2hIPLz+skP7dc8=; b=CP0sk+sNyyKNstbR/7F9Iw6UfyqJvRxAQctZGjvNes3fLpa/Yqd7ITNz9xq+fAD93H ZU/EoXGwRdfzz7QDcbFVAiq4B2VboUJuPC5L4ldQOC08MbTBufBm5LiqXybPdDlNaXXk CI1CgpVQdW8AiyTTwShhYbeapj/oYG60Ltm07/r+218NHCpqkZeIWgnXo/qtQsP+FvpE P013u9+H56rswLUaknqzqc/3zh+WV35XB/wDUXxG9D0ZfUjqHa79K7Woeca58asL9wEB HjCQSf7QqqA/edOpW2rTBZLd6JdGiOsK8NMeHxzuytXlpEJ3CG+iMoNyAZWnrZri2ZGA rBkQ== X-Gm-Message-State: ALoCoQloji/JJSW5ig0F91RqvKkFrAQ3UfEkom4TaoMyTBnQATr0opF7RDWZb4d4i+dAG1o49Ezz X-Received: by 10.181.29.134 with SMTP id jw6mr3704938wid.69.1412680584516; Tue, 07 Oct 2014 04:16:24 -0700 (PDT) Received: from localhost ([2001:4b98:dc0:43:216:3eff:fe1b:25f3]) by mx.google.com with ESMTPSA id bi7sm14330278wib.17.2014.10.07.04.16.23 for (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Tue, 07 Oct 2014 04:16:24 -0700 (PDT) From: Jani Nikula To: sshilovsky@gmail.com, notmuch@notmuchmail.org Subject: Re: Backward scrolling notmuch_messages_t and notmuch_threads_t In-Reply-To: References: User-Agent: Notmuch/0.18.1+69~gf92342c (http://notmuchmail.org) Emacs/23.2.1 (x86_64-pc-linux-gnu) Date: Tue, 07 Oct 2014 13:16:41 +0200 Message-ID: <87lhos5duu.fsf@nikula.org> MIME-Version: 1.0 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 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:16:34 -0000 On Tue, 07 Oct 2014, Sergei Shilovsky wrote: > 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? See notmuch search --offset=3DN and --limit=3DN options. BR, Jani. > > --=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 > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch