unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: frederik@ofb.net
Cc: notmuch@notmuchmail.org
Subject: Re: searching for a message by path
Date: Sat, 12 Oct 2024 19:59:45 -0300	[thread overview]
Message-ID: <874j5hdj1a.fsf@tethera.net> (raw)
In-Reply-To: <87wmiur7aq.fsf@tethera.net>

David Bremner <david@tethera.net> writes:

> Frederick Eaton <frederik@ofb.net> writes:
>
>> If Notmuch is meant to function as an abstraction layer over message
>> files stored on the file system, then why doesn't it provide a
>> standard way to go from file paths to Notmuch messages?
>
> Although I think notmuch as it exists is far from "an abstraction
> layer", the specific feature request seems reasonable. It would need
> someone who wants it to get familiar with the low level implementation
> details of notmuch. In particular it would require writing a database
> upgrade and having a new version of the database schema.

I was looking at the code, and I realized it is not actually as hard as
that.  Essentially the code of notmuch_database_find_message_by_filename
needs to be wrapped in a PostingSource following the model of
RegexpPostingSource (regexp-fields.cc). The fact that no database format
changes (or even reindexing) are needed, makes this a much lower risk
project.

d

  reply	other threads:[~2024-10-12 23:00 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 [this message]
2024-10-14  6:50               ` Michael J Gruber
2024-10-14 10:58                 ` David Bremner

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=874j5hdj1a.fsf@tethera.net \
    --to=david@tethera.net \
    --cc=frederik@ofb.net \
    --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).