From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Luis Henriques Newsgroups: gmane.emacs.devel Subject: Gnus: fix article to always display git diffs properly Date: Wed, 10 Jul 2024 15:37:45 +0100 Message-ID: <87v81dmhxi.fsf@orpheu.olymp> 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="32873"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jul 10 16:46:45 2024 Return-path: Envelope-to: ged-emacs-devel@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 1sRYai-0008Ll-Qq for ged-emacs-devel@m.gmane-mx.org; Wed, 10 Jul 2024 16:46:44 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sRYZu-0007Eh-RI; Wed, 10 Jul 2024 10:45:54 -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 1sRYSE-0008KU-GU for emacs-devel@gnu.org; Wed, 10 Jul 2024 10:37:58 -0400 Original-Received: from mout-p-202.mailbox.org ([80.241.56.172]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1sRYSC-0008OS-OD for emacs-devel@gnu.org; Wed, 10 Jul 2024 10:37:58 -0400 Original-Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4WK0nm55hrz9sWF for ; Wed, 10 Jul 2024 16:37:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=camandro.org; s=MBO0001; t=1720622268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NvmOOLRDpzSGWjtPOAeDhmR4kAELPHawpsETelHpiQc=; b=hRz29l6zmXNhvvNo1Zb7gieBd7P0z54p8Oy/y/Y0Me04qkpr9z56MY4YWaNKEOJ1mX0kBV Ag05svkk+/rQsAGrMxm2A1n8C6xcO7d/pi0TJcfiQxvzd8BCDGE5HilmeYewqnQZ3Z1Vk6 BM/XzuzqM8LkTocJvVoGkAaU+6QlrUdKUcDCTF6nb0VN1B1krZ8RWqXyyf4Udbw8rNwAG8 G9UBg275TRkP1olJfO3tkquxoNmC/4zx8snXsDnDft/NPs5HpzSNzLFp/sxPH/ibrRUVhw 9n8o24sqLA0nvGY913b0qgCMeVzoXj2Gfdfbm95gZav2N0CEedzpuYYhqseZ6A== X-Rspamd-Queue-Id: 4WK0nm55hrz9sWF Received-SPF: pass client-ip=80.241.56.172; envelope-from=henrix@camandro.org; helo=mout-p-202.mailbox.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Wed, 10 Jul 2024 10:45:50 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:321578 Archived-At: 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 teste= d, 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, --=20 Lu=C3=ADs 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)