Re: git-send-email: Send with mutt(1)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jeff,

On Thu, Nov 09, 2023 at 01:03:08PM -0500, Jeff King wrote:
> On Thu, Nov 09, 2023 at 04:26:23PM +0100, Alejandro Colomar wrote:
> 
> > I've tried something even simpler:
> > 
> > ---8<---
> > #!/bin/sh
> > 
> > mutt -H -;
> > --->8---
> > 
> > I used it for sending a couple of patches to linux-man@, and it seems to
> > work.  I don't have much experience with mutt, so maybe I'm missing some
> > corner cases.  Do you expect it to not work for some case?  Otherwise,
> > we might have a winner.  :)
> 
> Wow, I don't know how I missed that when I read the manual. That was
> exactly the feature I was thinking that mutt would need. ;)
> 
> So yeah, that is obviously better than the "postponed" hackery I showed.
> I notice that "-H" even causes mutt to ignore "-i" (a sendmail flag that
> Git adds to sendemail.sendmailcmd). So you can just invoke it directly
> from your config like:
> 
>   git config sendemail.sendmailcmd "mutt -H -"

Having it directly in sendmailcmd causes some glitch: It repeats all CCs
in TO.  See a log:

	Send this email? ([y]es|[n]o|[e]dit|[q]uit|[a]ll): y
	OK. Log says:
	Sendmail: mutt -H - -i kevin@xxxxxx mutt-dev@xxxxxxxx alx@xxxxxxxxxx e.sovetkin@xxxxxxxxx neomutt-devel@xxxxxxxxxxx
	From: Alejandro Colomar <alx@xxxxxxxxxx>
	To: Kevin McCarthy <kevin@xxxxxx>,
		mutt-dev@xxxxxxxx
	Cc: Alejandro Colomar <alx@xxxxxxxxxx>,
		Jenya Sovetkin <e.sovetkin@xxxxxxxxx>,
		neomutt-devel@xxxxxxxxxxx
	Subject: [PATCH] send.c: Allow crypto operations in batch and mailx modes.
	Date: Fri, 10 Nov 2023 01:41:24 +0100
	Message-ID: <20231110004128.5972-2-alx@xxxxxxxxxx>
	X-Mailer: git-send-email 2.42.0
	MIME-Version: 1.0
	Content-Transfer-Encoding: 8bit

	Result: OK

The sent mail ended up being

	From: Alejandro Colomar <alx@xxxxxxxxxx>
	To: Kevin McCarthy <kevin@xxxxxx>, mutt-dev@xxxxxxxx, alx@xxxxxxxxxx,
		e.sovetkin@xxxxxxxxx, neomutt-devel@xxxxxxxxxxx
	Cc: Alejandro Colomar <alx@xxxxxxxxxx>,
		Jenya Sovetkin <e.sovetkin@xxxxxxxxx>, neomutt-devel@xxxxxxxxxxx

So maybe we need the wrapper script to ignore the arguments.

Cheers,
Alex

> 
> Annoyingly, "-E" doesn't work when reading over stdin (I guess mutt
> isn't willing to re-open the tty itself). But if you're happy with not
> editing as they go through, then "-H" is then that's enough (in my
> workflow, I do the final proofread via mutt).
> 
> -Peff

-- 
<https://www.alejandro-colomar.es/>

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux