Backward scrolling notmuch_messages_t and notmuch_threads_t

Jani Nikula jani at nikula.org
Tue Oct 7 04:16:41 PDT 2014


On Tue, 07 Oct 2014, Sergei Shilovsky <sshilovsky at gmail.com> 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=oldest-first tag:whatever and \
>         date:..<here is the date of the 1000th message>
>
> 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=N and --limit=N options.

BR,
Jani.


>
> -- 
> С уважением,
> Сергей Шиловский
> Sergei Shilovsky
> _______________________________________________
> notmuch mailing list
> notmuch at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch


More information about the notmuch mailing list