From: Teemu Likonen <tlikonen@iki.fi>
To: notmuch@notmuchmail.org
Subject: Re: Meaning of offset in notmuch search --output=files --offset=
Date: Sat, 25 May 2024 10:07:36 +0300 [thread overview]
Message-ID: <87v8328j47.fsf@iki.fi> (raw)
In-Reply-To: <87ed9wz6im.fsf@iki.fi>
[-- Attachment #1.1: Type: text/plain, Size: 1199 bytes --]
* 2024-05-20 21:24:01+0300, Teemu Likonen wrote:
> It doesn't seem clear how offset is counted on command like
>
> notmuch search --output=files --offset=10 ...
>
> Does it skip 10 output files (which may belong to less than 10 messages)
> or does it skip 10 messages (so it possibly skips more than 10 files)?
> Manual page speaks of "results" but I think it can be interpreted either
> as "displayed output results" or "search match results (messages)".
I tested and the answer is: --offset option skips that many search match
messages. So it looks to me that command
notmuch search --output=files --offset=10 ...
internally lists all matched messages, skips to the offset, and then
starts printing the file names of the rest of the message list.
> Perhaps the manual page needs a few more words to make it clear.
--offset=[-]N
Skip displaying the first N results. With the leading '-',
start at the Nth result from the end.
What if we change the first sentence to "Skip displaying the first N
search results"?
--
/// Teemu Likonen - .-.. https://www.iki.fi/tlikonen/
// OpenPGP: 6965F03973F0D4CA22B9410F0F2CAE0E07608462
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 251 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2024-05-25 7:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-20 18:24 Meaning of offset in notmuch search --output=files --offset= Teemu Likonen
2024-05-25 7:07 ` Teemu Likonen [this message]
2024-05-25 10:05 ` David Bremner
2024-05-25 11:20 ` Michael J Gruber
2024-05-26 7:57 ` Teemu Likonen
2024-05-27 13:05 ` Daniel Kahn Gillmor
2024-05-27 16:50 ` Teemu Likonen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87v8328j47.fsf@iki.fi \
--to=tlikonen@iki.fi \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).