{"thread":{"id":"48343","subject":"Some mutt(1) patches and scripts","startedAt":"2018-04-22T20:59:05Z","lastAt":"2018-04-22T20:59:05Z","messageCount":1,"participants":["Taylor Blau"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"345419","messageId":"20180422205859.GA16261@syl.local","threadId":"48343","inReplyTo":null,"subject":"Some mutt(1) patches and scripts","fromName":"Taylor Blau","fromEmail":"me@ttaylorr.com","sentAt":"2018-04-22T20:58:59Z","receivedAt":"2018-04-22T20:59:05Z","isPatch":false,"sender":{"key":"me@ttaylorr.com","avatar":"https://avatars.githubusercontent.com/u/301000140?v=4"},"body":"Hi,\n\nI have spent more time contributing to the Git list lately, and as such\nhave grown a number of patches and scripts that have been useful for my\nworkflow. I am interested in sharing them here in the hopes that they\nwill be useful for others as well :-).\n\nMy workflow is as follows:\n\n  1. Write some commits.\n\n  2. Prepare them with 'git mail' (a wrapper over 'git-format-patch(1)').\n\n  3. Edit the cover letter template, and look them over in Mutt before\n     sending them to the list.\n\nI suspect that (2) and (3) are somewhat unconventional. My 'git mail'\nscript, in particular, has been useful to me. The contents looks\n(basically) as follows [1]:\n\n  mbox=$(mktemp)\n  git format-patch --stdout $@ >\"$mbox\" && mutt -f \"$mbox\"\n\nThis has been useful in not having to move around many *.patch files in\nan out of a directory. I enjoy looking at a series as a thread in\nmutt(1) rather than as individual files in $EDITOR.\n\nMutt is not particularly keen to resend email so I have had to teach it\na few tricks:\n\n  1. Macros \"b\" and \"B\" to resend and force-resend the highlighted\n     message. [2]\n\n    macro index,pager b \":set edit_headers=yes<enter><resend-message>:set edit_headers=no<enter>\"\n    macro index,pager B \":set editor=true<enter><resend-message><send-message>:set editor=$EDITOR<enter>\"\n\n  2. A patch to not destroy the original Message-ID header when\n     resending email. Mutt (sensibly) does this by default, but it is\n     not suitable for my workflow, as when I edit the cover letter\n     template the Message-ID changes and subsequent patches are sent in\n     response to a non-existent message.\n\n     I have patched Mutt to remove this behavior, and (since I work on\n     macOS) set up a Homebrew tap to install mutt with\n     `--with-retain-messageid'. [3]\n\nThanks,\nTaylor\n\n[1]: https://github.com/ttaylorr/dotfiles/blob/work-gh/bin/git-mail\n[2]: https://github.com/ttaylorr/dotfiles/blob/work-gh/mutt/.muttrc#L43-L44\n[3]: https://github.com/ttaylorr/homebrew-mutt\n"}]}