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: Re: Supporting git-send-email/hg email in VC Date: Fri, 26 Aug 2022 10:12:40 +0300 Message-ID: References: <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="27650"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, philipk@posteo.net To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Aug 26 09:16:37 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 1oRTa0-0006xB-NZ for ged-emacs-devel@m.gmane-mx.org; Fri, 26 Aug 2022 09:16:36 +0200 Original-Received: from localhost ([::1]:50660 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oRTZz-0000TR-Ha for ged-emacs-devel@m.gmane-mx.org; Fri, 26 Aug 2022 03:16:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58076) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oRTWS-00073e-7D for emacs-devel@gnu.org; Fri, 26 Aug 2022 03:12:56 -0400 Original-Received: from meesny.iki.fi ([2001:67c:2b0:1c1::201]:44296) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oRTWP-0006yO-GE; Fri, 26 Aug 2022 03:12:55 -0400 Original-Received: from qfinm256.local (unknown [66.159.213.92]) (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 80D06203BE; Fri, 26 Aug 2022 10:12:41 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1661497961; 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: in-reply-to:in-reply-to:references:references; bh=UJu/o0CmeTMykile+PwH6KpDsLru+XGk/6nQvElfYns=; b=VQMGvzeVLSBoBuCqRaLKCIH1CIK5ze38DjOQvLE3C4wZW90n0SsrHnXDD0wGNInsQdVHH4 CeMh9Tx1H54Y88nVDYgwMNk843VKF1cCn36yWIkxSnndkXtB7/iCZ1GGrRwqv6SGMXHPGN aAhIEzDGSPXvBdVqQ7pWIswoZMiMV1Q= In-Reply-To: ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1661497961; 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: in-reply-to:in-reply-to:references:references; bh=UJu/o0CmeTMykile+PwH6KpDsLru+XGk/6nQvElfYns=; b=BhiYy0ISYs5wAoSnAZSSk/V1AxnjCB4GNpSNUkcgi/VTPjWTQ7JZ/3TmLMOiA2PwJQsnm0 udEbutJZq/nqXzyv7HDeNd2iA/JGBHNLTiLXl4ElsXEbZKWYIGHAVesg9NUClh5wZ4cVwh mJ+OaI3K8H+/PA4FEhAZf9/XvtD8cpA= 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=1661497961; a=rsa-sha256; cv=none; b=BCiHAQy/XtUNpsJvXiMdw0aPp0VAqxFLq0CK0fre1+f0uwnRXiK7gmkKzpZb7dGtBbQDgH yGcL0ZELw9hTTAuZqazBU7BF5Zg/DieNc2YlgiPdxhdk3qekdy85AunTh9AKaxm5IZEu+X hg/AURMOFk+16bBPQwaupcNCxbCNO40= 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:294132 Archived-At: Richard Stallman writes: > You can already send mail inside Emacs. It has had a feature > to edit and send messages since 1985 or so. > > VC is a generic interface to version control systems. The idea is to > make each command handles whichever version control system the files > are using. > Absolutely. The whole point of this exercise is to leverage Emacs' ability to compose mail together with VC. Most version control systems support email based workflows, at least the ones I'm familiar with. > If you'd like to implement the feature of "collect the differences > from some previous version and email them," please do not implement > it such that it is limited to one particular version control system, > or only to version control systems that have some special support. > > Please implement a default method that works for all version control > systems. The default method cannot use either git-send-email or > git-format-patch, because they (I presume) work only with git. It > should make use of vc-diff-internal to generate the patch. > > Having special code to handle the git case is ok, and it can use > git-format-patch if that works -- provided the default method makes > the feature work for other version control systems. > The idea is to provide a generic implementation for all version control systems which would simply compose a new message and insert a suitable diff into it, probably using `vc-diff-internal` or something like it. Then some version control systems (like Git and Mercurial) will have a different method, since the standard way of working with Git and email is to send patches in a mbox-like format, where the patch is inline, and then users can feed those mbox entries to `git am` (which is short for "apply mbox"). This is different from `git apply`, which applies a diff directly. Such behavior for Git could be user customizable, e.g., to suit the Emacs workflow, users can choose that VC patches be sent as attachments. We would default to the patches be directly in the messages, since this is the standard Git approach. Emacs developers can either customize this or use `M-x submit-emacs-patch`. So, in summary, there would be one default implementation that would work on any version control system VC supports, and some version control systems will have dedicated support. -- Antoine Kalmbach