tools.linux.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Konstantin Ryabitsev" <konstantin@linuxfoundation.org>
To: tools@linux.kernel.org
Cc: Philippe Blain <levraiphilippeblain@gmail.com>
Subject: Re: [tools] [b4] make 'b4 mbox' reorder headers so piping to 'git imap-send' works
Date: Mon, 21 Dec 2020 14:03:26 -0500	[thread overview]
Message-ID: <20201221190326.vdqjsqqdrq3atboc@chatter.i7.local> (raw)
In-Reply-To: <1652CA1A4BC02C6D.17984@linux.kernel.org>

On Mon, Dec 21, 2020 at 12:03:47PM -0500, Konstantin Ryabitsev via linux.kernel.org wrote:
>   b4 mbox -o ~/Mail [msgid]
> 
> This will add all messages from the retrieved thread to the mail spool in
> ~/Mail (assuming it has the expected {new,cur,tmp} subdirs).

I just added a -f|--filter-dupes flag to "b4 mbox" that will check the
existing maildir for existing duplicates before adding messages from the
retrieved thread. This allows neat things like retrieving the rest of the
thread directly from mutt. If you add the following to .muttrc:

macro index 4 "<pipe-message>~/bin/b4.sh mbox -f -o ~/Mail<return>"

(obviously, use something other than ~/Mail if it's not where your maildir is)

This lets you hit "4" in the index view to retrieve the rest of the thread for
the message that is currently selected (or tagged). Handy for when you're cc'd
in the middle of a discussion and want to grab everything else for context.

NOTE: -f requires iterating through the entire maildir to collect existing
msgids, so it's not recommended for huge maildirs.

-K

      parent reply	other threads:[~2020-12-21 19:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-21  0:21 [b4] make 'b4 mbox' reorder headers so piping to 'git imap-send' works Philippe Blain
2020-12-21 17:03 ` Konstantin Ryabitsev
     [not found] ` <1652CA1A4BC02C6D.17984@linux.kernel.org>
2020-12-21 19:03   ` Konstantin Ryabitsev [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

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

  git send-email \
    --in-reply-to=20201221190326.vdqjsqqdrq3atboc@chatter.i7.local \
    --to=konstantin@linuxfoundation.org \
    --cc=levraiphilippeblain@gmail.com \
    --cc=tools@linux.kernel.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 NNTP newsgroup(s).