unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Gnus: fix article to always display git diffs properly
@ 2024-07-10 14:37 Luis Henriques
  2024-07-10 21:55 ` Andrea Corallo
  0 siblings, 1 reply; 3+ messages in thread
From: Luis Henriques @ 2024-07-10 14:37 UTC (permalink / raw)
  To: emacs-devel

Hi!

It's been a while since I realised that some emails containing inline
patches generated with git aren't actually recognised as such in Gnus.
And today I finally decided to figure out why.  Basically, it's because it
is assumed that those patches will end with a signature -- and that's not
always true.

Below there's a one-liner that seems to fix it -- it's not thoroughly tested,
but nothing seems to break.  Note that the other diff elements don't have
an 'end-point' either.  Would this change be acceptable?

(And also note that the patch does *not* have a signature at the end!)

Cheers,
-- 
Luís

diff --git a/lisp/gnus/mm-uu.el b/lisp/gnus/mm-uu.el
index 3c7e3cbdf1af..f5d553bd0892 100644
--- a/lisp/gnus/mm-uu.el
+++ b/lisp/gnus/mm-uu.el
@@ -173,7 +173,7 @@ mm-uu-type-alist
      ,#'mm-uu-diff-test)
     (git-format-patch
      "^diff --git "
-     "^-- "
+     nil
      ,#'mm-uu-diff-extract
      nil
      ,#'mm-uu-diff-test)



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-07-11  8:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-10 14:37 Gnus: fix article to always display git diffs properly Luis Henriques
2024-07-10 21:55 ` Andrea Corallo
2024-07-11  8:14   ` Luis Henriques

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).