[notmuch-emacs] Paginate user's saved search results - proposed patch
Antoine R. Dumont
antoine.romain.dumont at gmail.com
Fri Nov 2 07:00:16 PDT 2018
Hello,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: optionally-paginate-user-saved-search.diff
Type: text/x-diff
Size: 5448 bytes
Desc: optional pagination for user's saved search
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20181102/3def97b3/attachment.diff>
-------------- next part --------------
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
```
(custom-set-variables'(notmuch-saved-searches
'((: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
results.
What this patch does not do:
- no new buttons in the search page view.
- no documentation patch about this option on saved-search
Note:
- Relevant threads:
- id:1327692900-22926-1-git-send-email-jani at nikula.org (from 7 years
ago)
- 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
(pointers/answers/help).
Cheers,
--
tony / @ardumont
-----------------------------------------------------------------
gpg fingerprint BF00 203D 741A C9D5 46A8 BE07 52E2 E984 0D10 C3B8
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20181102/3def97b3/attachment.sig>
More information about the notmuch
mailing list