unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
From: Josh Steadmon <steadmon@google.com>
To: Eric Wong <e@80x24.org>
Cc: meta@public-inbox.org
Subject: Re: How do I write labels back to the source Maildir?
Date: Mon, 29 Jan 2024 13:31:43 -0800	[thread overview]
Message-ID: <ZbgZP7GsfIWL6I_b@google.com> (raw)
In-Reply-To: <20240125002626.M918670@dcvr>

On 2024.01.25 00:26, Eric Wong wrote:
> Josh Steadmon <steadmon@google.com> wrote:
> > Hi folks,
> > 
> > This ended up being a longer email than I wanted, so to summarize, my
> > main question is: is it possible to have lei write labels created with
> > `lei-tag` back to the source Maildir which was indexed with `lei-index`?
> 
> TL;DR: not yet...
> 
> <snip all correct observations and usages>

Thanks for the explanation!

> > However, now I'm stuck trying to get that label metadata back into my
> > Maildir. I've tried both `lei refresh-mail-sync` and `lei export-kw`
> > with various combinations of options, but nothing is updating the
> > Maildir. I thought that at least one of these commands would update the
> > matching emails with an "X-Label: git-unit-tests" header, although now I
> > can't find any reference to X-Label in the lei docs, so I probably
> > confused myself somehow about that.
> 
> Correct.  I've been considering X-Label, but it also makes it
> more complicated to:
> 
> 1) to deduplicate messages when exposing lei/store blobs contents
>    (for lei import users) as a Maildir via FUSE3 (planned)
> 
> 2) to retrieve blobs for lei-index users; since blob contents end
>    up getting invalidated on the FS
> 
> Of course (as you know), blobs tend to stay forever in git
> (but hopefully deltafication can help reduce the space needed)
> 
> Good news is 2.0 (out soon, hopefully :x) no longer requires
> Linux::Inotify2 to get inotify support on most architectures,
> so inotify should work more easily out-of-the-box.

Understood. I'll keep an eye out for the release.

> Of course, X-Label is also non-standard and I haven't done much
> research into it...
> 
> * do other MUAs support it? (and differences from mutt)
> * does mutt support it for mbox, MH, IMAP, etc..?
> * character restrictions in supported MUAs? (vs. what chars Xapian allows)
> 
> Fwiw, I've never used X-Label despite using mutt for decades.

Yeah, mutt has a pattern modifier (~y) for X-Label. I am unsure about
other MUAs.

> There should also be a way to filter out X-Label (and any other
> arbitrary headers) when converting/exporting messages for
> public consumption.
> 
> > I *can* get lei-q to write these matching emails to a separate Maildir
> > using `lei q -o /tmp/git-unit-tests dfn:t/unit-tests ...`, but this
> > workflow is more annoying than I'd hoped for, as metadata is not
> > automatically synced between the various Maildirs, and it's a bit slower
> > in Mutt to switch Maildirs than to filter the currently open one.
> 
> Yeah, that's the current way.  The goal of the (future) FUSE3
> backend is avoiding duplication of blob contents onto disk and
> maybe easier synchronization of both kw and label metadata.
>
> Being able to auto-label (at least in Xapian) messages which
> enter a certain directory may also be a good idea.
> 
> > So to repeat my original question, is there any way to get lei to
> > somehow update the source Maildir to reflect the labels on these tagged
> > messages?
> 
> Again, not yet...
> 
> I've been distracted with the web UI for coderepo integration
> (to support lei-rediff in WWW) and also more distracted
> investigating ways to improve performance :x

      reply	other threads:[~2024-01-29 21:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-24 22:51 How do I write labels back to the source Maildir? Josh Steadmon
2024-01-25  0:26 ` Eric Wong
2024-01-29 21:31   ` Josh Steadmon [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://public-inbox.org/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZbgZP7GsfIWL6I_b@google.com \
    --to=steadmon@google.com \
    --cc=e@80x24.org \
    --cc=meta@public-inbox.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.
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).