From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Maxim Cournoyer Newsgroups: gmane.emacs.bugs Subject: bug#66450: 29.1; Debbugs/Gnus sometimes corrupt git formatted patches Date: Sat, 14 Oct 2023 11:22:57 -0400 Message-ID: <87edhx44a6.fsf@gmail.com> References: <87y1gafi0n.fsf@gmail.com> <87a5sovqsn.fsf@ericabrahamsen.net> 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="10230"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 66450@debbugs.gnu.org, Bruno Victal To: Eric Abrahamsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 14 17:23:55 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 1qrgUc-0002Sb-Vc for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 14 Oct 2023 17:23:55 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qrgUQ-0002w6-Ax; Sat, 14 Oct 2023 11:23:42 -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 1qrgUO-0002vk-4A for bug-gnu-emacs@gnu.org; Sat, 14 Oct 2023 11:23:40 -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 1qrgUM-0003UA-Jw for bug-gnu-emacs@gnu.org; Sat, 14 Oct 2023 11:23:39 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qrgUk-0007X1-7F for bug-gnu-emacs@gnu.org; Sat, 14 Oct 2023 11:24:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 14 Oct 2023 15:24:02 +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.169729701128911 (code B ref 66450); Sat, 14 Oct 2023 15:24:02 +0000 Original-Received: (at 66450) by debbugs.gnu.org; 14 Oct 2023 15:23:31 +0000 Original-Received: from localhost ([127.0.0.1]:50175 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qrgUF-0007WF-0U for submit@debbugs.gnu.org; Sat, 14 Oct 2023 11:23:31 -0400 Original-Received: from mail-qv1-xf30.google.com ([2607:f8b0:4864:20::f30]:55624) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qrgUC-0007Vj-Kz for 66450@debbugs.gnu.org; Sat, 14 Oct 2023 11:23:29 -0400 Original-Received: by mail-qv1-xf30.google.com with SMTP id 6a1803df08f44-66d0169cf43so19140436d6.3 for <66450@debbugs.gnu.org>; Sat, 14 Oct 2023 08:23:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697296979; x=1697901779; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=c47rCwni59HzwSbHNmVKidv+llpfBgq2sOi7G8qTJ6o=; b=T8FJrAgFlvRLGkhzHC/TDxsE7axVZA5Zmwh1qlDx4sk69i4J+W5/yhppkfmlHcCl2k PxR5spbcKrGaSuxNpfuw6ZDBevGiy/RSUiLWOyk1ldlMgN6IppmmmSxNTmQRutgjia3/ 57/ivdPpp+R8FXuDa4gxrlHbxqCR/2Pnk5vzDlugkctsThX96nHxOWoIBxj9eDRXFhMB XwqN+t1JCYwaexDFWjGe68SzrXs3yiBv6Y0jA6al0roRVaX7JVd7sVUFv4Xj7zXF1nfd 1uh5dJS8N737Uq7D0didT1/P/3YKKWwYOTMPTw0uYwX8cR3XCVKTlSYpebuEqCfJkKdy LhWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697296979; x=1697901779; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=c47rCwni59HzwSbHNmVKidv+llpfBgq2sOi7G8qTJ6o=; b=g3u+Z+odE4z9Ze3Wf34roqfmH3/KWBRRmibG8x1gD13cTze77RgRozFifVa7Ns7VKt 9/rIbqe2dK//nRHOJCyGWixH+enHrB/voQtw7xgCv/1bXEKnoj2wf1CPr/pp3YYU2/kt eD8bMu4vk+FKO1BpFj7upUUJWMERWOedlkovXqlMeQVMVFxieX36WXQ0q/o9PcqUhNCo hoePPMDVorR1vA/TW6byClP8N1VhtRgvEo/DXio2K5asnTEhmhnVo+WJsBK6LAq/r3JB +BUxVvjv+gJQmvaeH0HdiI2FFEY1moAd8PlWg18oZfOfAhblRJvFjM0TNxbr8Sdd2bQw u8Jw== X-Gm-Message-State: AOJu0Yy6ukxdyBB8/7+Zrpbv3g9PhxZsQRM7wnxVPaTsahTbsrLGvV0F OIKHf3Bqo7CO7ggSf1LyxqXTT8l4erw= X-Google-Smtp-Source: AGHT+IGKVzjLS8s4iHDdbwA7CmDTlHoK7L1faHCpWduKJd5b1fSoZKzY0ePXD4WEoZKM8kMWauIxgQ== X-Received: by 2002:a0c:e246:0:b0:630:7d0:56f4 with SMTP id x6-20020a0ce246000000b0063007d056f4mr26736423qvl.49.1697296979232; Sat, 14 Oct 2023 08:22:59 -0700 (PDT) Original-Received: from hurd (dsl-156-181.b2b2c.ca. [66.158.156.181]) by smtp.gmail.com with ESMTPSA id j12-20020a0ce00c000000b0065b1f90ff8csm1746177qvk.40.2023.10.14.08.22.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Oct 2023 08:22:58 -0700 (PDT) In-Reply-To: <87a5sovqsn.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Wed, 11 Oct 2023 13:37:44 -0700") 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:272432 Archived-At: Hi Eric! Eric Abrahamsen writes: > 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/= 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. Oh, thank you, that works. > 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. It'd be nice if that 'gnus-display-mime' procedure tried hard to *not* break 'git format-patch' messages; perhaps it could use a simple heuristic to do so. Out of the 63 patches in the series linked in the reproducer steps, only patch 10/63 was corrupted by it, so it appears to be a relatively rare occurrence. > 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. I'd also opine that the pipe command should process the raw article by default, but that's based on my sole experience with it, which nearly always involve applying 'git format-patch' patches. Maxim