From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#57400: 29.0.50; Support sending patches from VC directly Date: Thu, 06 Oct 2022 13:33:04 +0200 Message-ID: <87edvl6vbj.fsf@gmail.com> References: <84v8qgn1z9.fsf@iki.fi> <87h71zo3p8.fsf@posteo.net> <87sfljmgwz.fsf@posteo.net> <87y1twvima.fsf@posteo.net> <84sfk2p846.fsf@iki.fi> <87h70i9ntt.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5463"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 57400@debbugs.gnu.org, Antoine Kalmbach To: Philip Kaludercic Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 06 13:38:56 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1ogPDM-0001CL-GV for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 06 Oct 2022 13:38:56 +0200 Original-Received: from localhost ([::1]:33332 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ogPDK-0003mp-Th for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 06 Oct 2022 07:38:54 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51034) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogP8f-0001zB-AY for bug-gnu-emacs@gnu.org; Thu, 06 Oct 2022 07:34:09 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60059) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ogP8c-0000Gm-02 for bug-gnu-emacs@gnu.org; Thu, 06 Oct 2022 07:34:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ogP8b-0003Xv-Rl for bug-gnu-emacs@gnu.org; Thu, 06 Oct 2022 07:34:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 06 Oct 2022 11:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57400 X-GNU-PR-Package: emacs Original-Received: via spool by 57400-submit@debbugs.gnu.org id=B57400.166505599513575 (code B ref 57400); Thu, 06 Oct 2022 11:34:01 +0000 Original-Received: (at 57400) by debbugs.gnu.org; 6 Oct 2022 11:33:15 +0000 Original-Received: from localhost ([127.0.0.1]:59137 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ogP7r-0003Ws-7L for submit@debbugs.gnu.org; Thu, 06 Oct 2022 07:33:15 -0400 Original-Received: from mail-wm1-f48.google.com ([209.85.128.48]:45656) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ogP7o-0003Wc-Sh for 57400@debbugs.gnu.org; Thu, 06 Oct 2022 07:33:13 -0400 Original-Received: by mail-wm1-f48.google.com with SMTP id y23-20020a1c4b17000000b003bd336914f9so730849wma.4 for <57400@debbugs.gnu.org>; Thu, 06 Oct 2022 04:33:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=biv6/O8iwd1dGYs5Z+M8hUBBFwMtg4/yxohYzzQgAdg=; b=Qun8YJZA69tdRSxLBjw9xrgMKUQrPwZZ4aPBA11guqqHcr/uo7T81aFgQTETDYYII0 hyfY8X6ZBTHqFDBOTo4ucOfE1Lw/D87lrsJTEwdNUZ60wXjQPJJbXSgI7Z68NjgyeV2D ZgNJna1x/btKxQx1GKtqAi3eeYmDm0Jhh+z1ZSmkcLKA19kcoebKZYftNxOwl/f/AE2P nkPjG0ETQnQDyAcKfNMYAtfwSCxDNVPGlARhja50LTKFpTu7OklVpcuHSn4jNL7ECL/g 6SNi28X1gREIC49uQ1MHeKaqnP1jWp7c4QOnwsopJ2BWIMPY+rltVYxoZ9yYGURIdPJJ /Z/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=biv6/O8iwd1dGYs5Z+M8hUBBFwMtg4/yxohYzzQgAdg=; b=otycTHljAPX0mHjhJbzku3A6noRkPPxw9k4ceGXsYeskq/Q5a4xyPkXqBAhkxpbK3d DxoNoqWBs5njgB/BT+8ZSQSbqbCFzMQ+EiDULI9/XDjbKtwWK9bqrHPrUhX4WeCIPFgl gXtw1CUyUHABEVjee1ZEvwDFfSKRdxpIOl1rXUbtOZ5ytaOTK/dQVVcXHRDZiAx610ST 0a2QaM9ab/dGCn4JeyJyfbfuIlTDBF/69seSVzDh1kNh3FfstlqmoUrmE6aVMmXp3qu4 h3zUUa2dkXG5gGGrWE3h2wb4klLdscn+ngsQ+PYf9Cws7QfMB8VYl1JaMUp9c0+2I5OR PIUw== X-Gm-Message-State: ACrzQf0+Q1mCA+LmuuhncoPUYaWRrhbSrcYQ/kDUJjPxYw8FnoVPWdg4 6omuoUZN4t4FPpJ9+ZazmQxfLd5+a+I= X-Google-Smtp-Source: AMsMyM4TPoujuH1O0Yj6/lxyVwKfJh1bQJM45pEuQM1PqQOJILZKRhwqQ4COaXUBBQ6T80Iy45kB9w== X-Received: by 2002:a05:600c:1e24:b0:3b4:6c1e:8bb7 with SMTP id ay36-20020a05600c1e2400b003b46c1e8bb7mr2965165wmb.1.1665055986394; Thu, 06 Oct 2022 04:33:06 -0700 (PDT) Original-Received: from rltb ([2a01:e0a:3f3:fb50:912:1b38:fb01:987c]) by smtp.gmail.com with ESMTPSA id f2-20020a0560001b0200b00223b8168b15sm6823926wrz.66.2022.10.06.04.33.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Oct 2022 04:33:05 -0700 (PDT) In-Reply-To: <87h70i9ntt.fsf@posteo.net> (Philip Kaludercic's message of "Wed, 05 Oct 2022 17:34:22 +0000") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:244641 Archived-At: >>>>> On Wed, 05 Oct 2022 17:34:22 +0000, Philip Kaludercic said: Philip> +@code{vc-prepare-patch} command. This will prompt you which r= evisions Philip> +you wish to share and who the addressee is. The command will = then use Philip> +your @abbr{MUA, Mail User Agent} for you to review and send ou= t. Philip> + How about --begin-- This will prompt you for the revisions you wish to share, and which destination email address(es) to use. The command will then prepare those revisions using your @abbr{MUA, Mail User Agent} for you to review and send. --end-- The semantics is 'one-or-more addresses', right? Philip> +@vindex vc-prepare-patches-inline Philip> +Depending on configuration of the user option "Depending on the value of the user option" Philip> +@code{vc-prepare-patches-inline}, @code{vc-prepare-patch} will= either Philip> +generate a single or multiple messages. A @code{nil} value (t= he default) Philip> +will prepare and display a message for each revision, one after Philip> +another. A non-@code{nil} value will have all patches attache= d to the Philip> +body of a single message. Philip> + --begin-- @code{vc-prepare-patches-inline}, @code{vc-prepare-patch} will generate one or more messages. The default value @code{nil} means prepare and display a message for each revision, one after another. A non-@code{nil} value means to generate a single message with all patches attached in the body. --end-- Philip> +@vindex vc-default-patch-addressee Philip> +If you expect to contribute patches on a regular basis, you ca= n set Philip> +the user option @code{vc-default-patch-addressee} to the addre= ss you Philip> +wish to use. This will be used as the default value when invo= king Philip> +@code{vc-prepare-patch}. Project maintainers may consider set= ting Philip> +this as a directory local variable (@pxref{Directory Variables= }). Philip> + This can contain multiple addresses, I think, in which case it should say so. =20 Philip> +** Subr-x Philip> + Philip> +--- Philip> +*** New macro 'with-funcall-substitutions'. Philip> +The macro can be used to generically substitute function symbo= ls in Philip> +expressions. Philip> + Philip> ** Ansi-color That sounds interesting, but I don=CA=BCt see it in the patch :-) =20 Philip> +(defcustom vc-prepare-patches-inline nil Philip> + "Non-nil means that `vc-prepare-patch' creates a single Philip> message. "Whether `vc-prepare-patch' attaches all revision in a single message." I=CA=BCm not sure this should have the suffix '-inline', because you can have inline attachments and attached attachments, but it=CA=BCs not a big deal. I also wonder about the default. Creating 100 mail buffers by accident is harder to recover from than a single one with 100 attachments, but I guess experience will inform us. Philip> +A single message is created by attaching all patches to the bo= dy Philip> +of a single message. If nil, each patch will be sent out in a Philip> +separate message, which will be prepared sequentially." Philip> + :type 'boolean Philip> + :safe #'booleanp Philip> + :version "29.1") Philip> + (I didn=CA=BCt check, can this do the [PATCH n/m] stuff with the subject that 'git format-patch' can do?) Philip> +(defcustom vc-default-patch-addressee nil Philip> + "Default addressee for `vc-prepare-patch'. Philip> +If nil, no default will be used. This option may be set local= ly." Philip> + :type '(choice (const :tag "No default" nil) string) Philip> + :safe #'stringp Philip> + :version "29.1") Philip> + Again, I think this can be multiple addresses. Either as a string with commas or as a list of strings perhaps?=20 Philip> +;;;###autoload Philip> +(defun vc-prepare-patch (addressee subject revisions) Philip> + "Compose an Email sending patches for REVISIONS to ADDRESSEE. Philip> +If `vc-prepare-patches-inline' is non-nil, SUBJECT will be used Philip> +as the default subject for the message. Otherwise a separate Philip> +message will be composed for each revision. Philip> + ? What does `vc-prepare-patches-inline' have to do with the SUBJECT? Philip> It includes Philip> - some documentation for the Emacs manual and etc/NEWS, Philip> - a revised "prepare-patch" interface that uses buffers instead= of Philip> temporary files (I hope this improves the encoding issue), If it=CA=BCs all buffers now then I think you need to update this comment: +;; +;; - prepare-patch (rev) +;; +;; Prepare a patch and return a property list with the keys +;; `:subject' indicating the patch message as a string, `:body' +;; containing the contents of the patch as a string (excluding the +;; header) and `:filename' pointing to a file where the patch has +;; been stored. I have no firm opinion on if there should be a default binding nor what it should be =F0=9F=98=BA Thanks for this, it will be useful Robert --=20