Josh Steadmon <[email protected]> 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> > 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. 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. 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
