Snippets

notmuch search --format=text --output=files -- tag:new \
| bogofilter -b -T \
| sed -r \
    -e 's/^(.+) (S|H|U) ([0-9]+(\.[0-9]+(e-[0-9]+)?)?)$/\1 \2/' \
    -e 't ok' \
    -e 'Q 1' \
    -e ': ok' \
    -e '/^.* (H|U)$/ d' \
    -e 's/(.*) ([S|H|U])$/\1/' \
| xargs -d '\n' -L 16 \
    grep -h -i -m 1 -E \
        -e '^message-id: ' -- \
| sed -r \
    -e 's/^[Mm][Ee][Ss][Ss][Aa][Gg][Ee]-[Ii][Dd]: <(.*)>$/id:\1/' \
    -e 't' \
    -e 'Q 1' \
| xargs -d '\n' -L 16 \
    notmuch search --