* 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
* Re: Gnus: fix article to always display git diffs properly
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
0 siblings, 1 reply; 3+ messages in thread
From: Andrea Corallo @ 2024-07-10 21:55 UTC (permalink / raw)
To: Luis Henriques; +Cc: emacs-devel
Luis Henriques <henrix@camandro.org> writes:
> 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,
Hi Luis,
thanks, would you mind sending the patch following [1] so we can discuss
and track it into the bug tracker?
BR
Andrea
[1] <https://www.gnu.org/software/emacs/manual/html_node/emacs/Sending-Patches.html>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Gnus: fix article to always display git diffs properly
2024-07-10 21:55 ` Andrea Corallo
@ 2024-07-11 8:14 ` Luis Henriques
0 siblings, 0 replies; 3+ messages in thread
From: Luis Henriques @ 2024-07-11 8:14 UTC (permalink / raw)
To: Andrea Corallo; +Cc: emacs-devel
Hi Andrea
On Wed, Jul 10 2024, Andrea Corallo wrote:
> Luis Henriques <henrix@camandro.org> writes:
>
>> 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,
>
> Hi Luis,
>
> thanks, would you mind sending the patch following [1] so we can discuss
> and track it into the bug tracker?
Ah! yes, of course. That's exactly what I should have done in the first
place. Sorry, I'll do that later today. And thank you for your feedback.
Cheers,
--
Luís
^ permalink raw reply [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).