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 09:51:16 +0300 Organization: LINKOV.NET Message-ID: <86ikxb3xy3.fsf@mail.linkov.net> References: <87h6cwm86n.fsf@orpheu.olymp> <877cdshwyk.fsf@gmail.com> <87cynkm0q8.fsf@orpheu.olymp> <87msmnnmoe.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2064"; 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: Luis Henriques , 72059@debbugs.gnu.org, Robert Pluim To: =?UTF-8?Q?K=C3=A9vin?= Le Gouguec Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 12 08:54:21 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 1sSAAe-0000PG-8X for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 12 Jul 2024 08:54:20 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sSAAP-0001sn-Pf; Fri, 12 Jul 2024 02:54:05 -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 1sSAAN-0001sa-Kk for bug-gnu-emacs@gnu.org; Fri, 12 Jul 2024 02:54:03 -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 1sSAAN-00009A-Bu for bug-gnu-emacs@gnu.org; Fri, 12 Jul 2024 02:54:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sSAAM-0001xr-F5 for bug-gnu-emacs@gnu.org; Fri, 12 Jul 2024 02:54:02 -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 06:54:02 +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.17207671857484 (code B ref 72059); Fri, 12 Jul 2024 06:54:02 +0000 Original-Received: (at 72059) by debbugs.gnu.org; 12 Jul 2024 06:53:05 +0000 Original-Received: from localhost ([127.0.0.1]:53045 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sSA9Q-0001wd-TN for submit@debbugs.gnu.org; Fri, 12 Jul 2024 02:53:05 -0400 Original-Received: from relay2-d.mail.gandi.net ([217.70.183.194]:38931) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sSA9M-0001w5-RP for 72059@debbugs.gnu.org; Fri, 12 Jul 2024 02:53:03 -0400 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 2558D40002; Fri, 12 Jul 2024 06:52:31 +0000 (UTC) In-Reply-To: <87msmnnmoe.fsf@gmail.com> ("=?UTF-8?Q?K=C3=A9vin?= Le Gouguec"'s message of "Fri, 12 Jul 2024 08:34:25 +0200") 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:288761 Archived-At: > +(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.