all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Luis Henriques <henrix@camandro.org>
To: emacs-devel@gnu.org
Subject: Gnus: fix article to always display git diffs properly
Date: Wed, 10 Jul 2024 15:37:45 +0100	[thread overview]
Message-ID: <87v81dmhxi.fsf@orpheu.olymp> (raw)

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)



             reply	other threads:[~2024-07-10 14:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-10 14:37 Luis Henriques [this message]
2024-07-10 21:55 ` Gnus: fix article to always display git diffs properly Andrea Corallo
2024-07-11  8:14   ` Luis Henriques

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87v81dmhxi.fsf@orpheu.olymp \
    --to=henrix@camandro.org \
    --cc=emacs-devel@gnu.org \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.