From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.bugs Subject: bug#66450: 29.1; Debbugs/Gnus sometimes corrupt git formatted patches Date: Wed, 11 Oct 2023 13:37:44 -0700 Message-ID: <87a5sovqsn.fsf@ericabrahamsen.net> References: <87y1gafi0n.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40409"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 66450@debbugs.gnu.org, Bruno Victal To: Maxim Cournoyer Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 11 22:39:08 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qqfz1-000AFo-Dr for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 11 Oct 2023 22:39:07 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqfyd-00050U-Rc; Wed, 11 Oct 2023 16:38:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qqfya-000500-Mx for bug-gnu-emacs@gnu.org; Wed, 11 Oct 2023 16:38:41 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qqfya-0003hv-5x for bug-gnu-emacs@gnu.org; Wed, 11 Oct 2023 16:38:40 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qqfyv-0005ir-RX for bug-gnu-emacs@gnu.org; Wed, 11 Oct 2023 16:39:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eric Abrahamsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 11 Oct 2023 20:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66450 X-GNU-PR-Package: emacs Original-Received: via spool by 66450-submit@debbugs.gnu.org id=B66450.169705670121928 (code B ref 66450); Wed, 11 Oct 2023 20:39:01 +0000 Original-Received: (at 66450) by debbugs.gnu.org; 11 Oct 2023 20:38:21 +0000 Original-Received: from localhost ([127.0.0.1]:40133 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qqfyG-0005hc-FV for submit@debbugs.gnu.org; Wed, 11 Oct 2023 16:38:20 -0400 Original-Received: from mail.ericabrahamsen.net ([52.70.2.18]:44204) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qqfyB-0005hE-Eu for 66450@debbugs.gnu.org; Wed, 11 Oct 2023 16:38:19 -0400 Original-Received: from localhost (71-212-21-65.tukw.qwest.net [71.212.21.65]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 3A05CFA151; Wed, 11 Oct 2023 20:37:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net; s=mail; t=1697056666; bh=ylVWmCnMzrlY9SXDMJxbRk+nF8tW96YLC67GCiBuL+w=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=GfLmLufFiCDEBV88EoozmFJnJ/UKiVKGkqFXvFjuyD4XMQ7DX9Bm6Q31Rcx7FHQgO Eao/O1KXwMQMMRj+j237IWrDQJmSYwxWzKEWMwvis+VLswy5axu7ONnkjhMLW/fbiF WpAhOJPF8fMu6s/CB8Y7vRBjYxWZYLEuCJ8fLBOg= In-Reply-To: <87y1gafi0n.fsf@gmail.com> (Maxim Cournoyer's message of "Tue, 10 Oct 2023 14:29:28 -0400") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:272270 Archived-At: Maxim Cournoyer 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/g= uix.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=E2=84=A2 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