unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Supporting git-send-email/hg email in VC
@ 2022-08-24 11:56 Antoine Kalmbach
  2022-08-24 14:43 ` Akib Azmain Turja
                   ` (5 more replies)
  0 siblings, 6 replies; 16+ messages in thread
From: Antoine Kalmbach @ 2022-08-24 11:56 UTC (permalink / raw)
  To: emacs-devel; +Cc: Philip Kaluderdic


Would it make sense for Emacs' VC to support emailing patches from
within Emacs? It kind of doesn't make sense that I can do mostly
everything in VC... but I have to jump to the command line (shell) to
use git-send-email.

I was thinking there could be a command called 'vc-mail-commit' which
would in vc-dir-mode or vc-log-mode do the right thing and call git
format-patch and then compose a mail with the contents of the patch (or
the patch attached, depending on customization).

The right thing would be in vc-dir-mode to prompt for a ref (branch, -1,
HEAD^, etc), in vc-log-mode it would be to compose a set of patches from
the marked commit(s), or prompt like in vc-dir-mode for a ref to send a
patch from a user-specified ref.

Does such a feature make sense? I know sites like git-send-email.io[1]
say things like:

> Warning! Some people think that they can get away with sending patches
> through some means other than git send-email, but you can't. Your
> patches will be broken and a nuisance to the maintainers whose inbox
> they land in. Follow the golden rule: just use git send-email.

But I find that if and only if you use git-format-patch, the end result
is pretty much the same. To that end, I think if Emacs managed to
integrate with the different DVCS' email-based workflows, it would be
a great usability improvement.

If people think this would be a useful feature, I can open a bug report
to track this and start working on it. The proposed reference
implementation for Git would be to (1) ask the user for a ref (2) call
git format-patch with that (3) compose a new message in Emacs, and set
the body of the message to be the output of git-format-patch (OR attach
the file) and (4) let the MUA take it from there.

Alternatively, it would be possible to use a combination of with-editor
+ git-send-email, but only if we should need ot abide by the "rule",
because to me there aren't many nuances beyond using the format
specified by git-format-patch with your own MUA vs. using
git-send-email. Or do I not know enough about the latter to not see the
missing pieces?

[1] https://git-send-email.io/#step-3

-- 
Antoine Kalmbach



^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2022-08-26  7:15 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-24 11:56 Supporting git-send-email/hg email in VC Antoine Kalmbach
2022-08-24 14:43 ` Akib Azmain Turja
2022-08-24 15:11 ` Philip Kaludercic
2022-08-24 17:06 ` Stefan Monnier
2022-08-24 17:44 ` Juri Linkov
2022-08-24 21:31 ` Sam James
2022-08-25  8:36   ` Antoine Kalmbach
2022-08-25 14:47     ` Sean Whitton
2022-08-25 15:52       ` Philip Kaludercic
2022-08-25 22:04         ` Sean Whitton
2022-08-25 17:34     ` Stefan Monnier
2022-08-25 18:04       ` Philip Kaludercic
2022-08-26  7:14         ` Antoine Kalmbach
2022-08-26  7:15       ` Antoine Kalmbach
2022-08-26  3:35 ` Richard Stallman
2022-08-26  7:12   ` Antoine Kalmbach

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).