git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Some mutt(1) patches and scripts

From
Taylor Blau <me@ttaylorr.com>
Date
Apr 22, 2018, 20:58 UTC
Message-ID
<20180422205859.GA16261@syl.local>
Hi,

I have spent more time contributing to the Git list lately, and as such have grown a number of patches and scripts that have been useful for my workflow. I am interested in sharing them here in the hopes that they will be useful for others as well :-).

My workflow is as follows:
  1. Write some commits.
  2. Prepare them with 'git mail' (a wrapper over 'git-format-patch(1)').
  3. Edit the cover letter template, and look them over in Mutt before
     sending them to the list.

I suspect that (2) and (3) are somewhat unconventional. My 'git mail' script, in particular, has been useful to me. The contents looks (basically) as follows [1]:

  mbox=$(mktemp)
  git format-patch --stdout $@ >"$mbox" && mutt -f "$mbox"

This has been useful in not having to move around many *.patch files in an out of a directory. I enjoy looking at a series as a thread in mutt(1) rather than as individual files in $EDITOR.

Mutt is not particularly keen to resend email so I have had to teach it a few tricks:

  1. Macros "b" and "B" to resend and force-resend the highlighted
     message. [2]
    macro index,pager b ":set edit_headers=yes<enter><resend-message>:set edit_headers=no<enter>"
    macro index,pager B ":set editor=true<enter><resend-message><send-message>:set editor=$EDITOR<enter>"
  2. A patch to not destroy the original Message-ID header when
     resending email. Mutt (sensibly) does this by default, but it is
     not suitable for my workflow, as when I edit the cover letter
     template the Message-ID changes and subsequent patches are sent in
     response to a non-existent message.
     I have patched Mutt to remove this behavior, and (since I work on
     macOS) set up a Homebrew tap to install mutt with
     `--with-retain-messageid'. [3]

Thanks, Taylor

[1]: https://github.com/ttaylorr/dotfiles/blob/work-gh/bin/git-mail [2]: https://github.com/ttaylorr/dotfiles/blob/work-gh/mutt/.muttrc#L43-L44 [3]: https://github.com/ttaylorr/homebrew-mutt

Message 1 of 1 in “Some mutt(1) patches and scripts”
  1. Taylor BlauApr 22, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.