From: Juri Linkov Date: Fri, 12 Jul 2024 17:54:53 +0000 (+0300) Subject: * lisp/gnus/mm-uu.el (mm-uu-type-alist): Fix end-regexp of git-format-patch. X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=977ed3d30f3447777360a6426cbb191334a39ec3;p=emacs.git * lisp/gnus/mm-uu.el (mm-uu-type-alist): Fix end-regexp of git-format-patch. Replace git-format-patch end-regexp "^-- " with "^$". The regexp "^-- " was intended to mark the end of the git-formatted patch. However, git-format-patch can produce patches without a signature. Also often patches are just copy-pasted from the output of 'C-x v d'. Therefore, now an empty line marks the end of the patch since properly formatted patches don't contain an empty line and properly configured MUAs don't strip whitespace from patches. Suggested by Luis Henriques and Kévin Le Gouguec in bug#72059. (cherry picked from commit 900f135b68b4e9830eac5d7500b3175f160f6c34) --- diff --git a/lisp/gnus/mm-uu.el b/lisp/gnus/mm-uu.el index 3c7e3cbdf1a..26b2c03a3dc 100644 --- a/lisp/gnus/mm-uu.el +++ b/lisp/gnus/mm-uu.el @@ -173,7 +173,7 @@ This can be either \"inline\" or \"attachment\".") ,#'mm-uu-diff-test) (git-format-patch "^diff --git " - "^-- " + "^$" ,#'mm-uu-diff-extract nil ,#'mm-uu-diff-test)