From b5ebade3a48dc0ce0c85699f25800808233c73be Mon Sep 17 00:00:00 2001 From: Xinglu Chen Date: Thu, 24 Jun 2021 12:13:35 +0200 Subject: git-email: Add function for matching git-email buffers. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A user might have buffers with unsent messages that were not generated by git-email, previously, invoking ‘git-email-send-all’ would unconditionally send all of those messages. By using a predicate, we make sure to only send messages generated by git-email. * git-email.el (git-email-buffer-p-function): New defcustom. (git-email-buffer-p): New function. (git-email-send-all): Use it. * doc/git-email.texi (Miscellaneous): Document it. Signed-off-by: Xinglu Chen --- doc/git-email.texi | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc') diff --git a/doc/git-email.texi b/doc/git-email.texi index f290878..09db2b1 100644 --- a/doc/git-email.texi +++ b/doc/git-email.texi @@ -304,6 +304,15 @@ trailing @samp{/}. names are generated. See the documentation for @code{message-generate-new-buffers} for more information. +@vindex git-email-buffer-p-function +@item +If you have changed the default value of +@code{git-email-generate-message-buffer}, you probably also want to +change the value of @code{git-email-buffer-p-function}. It should be a +function that takes one argument---the name of a buffer, and returns +@code{t} if the buffer contains an unsent patch generated using +@samp{git-email}. + By default the name will have the following format @samp{git-email unsent patch to *** TO ADDRESS HERE *** *}. @end itemize -- cgit v1.2.3