From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id 2FQUI3L/CmclQwEAe85BDQ:P1 (envelope-from ) for ; Sat, 12 Oct 2024 23:00:02 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id 2FQUI3L/CmclQwEAe85BDQ (envelope-from ) for ; Sun, 13 Oct 2024 01:00:02 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=tethera.net header.s=2024 header.b=ZgSOTvZA; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1728774001; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=vjQkiRYdVjylamuj4GhRxpzJZM7g5WYmrnaf5r4BBoA=; b=k0CypFxt+YPSg+4E5FnLQ3qYMHpTHI3U6wW9V99TV9xvIi3vRqypzVErG5S3Z7HiSnJGkh n2fAzwl32r9U1EBNaoVP7bSWzhvMzEj/8QyrZjZIm4HzH3sU9y74QRHhI+rKHfmhSoIOR5 1bWpC3Dc8vROT+gjigykmC6QbGrHYJabrd7bIStg4VtO4iAY5edz6KYcDiBULVAyemYikK Wl31q5UAuXM4YeUE42UKdLIi1M/3QHCmPJ3w9OHCdhcf+4MUnLjD1nzQfwqXqKi9J+xsgp dMHiCG7hgamxBMMYC9bXufD+9GNQRmWHmaE5SEgaeeU5o+OoRX5MJndKBZvPYw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1728774001; a=rsa-sha256; cv=none; b=rMuYCJrzP+EfiFRs8dX9XEXfovwWMu0x3l5CzuPlOML8jRRxIpyRAiIjWrPhZb5j4JDyCa Eph94yebA8slM14+ByKl+S0BE7kIO1BH5zRsjfUnhbrtHE8sIgEweBiMWPjgdcwF9s7RwF ETnEJFVQ1J6QA4m1/2FJmWFIvQ43u1gnODQ6jdu/UdZ86ZrXm3qCVqc3SRN2AyQpsqXU6b xPqOd2oeGqMpiDYe+l6Z9hUzqZfnF6LauZ9AbLgFcTLZGaU1jpjzFaNPnQUpXxtjjbQ+og 8YE6P6cLCaXB8yEomm/QxSWn49IHPhNp/KiHEnGKEqPlHnEVfo/GwJBmGScIPA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=tethera.net header.s=2024 header.b=ZgSOTvZA; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org; dmarc=none Received: from mail.notmuchmail.org (yantan.tethera.net [IPv6:2a01:4f9:c011:7a79::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 5BBC87CFE5 for ; Sun, 13 Oct 2024 01:00:00 +0200 (CEST) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id A93C25E507; Sat, 12 Oct 2024 22:59:51 +0000 (UTC) Received: from phubs.tethera.net (phubs.tethera.net [192.99.9.157]) by mail.notmuchmail.org (Postfix) with ESMTPS id 45BF95E16C for ; Sat, 12 Oct 2024 22:59:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tethera.net; i=@tethera.net; q=dns/txt; s=2024; t=1728773985; h=from : to : cc : subject : in-reply-to : references : date : message-id : mime-version : content-type : from; bh=PPdeXuVVYg92WjZXS3xZzhC2sTYBfGNY+73Or9v/6xE=; b=ZgSOTvZAA7Ynek2cvAKBS/KxizEhvNPmDMcKfzrrzdl4Gu11aHWm0l0h5HROXO9LgNy5/ Wzo7JXRuiJL8Zhim2jAobxxRO3gz2INpz2qXb3XDwqi3PjeHqXMWXa88IfDNJ4kxINWeq0S +gH5honZ1XdQgStXIfO/7PU31xwPyYY17s2GAorWeetvtROKs/sy10Cje99h4YfQF3gEp/P Jsg8X2R6a5b7zy4NvsNziCXCOF2vJzvxX+GIKCLigeWbdOSbLTjO4Vj83nZCcAhS+u6q+lf d8xCVsP/tm9j/z3n27PavFaVvS4NwelBwidMhSlUs28CJ/ZLLhLSoqDT0JCA== Received: from tethera.net (fctnnbsc51w-159-2-211-58.dhcp-dynamic.fibreop.nb.bellaliant.net [159.2.211.58]) by phubs.tethera.net (Postfix) with ESMTPS id 7F982180181; Sat, 12 Oct 2024 19:59:45 -0300 (ADT) Received: (nullmailer pid 1589834 invoked by uid 1000); Sat, 12 Oct 2024 22:59:45 -0000 From: David Bremner To: frederik@ofb.net Subject: Re: searching for a message by path In-Reply-To: <87wmiur7aq.fsf@tethera.net> References: <20240928025630.km2tcgjgt3xub4jo@localhost> <87wmiur7aq.fsf@tethera.net> Date: Sat, 12 Oct 2024 19:59:45 -0300 Message-ID: <874j5hdj1a.fsf@tethera.net> MIME-Version: 1.0 Message-ID-Hash: 2KQE343CXVNJKIAWANLX4RI73VNVIIPN X-Message-ID-Hash: 2KQE343CXVNJKIAWANLX4RI73VNVIIPN X-MailFrom: david@tethera.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: notmuch@notmuchmail.org X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-Country: DE X-Migadu-Spam-Score: 1.36 X-Spam-Score: 1.36 X-Migadu-Queue-Id: 5BBC87CFE5 X-Migadu-Scanner: mx13.migadu.com X-TUID: RXGvC/EB8JBq David Bremner writes: > Frederick Eaton 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