unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Kyle Meyer <kyle@kyleam.com>
To: Jonas Bernoulli <jonas@bernoul.li>
Cc: notmuch@notmuchmail.org, Sean Whitton <spwhitton@spwhitton.name>
Subject: Re: easy (?) elisp project for notmuch [it's mostly DONE]
Date: Wed, 15 Apr 2020 22:01:19 +0000	[thread overview]
Message-ID: <878siw8l3k.fsf@kyleam.com> (raw)
In-Reply-To: <878siwsi8n.fsf@bernoul.li>

Jonas Bernoulli <jonas@bernoul.li> writes:

> Nice to run into you.

You too :)

> Do you contribute to *all* the killer apps? ;D

Heh.  I think notmuch is great, but I haven't made any real
contributions.  Just a happy user and a lurker on the mailing list.

> Kyle Meyer <kyle@kyleam.com> writes:

>> From there, you can easily download an mbox for a message or thread
>> from before you subscribed (e.g. to feed to 'notmuch insert').
>
> Do you already have some tooling that you could share?

Only very minimal.  I have a script that takes a public-inbox thread
mbox link, such as

  https://public-inbox.org/meta/20200406095621.5656-1-e@yhbt.net/t.mbox.gz

It uses mbox2maildir from Sean's mailscripts to convert the mbox to a
maildir and then calls 'notmuch insert' with each message.  There might
be a better approach, but it's been working fine for me.  My main use
case is that I follow some lists hosted on public-inbox.org and
lore.kernel.org via nntp; if I want to reply to something, I import a
thread into notmuch.

Note that it hard codes my folder.

--8<---------------cut here---------------start------------->8---
#!/bin/sh

if test  $# -ne 1
then
    echo "$0 <mbox.gz URL>"
    exit 1
fi

cd "$(mktemp -d ${TMPDIR:-/tmp}/notmuch-import-XXXXXXX)"
curl -fsS $1 | gunzip -c >t.mbox
mbox2maildir t.mbox mdir
for f in $(find mdir -type f)
do
    notmuch insert --no-hooks --folder=kyleam/INBOX <$f
done
--8<---------------cut here---------------end--------------->8---

As a side note about tooling: David mentioned Sean's mailscripts in the
context of debbugs.  I haven't used that specific functionality yet, but
it has other scripts that are really nice for working with patch series.
mailscripts even gained some functionality for extracting a patch series
from an mbox that was inspired [^1] by Konstantin Ryabitsev's
get-lore-mbox.py [^2] tool for grabbing patch series from threads on
lore.kernel.org, which uses public-inbox.

All very exciting :)

[^1]: https://lore.kernel.org/workflows/87lfp38p7s.fsf@iris.silentflame.com/
[^2]: I think this tool was renamed recently, but I can't find that
      information at the moment.

> Kyle, have you considered mirroring emacs-devel and the Emacs debbugs
> as well?

I have... I dunno :/  The two higher-volume projects that I'm
considering creating public-inbox archives for are Emacs (devel and
debbugs) and Guix (patches, bugs, devel, user, ... they sure do like to
split up discussion ...).  It takes some work up front to create the
initial archives, but my main hesitation is due to uncertainty about how
my current VPS set up would fare.  So, I'm letting things settle a bit.

      parent reply	other threads:[~2020-04-15 22:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-14 16:22 easy (?) elisp project for notmuch [it's mostly DONE] Jonas Bernoulli
2020-04-14 16:56 ` David Bremner
2020-04-14 17:14 ` Kyle Meyer
2020-04-15 18:42   ` Jonas Bernoulli
2020-04-15 19:28     ` David Bremner
2020-04-15 20:41       ` Sean Whitton
2020-04-15 20:43         ` Sean Whitton
2020-04-15 22:01     ` Kyle Meyer [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=878siw8l3k.fsf@kyleam.com \
    --to=kyle@kyleam.com \
    --cc=jonas@bernoul.li \
    --cc=notmuch@notmuchmail.org \
    --cc=spwhitton@spwhitton.name \
    /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).