Re: easy (?) elisp project for notmuch [it's mostly DONE]

2020-04-15 Thread Kyle Meyer
Jonas Bernoulli  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  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-...@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 "
exit 1
fi

cd "$(mktemp -d ${TMPDIR:-/tmp}/notmuch-import-XXX)"
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@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.
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: easy (?) elisp project for notmuch [it's mostly DONE]

2020-04-15 Thread Sean Whitton
Hello,

On Wed 15 Apr 2020 at 01:41PM -07, Sean Whitton wrote:

> Debian/Ubuntu/etc. you can `apt-get install mailscripts`

Oh, and `apt-get install elpa-mailscripts` to get `M-x
notmuch-slurp-this-debbug` and `M-x notmuch-slurp-debbug`.

-- 
Sean Whitton
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: easy (?) elisp project for notmuch [it's mostly DONE]

2020-04-15 Thread Sean Whitton
Hello,

On Wed 15 Apr 2020 at 04:28PM -03, David Bremner wrote:

> Jonas Bernoulli  writes:
>
>>
>> One related use case for "notmuch insert" that I had in mind is the
>> import of debbugs threads.  It someone is aware of an existing solution
>> then please let me know.  Kyle, have you considered mirroring
>> emacs-devel and the Emacs debbugs as well?
>
> Sean Whitton (in copy) maintains a script called notmuch-slurp-debbug
> that does that. I can't remember if it is tested on the GNU instance of
> debbugs.
>
> https://git.spwhitton.name/mailscripts

Untested, but should work, and it's a bug if it doesn't.

Debian/Ubuntu/etc. you can `apt-get install mailscripts`

-- 
Sean Whitton
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: easy (?) elisp project for notmuch [it's mostly DONE]

2020-04-15 Thread David Bremner
Jonas Bernoulli  writes:

>
> One related use case for "notmuch insert" that I had in mind is the
> import of debbugs threads.  It someone is aware of an existing solution
> then please let me know.  Kyle, have you considered mirroring
> emacs-devel and the Emacs debbugs as well?

Sean Whitton (in copy) maintains a script called notmuch-slurp-debbug
that does that. I can't remember if it is tested on the GNU instance of
debbugs.

https://git.spwhitton.name/mailscripts

d
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: easy (?) elisp project for notmuch [it's mostly DONE]

2020-04-15 Thread Jonas Bernoulli
Nice to run into you.

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

Kyle Meyer  writes:

> [ in case it's useful in the future ]
> I've recently set up a public-inbox archive of notmuch

Absolutely! In fact I already had a bookmark about that somewhere.

> 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?

> It might be possible to download a single message or thread from the
> archive

One related use case for "notmuch insert" that I had in mind is the
import of debbugs threads.  It someone is aware of an existing solution
then please let me know.  Kyle, have you considered mirroring
emacs-devel and the Emacs debbugs as well?

  Cheers,
  Jonas
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: easy (?) elisp project for notmuch [it's mostly DONE]

2020-04-14 Thread Kyle Meyer
Jonas Bernoulli  writes:

> (I cannot actually reply to "easy (?) elisp project for notmuch"
> because I wasn't subscribed yet when that was send.)

[ in case it's useful in the future ]

I've recently set up a public-inbox archive of notmuch here:

https://yhetil.org/notmuch/

>From there, you can easily download an mbox for a message or thread from
before you subscribed (e.g. to feed to 'notmuch insert').  As an
example, here's the one for your message:

https://yhetil.org/notmuch/875ze211gi@bernoul.li/raw

It might be possible to download a single message or thread from the
archive at , though looking
quickly it seems like downloads may only be available for messages over
a year time span.  (Also, FWIW the entire history is available at
.)
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: easy (?) elisp project for notmuch [it's mostly DONE]

2020-04-14 Thread David Bremner
Jonas Bernoulli  writes:

> I have already done this (and then some) a while ago.  I want to have
> another look before I submit it, but will try to get that done today.
>
> (I cannot actually reply to "easy (?) elisp project for notmuch"
> because I wasn't subscribed yet when that was send.)
>

Sounds good. Now that you've claimed the project, no need to push
yourself to get it done today ;).

cheers

d
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: easy (?) elisp project for notmuch [it's mostly DONE]

2020-04-14 Thread Jonas Bernoulli
> As of Emacs 27, Emacs will start issuing deprecation warnings for
> packages that load cl.el. I _think_ it's just a matter of replacing
> functions and macros from cl.el with cl- prefixed ones, but I
> haven't really investigated.

> If someone is looking for an easy way to contribute, this cleanup might
> be a good way to start.

Just a heads up to avoid duplicated work.

I have already done this (and then some) a while ago.  I want to have
another look before I submit it, but will try to get that done today.

(I cannot actually reply to "easy (?) elisp project for notmuch"
because I wasn't subscribed yet when that was send.)

  Cheers,
  Jonas
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch