From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Antoine Kalmbach Newsgroups: gmane.emacs.devel Subject: Supporting git-send-email/hg email in VC Date: Wed, 24 Aug 2022 14:56:00 +0300 Message-ID: <848rndq2i7.fsf@iki.fi> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33688"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Philip Kaluderdic To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Aug 24 14:26:48 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oQpT6-0008dE-3M for ged-emacs-devel@m.gmane-mx.org; Wed, 24 Aug 2022 14:26:48 +0200 Original-Received: from localhost ([::1]:53374 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oQpT5-0002XX-5J for ged-emacs-devel@m.gmane-mx.org; Wed, 24 Aug 2022 08:26:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44536) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQozS-0006ma-Or for emacs-devel@gnu.org; Wed, 24 Aug 2022 07:56:10 -0400 Original-Received: from meesny.iki.fi ([2001:67c:2b0:1c1::201]:42768) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQozQ-0007Lx-2E for emacs-devel@gnu.org; Wed, 24 Aug 2022 07:56:10 -0400 Original-Received: from thanatos (91-157-197-22.elisa-laajakaista.fi [91.157.197.22]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: ane) by meesny.iki.fi (Postfix) with ESMTPSA id 49C37205AD; Wed, 24 Aug 2022 14:56:01 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1661342161; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type; bh=bO4+R/j7OQ2ZBTwOnv5WNmcWeNwz9oAMp+i9ThkE9w4=; b=jqZX39WoIU846MWyt1bm6Q3IyJEYrwq+1V9uU60MaBznuL1UwlO3MWyUKioGQ/uVY8ECfP 8pelt2TERNKmZrJbcqUN4JpmNkNH0Ej4hCNa9WhxoUKgei7egOfLbCaf10asPS+NXXFr0K StoNqDAWHcJDfHJAANDNRWhJZIzpniE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1661342161; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type; bh=bO4+R/j7OQ2ZBTwOnv5WNmcWeNwz9oAMp+i9ThkE9w4=; b=AsDm4n46EvBxO0xiH2iXRlA6T8wogI0chz7NwY/psfAqcmG6lLMxTXT2ZlFsyQVOZbPDtw s+pZyNAf0PKz0DAcl8Dw9lmid+CR7t/eshcU3kkW7iZQi84U/9i+XYnXaoyLdpW5kn5EjV fN3iD5zi2sQpo70D9psy6EupPFVx9bU= ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=ane smtp.mailfrom=ane@iki.fi ARC-Seal: i=1; s=meesny; d=iki.fi; t=1661342161; a=rsa-sha256; cv=none; b=DR7EnTccR1J5ine/HMWDgOQzvP6MAXdHXORAPc4rS0y62tvMxVGNVFFtNRpkhzRqP0VPgS pcW2MQnRapgyCJCDyKoGY3ziRzGSaQLNzK9Ti6wzXHtPQown45lK88Sz6RC1P+rY5CZo2x caWr3xxyMQEPNQ8mhssJccao3tgJmg0= Received-SPF: pass client-ip=2001:67c:2b0:1c1::201; envelope-from=ane@iki.fi; helo=meesny.iki.fi X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:293993 Archived-At: 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