From: Robert Pluim <rpluim@gmail.com>
To: Philip Kaludercic <philipk@posteo.net>
Cc: 57400@debbugs.gnu.org, Antoine Kalmbach <ane@iki.fi>
Subject: bug#57400: 29.0.50; Support sending patches from VC directly
Date: Thu, 06 Oct 2022 13:33:04 +0200 [thread overview]
Message-ID: <87edvl6vbj.fsf@gmail.com> (raw)
In-Reply-To: <87h70i9ntt.fsf@posteo.net> (Philip Kaludercic's message of "Wed, 05 Oct 2022 17:34:22 +0000")
>>>>> On Wed, 05 Oct 2022 17:34:22 +0000, Philip Kaludercic <philipk@posteo.net> said:
Philip> +@code{vc-prepare-patch} command. This will prompt you which revisions
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 out.
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 (the default)
Philip> +will prepare and display a message for each revision, one after
Philip> +another. A non-@code{nil} value will have all patches attached 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 can set
Philip> +the user option @code{vc-default-patch-addressee} to the address you
Philip> +wish to use. This will be used as the default value when invoking
Philip> +@code{vc-prepare-patch}. Project maintainers may consider setting
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.
Philip> +** Subr-x
Philip> +
Philip> +---
Philip> +*** New macro 'with-funcall-substitutions'.
Philip> +The macro can be used to generically substitute function symbols in
Philip> +expressions.
Philip> +
Philip> ** Ansi-color
That sounds interesting, but I donʼt see it in the patch :-)
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ʼm not sure this should have the suffix '-inline', because you can
have inline attachments and attached attachments, but itʼs 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 body
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ʼt 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 locally."
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?
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ʼs 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 😺
Thanks for this, it will be useful
Robert
--
next prev parent reply other threads:[~2022-10-06 11:33 UTC|newest]
Thread overview: 117+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-25 8:47 bug#57400: 29.0.50; Support sending patches from VC directly Antoine Kalmbach
2022-08-26 7:37 ` Philip Kaludercic
2022-08-26 10:15 ` Antoine Kalmbach
2022-08-26 10:35 ` Philip Kaludercic
2022-08-26 10:45 ` Antoine Kalmbach
2022-08-26 10:58 ` Eli Zaretskii
2022-08-26 11:26 ` Philip Kaludercic
2022-08-26 11:44 ` Eli Zaretskii
2022-08-26 12:05 ` Philip Kaludercic
2022-08-26 12:26 ` Eli Zaretskii
2022-08-26 13:10 ` Antoine Kalmbach
2022-08-26 13:17 ` Eli Zaretskii
2022-08-26 13:29 ` Philip Kaludercic
2022-08-26 14:21 ` Eli Zaretskii
2022-08-27 8:21 ` Philip Kaludercic
2022-08-27 9:21 ` Eli Zaretskii
2022-08-27 9:30 ` Philip Kaludercic
2022-08-26 12:08 ` Antoine Kalmbach
2022-08-26 12:28 ` Eli Zaretskii
2022-08-28 4:07 ` Richard Stallman
2022-10-03 18:59 ` Philip Kaludercic
2022-10-03 19:06 ` Lars Ingebrigtsen
2022-10-03 19:23 ` Eli Zaretskii
2022-10-04 19:19 ` Philip Kaludercic
2022-10-04 19:33 ` Eli Zaretskii
2022-10-03 21:22 ` Philip Kaludercic
2022-10-03 21:55 ` Philip Kaludercic
2022-10-03 23:32 ` Lars Ingebrigtsen
2022-10-04 6:46 ` Eli Zaretskii
2022-10-04 6:41 ` Eli Zaretskii
2022-10-04 7:10 ` Philip Kaludercic
2022-10-04 8:00 ` Eli Zaretskii
2022-10-04 10:40 ` Philip Kaludercic
2022-10-04 10:42 ` Philip Kaludercic
2022-10-04 12:25 ` Eli Zaretskii
2022-10-04 12:24 ` Eli Zaretskii
2022-10-04 18:08 ` Philip Kaludercic
2022-10-05 16:07 ` Antoine Kalmbach
2022-10-05 17:34 ` Philip Kaludercic
2022-10-05 17:48 ` Philip Kaludercic
2022-10-05 18:32 ` Lars Ingebrigtsen
2022-10-05 18:46 ` Philip Kaludercic
2022-10-05 19:08 ` Lars Ingebrigtsen
2022-10-06 8:21 ` Robert Pluim
2022-10-06 8:35 ` Philip Kaludercic
2022-10-06 8:59 ` Robert Pluim
2022-10-06 9:12 ` Philip Kaludercic
2022-10-06 11:02 ` Philip Kaludercic
2022-10-05 19:57 ` Juri Linkov
2022-10-06 12:03 ` Lars Ingebrigtsen
2022-10-07 22:48 ` Richard Stallman
2022-10-10 14:39 ` Filipp Gunbin
2022-10-10 18:58 ` Juri Linkov
2022-10-11 0:27 ` Lars Ingebrigtsen
2022-10-11 0:26 ` Lars Ingebrigtsen
2022-10-05 18:17 ` Eli Zaretskii
2022-10-05 18:45 ` Philip Kaludercic
2022-10-06 9:14 ` Philip Kaludercic
2022-10-06 9:19 ` Eli Zaretskii
2022-10-06 22:22 ` Dmitry Gutov
2022-10-07 6:36 ` Eli Zaretskii
2022-10-07 12:06 ` Dmitry Gutov
2022-10-06 11:33 ` Robert Pluim [this message]
2022-10-06 12:38 ` Philip Kaludercic
2022-10-06 12:58 ` Robert Pluim
2022-10-06 14:37 ` Philip Kaludercic
2022-10-06 14:43 ` Robert Pluim
2022-10-06 15:54 ` Eli Zaretskii
2022-10-06 16:27 ` Philip Kaludercic
2022-10-07 7:58 ` Juri Linkov
2022-10-07 11:42 ` Philip Kaludercic
2022-10-08 10:03 ` Philip Kaludercic
2022-10-08 19:34 ` Juri Linkov
2022-10-09 12:15 ` Philip Kaludercic
2022-10-10 19:03 ` Juri Linkov
2022-10-11 12:44 ` Philip Kaludercic
2022-10-11 13:58 ` Robert Pluim
2022-10-15 18:54 ` Juri Linkov
2022-10-16 9:40 ` Philip Kaludercic
2022-10-11 19:30 ` Philip Kaludercic
2022-10-11 19:47 ` Juri Linkov
2022-10-11 19:49 ` Philip Kaludercic
2022-10-12 22:01 ` Richard Stallman
2022-10-13 7:04 ` Juri Linkov
2022-10-13 21:12 ` Richard Stallman
2022-10-15 19:02 ` Juri Linkov
2022-10-13 8:55 ` Philip Kaludercic
2022-10-13 17:30 ` Juri Linkov
2022-10-13 19:44 ` Philip Kaludercic
2022-10-13 20:25 ` Philip Kaludercic
2022-10-13 20:33 ` Eli Zaretskii
2022-10-13 22:05 ` Philip Kaludercic
2022-10-14 6:50 ` Eli Zaretskii
2022-10-14 21:28 ` Richard Stallman
2022-10-14 21:47 ` Philip Kaludercic
2022-10-15 6:57 ` Eli Zaretskii
2022-10-15 11:44 ` Philip Kaludercic
2022-10-15 12:20 ` Eli Zaretskii
2022-10-15 15:15 ` Philip Kaludercic
2022-10-15 15:16 ` Eli Zaretskii
2022-10-15 15:24 ` Philip Kaludercic
2022-10-10 22:01 ` Richard Stallman
2022-10-11 5:37 ` Eli Zaretskii
2022-10-12 21:59 ` Richard Stallman
2022-10-06 22:10 ` Dmitry Gutov
2022-10-07 8:03 ` Philip Kaludercic
2022-10-07 12:56 ` Dmitry Gutov
2022-10-07 15:30 ` Philip Kaludercic
2022-10-07 15:47 ` Dmitry Gutov
2022-10-07 15:54 ` Philip Kaludercic
2022-10-08 22:34 ` Richard Stallman
2022-10-08 12:11 ` Philip Kaludercic
2022-10-08 12:44 ` German Pacenza
2022-10-08 13:02 ` Philip Kaludercic
2022-10-08 13:07 ` Dmitry Gutov
2022-10-08 13:42 ` Philip Kaludercic
2022-10-08 14:02 ` Dmitry Gutov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87edvl6vbj.fsf@gmail.com \
--to=rpluim@gmail.com \
--cc=57400@debbugs.gnu.org \
--cc=ane@iki.fi \
--cc=philipk@posteo.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).