Subject: Re: bug#57400: 29.0.50; Support sending patches from VC directly

From: Eli Zaretskii <[email-masked]>
Date: Fri, 26 Aug 2022 13:58:19 +0300

> Cc: [email-masked]
> From: Antoine Kalmbach <[email-masked]>
> Date: Fri, 26 Aug 2022 13:45:51 +0300
> 
>   1. `M-x vc-prepare-patch`
>   2. Dispatch to `vc-git-prepare-patch`
>   3. Git wants a revision range, so interactively prompt for that
>      (e.g. `HEAD^`, `abcd1234..ghjk5678`, or `-1`)

Please allow the user to specify the range of commits in a log-like
display, e.g. by having mark and point around them.  It makes no sense
to force users to type revisions in the Git syntax, and come up with
the SHA1 codes on top of that.  VC is supposed to be a convenient UI,
not just a dumb front-end to the VCS.

>   4. `call-process` to `git format-patch $REV`, and so forth, get the
>      list of files.

By "list of files" do you mean the list of patch files?

>   5. Loop each file in `message-mode`. `C-c C-c` sends and goes to the
>      next patch, `C-c C-k` cancels the whole thing.

Please don't hard-code message-mode.  Please honor the user setting of
mail-user-agent instead.

Also, I'm not sure why we'd need to send each patch file separately.
Why not add them one by one as attachments to the same email message?

> Most likely, depending on the backend, we should not require any
> parameters besides the "set of changes".

If you allow to specify that via the region, all your problems are
solved, and the only one that remains is how to express that in the
backend-specific syntax.