[notmuch-emacs] Paginate user's saved search results - proposed patch

Subject: [notmuch-emacs] Paginate user's saved search results - proposed patch

Date: Fri, 02 Nov 2018 15:00:16 +0100

To: notmuch@notmuchmail.org


From: Antoine R. Dumont

Here is a patch (against current master - 7f726c6e) to allow user
saved-search query pagination.  This is an opt-in option to be defined
on per saved-search basis.

To opt-in, define a :limit option on a saved-search.
If not defined, the current behavior (no limit) is kept.

# example

      '((:name "inbox"
         :query "tag:inbox"
         :count-query "tag:inbox"
         :sort-order 'newest-first
         :limit 30
         :key "i")
        (:name "unread"
         :query "tag:inbox and tag:unread"
         :count-query "tag:inbox and tag:unread"
         :sort-order 'newest-first
         :key "u"))))

Here the 'unread' saved-search will work as usual.
The 'inbox' one will paginate results by page of 30.
The user can then use M-n to move forward or M-p to move backward in

What this patch does not do:
- no new buttons in the search page view.
- no documentation patch about this option on saved-search

- Relevant threads:
  - id:1327692900-22926-1-git-send-email-jani@nikula.org (from 7 years
  - The state part was unclear, j4ni's old diff on that matter unstuck
  me http://paste.debian.net/1050094/
  - https://notmuchmail.org/pipermail/notmuch/2017/024495.html
  - https://notmuchmail.org/pipermail/notmuch/2017/024496.html
  - https://notmuchmail.org/pipermail/notmuch/2017/024497.html
- notmuchmail.org is down (some part at least, so i cannot download the
  archive, convert and reply to the right thread, sorry)

Thanks to bremner and j4ni for their help on irc

tony / @ardumont

gpg fingerprint BF00 203D 741A C9D5 46A8 BE07 52E2 E984 0D10 C3B8
signature.asc (application/pgp-signature)
notmuch mailing list