From: David Bremner <david@tethera.net>
To: Michael J Gruber <michaeljgruber+grubix+git@gmail.com>
Cc: frederik@ofb.net, notmuch@notmuchmail.org
Subject: Re: searching for a message by path
Date: Mon, 14 Oct 2024 07:58:03 -0300 [thread overview]
Message-ID: <87cyk3c5ok.fsf@tethera.net> (raw)
In-Reply-To: <CAA19uiRF+nh_gxx4wL3daVJ2V_7FPbOOSQD_9CTf2-1D5ix4XA@mail.gmail.com>
Michael J Gruber <michaeljgruber+grubix+git@gmail.com> writes:
> ```
> dirterm=XDIRECTORY$(dirname $relone)
> dirdocid=$(xapian-delve -1 -t $dirterm ~/.mail/.notmuch/xapian/ | tail -n1)
> docterm=XFDIRENTRY${dirdocid}:$(basename $relone)
> docid=$(xapian-delve -1 -t $docterm ~/.mail/.notmuch/xapian/ | tail -n1)
> xapian-delve -1 -t $docterm -r $docid -V1 ~/.mail/.notmuch/xapian/ |
> grep Value | cut -d' ' -f6-
> ```
Impressive hack! ;)
Roughly speaking, that's what the code in question does, but a
PostingSource is a Xapian way of wrapping up that double query (two
calls to xapian-delve in this case) so that it can be part of a regular
query with e.g. a file: prefix.
prev parent reply other threads:[~2024-10-14 10:58 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-20 17:52 searching for a message by path Frederick Eaton
2024-09-21 0:25 ` Pengji Zhang
2024-09-21 3:23 ` Frederick Eaton
2024-09-21 9:01 ` Pengji Zhang
2024-09-21 9:38 ` Michael J Gruber
2024-09-21 10:44 ` Gregor Zattler
2024-09-21 16:24 ` Panayotis Manganaris
2024-09-21 17:30 ` Teemu Likonen
2024-09-23 22:14 ` Panayotis Manganaris
2024-09-24 13:00 ` David Bremner
2024-09-24 9:09 ` Michael J Gruber
2024-09-28 2:56 ` Frederick Eaton
2024-09-29 12:08 ` David Bremner
2024-10-12 22:59 ` David Bremner
2024-10-14 6:50 ` Michael J Gruber
2024-10-14 10:58 ` David Bremner [this message]
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=87cyk3c5ok.fsf@tethera.net \
--to=david@tethera.net \
--cc=frederik@ofb.net \
--cc=michaeljgruber+grubix+git@gmail.com \
--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).