all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: "Kévin Le Gouguec" <kevin.legouguec@gmail.com>
Cc: Luis Henriques <henrix@camandro.org>,
	72059@debbugs.gnu.org, Robert Pluim <rpluim@gmail.com>
Subject: bug#72059: [PATCH] Ensure that git diffs without signature (--) are properly identified
Date: Fri, 12 Jul 2024 09:51:16 +0300	[thread overview]
Message-ID: <86ikxb3xy3.fsf@mail.linkov.net> (raw)
In-Reply-To: <87msmnnmoe.fsf@gmail.com> ("Kévin Le Gouguec"'s message of "Fri, 12 Jul 2024 08:34:25 +0200")

>   +(with-eval-after-load 'mm-uu
>   +  (setf (nth 1 (alist-get 'git-format-patch mm-uu-type-alist))
>   +        "^-- \\|^$"))

Indeed, this is the right thing to do.  In the past
few days I have seen more patches without attachments
that makes hard to read them without fontification.
So such change could help to greatly improve readability.
However, often there is also text after the patch,
so nil for 'end-point' doesn't look right.  So better
to end the patch with an empty line, because properly
formatted patches have no empty lines in them.

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 @@ mm-uu-type-alist
      ,#'mm-uu-diff-test)
     (git-format-patch
      "^diff --git "
-     "^-- "
+     "^$"
      ,#'mm-uu-diff-extract
      nil
      ,#'mm-uu-diff-test)

+ PS: the patch above should end before this line.
- I tested it on a few posts, and everything looks correct.





  reply	other threads:[~2024-07-12  6:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-11 12:20 bug#72059: [PATCH] Ensure that git diffs without signature (--) are properly identified Luis Henriques
2024-07-11 13:36 ` Robert Pluim
2024-07-11 15:01   ` Luis Henriques
2024-07-12  6:34     ` Kévin Le Gouguec
2024-07-12  6:51       ` Juri Linkov [this message]
2024-07-12  8:28         ` Robert Pluim
2024-07-12  8:53         ` Luís Henriques
2024-07-12 17:55           ` Juri Linkov
2024-07-11 13:57 ` Eli Zaretskii

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=86ikxb3xy3.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=72059@debbugs.gnu.org \
    --cc=henrix@camandro.org \
    --cc=kevin.legouguec@gmail.com \
    --cc=rpluim@gmail.com \
    /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.