From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#72059: [PATCH] Ensure that git diffs without signature (--) are properly identified Date: Fri, 12 Jul 2024 20:55:31 +0300 Organization: LINKOV.NET Message-ID: <86cynilcks.fsf@mail.linkov.net> References: <87h6cwm86n.fsf@orpheu.olymp> <877cdshwyk.fsf@gmail.com> <87cynkm0q8.fsf@orpheu.olymp> <87msmnnmoe.fsf@gmail.com> <86ikxb3xy3.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37394"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) Cc: 72059@debbugs.gnu.org, Robert Pluim , =?UTF-8?Q?K=C3=A9vin?= Le Gouguec To: =?UTF-8?Q?Lu=C3=ADs?= Henriques Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 12 19:58:34 2024 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 1sSKXR-0009bH-GL for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 12 Jul 2024 19:58:33 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sSKWy-0005iT-OH; Fri, 12 Jul 2024 13:58:04 -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 1sSKWw-0005i3-LQ for bug-gnu-emacs@gnu.org; Fri, 12 Jul 2024 13:58:02 -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 1sSKWw-0000RK-Bu for bug-gnu-emacs@gnu.org; Fri, 12 Jul 2024 13:58:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sSKWv-0008Rd-PK for bug-gnu-emacs@gnu.org; Fri, 12 Jul 2024 13:58:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 12 Jul 2024 17:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72059 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 72059-submit@debbugs.gnu.org id=B72059.172080705032403 (code B ref 72059); Fri, 12 Jul 2024 17:58:01 +0000 Original-Received: (at 72059) by debbugs.gnu.org; 12 Jul 2024 17:57:30 +0000 Original-Received: from localhost ([127.0.0.1]:54759 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sSKWP-0008QY-N7 for submit@debbugs.gnu.org; Fri, 12 Jul 2024 13:57:29 -0400 Original-Received: from relay1-d.mail.gandi.net ([217.70.183.193]:51671) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sSKWL-0008QD-EL; Fri, 12 Jul 2024 13:57:29 -0400 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 44904240002; Fri, 12 Jul 2024 17:57:16 +0000 (UTC) In-Reply-To: ("=?UTF-8?Q?Lu=C3=ADs?= Henriques"'s message of "Fri, 12 Jul 2024 09:53:38 +0100") X-GND-Sasl: juri@linkov.net 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:288780 Archived-At: close 72059 31.0.50 thanks >> > +(with-eval-after-load 'mm-uu >> > + (setf (nth 1 (alist-get 'git-format-patch mm-uu-type-alist)) >> > + "^-- \\|^$")) >> >> Indeed, this is the right thing to do. In the past >> few days I have seen more patches without attachments >> that makes hard to read them without fontification. >> So such change could help to greatly improve readability. >> However, often there is also text after the patch, >> so nil for 'end-point' doesn't look right. So better >> to end the patch with an empty line, because properly >> formatted patches have no empty lines in them. >> >> diff --git a/lisp/gnus/mm-uu.el b/lisp/gnus/mm-uu.el >> index 3c7e3cbdf1a..26b2c03a3dc 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 " >> - "^-- " >> + "^$" >> ,#'mm-uu-diff-extract >> nil >> ,#'mm-uu-diff-test) >> >> + PS: the patch above should end before this line. >> - I tested it on a few posts, and everything looks correct. > > Ah! Nice, this indeed looks better than my proposal. Thanks! Hopefully > this will be acceptable for merging. Thanks for the request! So now this is pushed to master.