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

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

 



On Wed, Nov 08, 2023 at 10:02:52PM +0100, Alejandro Colomar wrote:

> > That seems like a reasonable feature. Probably it should be
> > --cc-from-trailer=signed-off-by, and then you could do the same with
> > other trailers.
> 
> That would work for me.  I only suggested the other one because it's
> aleady in send-email in that form.  But yeah, it might be useful to have
> finer control.  In my case, something that CCs every mail in the trailer
> would work (Reviewed-by, Suggested-by, ...  I want them all, always).

Oh, I didn't realize it existed in send-email. I am showing my ignorance
of it. ;)

> > # spool the message to a fake mbox; we need to add
> > # a "From" line to make it look legit
> > trap 'rm -f to-send' 0 &&
> > {
> >   echo "From whatever Mon Sep 17 00:00:00 2001" &&
> >   cat
> > } >to-send &&
> 
> Would a named pipe work?  Or maybe we could use $(mktemp)?

I suspect mutt wants it to be a real file. But yeah, mktemp would
definitely work. I actually started to write it that way but switched to
a static name for simplicity in demonstrating the idea. :)

One note, though. Later we need to pass this filename to mutt config:

> > mutt -p \
> >   -e 'set postponed=to-send' \

so it's a potential worry if "mktemp" might use a path with spaces or
funny characters (e.g., from $TMPDIR). Probably not much of a problem in
practice, though.

> Huh, this is magic sauce!  Works perfect for what I need.  This would
> need to be packaged to the masses.  :-)
> 
> I found a minor problem: If I ctrl+C within mutt(1), I expect it to
> cancel the last action, but this script intercepts the signal and exits.
> We would probably need to ignore SIGINT from mutt-as-mta.

Yeah, that might make sense, and can be done with trap.

> Would you mind adding this as part of git?  Or should we suggest the
> mutt project adding this script?

IMHO it is a little too weird and user-specific to really make sense in
either project. It's really glue-ing together two systems. And as it's
not something I use myself, I don't plan it moving it further along. But
you are welcome to take what I wrote and do what you will with it,
including submitting it to mutt.

-Peff




[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