bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#66450: 29.1; Debbugs/Gnus sometimes corrupt git formatted patches


From: Eric Abrahamsen
Subject: bug#66450: 29.1; Debbugs/Gnus sometimes corrupt git formatted patches
Date: Wed, 11 Oct 2023 13:37:44 -0700
User-agent: Gnus/5.13 (Gnus v5.13)

Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

> Hello,
>
> While working via Emacs Debbugs, I noticed that applying a patch would
> fail, and that this only occurred when fetching and saving the patch via
> Debbugs/Gnus.  Below is a reproducer:
>
> 1. mkdir -p src && cd src && git clone 
> https://git.savannah.gnu.org/git/guix.git
> 2. cd guix && git checkout core-updates
> 3. in emacs: M-x debbugs-gnu-bugs RET 65479 RET
> 4. Navigate to the message with [PATCH core-updates v3 10/63] in its
> subject

This took way too long to figure out...

TL;DR is: run "M-i r" before the "|" command.

Gnus is treating the article with the `gnus-display-mime' treatment
function, which ends up inserting newlines between detected MIME parts,
in order to look "nice". It's not necessary to save the article to see
this: the newlines are present if you just open Bruno's message and look
at it. If you run `gnus-summary-show-raw-article', you'll see the
original raw article with no newlines.

The problem is that the Gnus summary "save-article" commands operate on
the treated article, not the raw article.

BUT! Someoneā„¢ anticipated that this would be an issue, and for
`gnus-summary-pipe-output' in particular provided a "symbolic prefix"
option for this command, a mechanism specific to Gnus that I'll wager
very few are aware of. It lets you specify that the raw article should
be piped instead of the treated article, by using "M-i" (to initiate the
symbolic prefix), then "r" (the prefix itself).

It's actually documented in the manual, though the fact that neither of
us looked makes that feel a bit useless. It's also weird that only this
pipe command has the option of operating on the raw article; you'd think
that would be a useful option for the other article-saving commands, and
you'd also think maybe this should be the default for the pipe command.

Anyway, see if that works,
Eric





reply via email to

[Prev in Thread] Current Thread [Next in Thread]