From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Konstantin Kharlamov Newsgroups: gmane.emacs.bugs Subject: bug#37395: Diff-mode doesn't take into account patch-separators as produced by git-format-patch Date: Fri, 13 Sep 2019 00:33:05 +0300 Message-ID: <1568323985.28657.0@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="117430"; mail-complaints-to="usenet@blaine.gmane.org" To: 37395@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Sep 12 23:34:13 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i8WjD-000UQ0-Lk for geb-bug-gnu-emacs@m.gmane.org; Thu, 12 Sep 2019 23:34:11 +0200 Original-Received: from localhost ([::1]:38952 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i8WjB-000083-VE for geb-bug-gnu-emacs@m.gmane.org; Thu, 12 Sep 2019 17:34:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60673) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i8Wj5-00007s-KD for bug-gnu-emacs@gnu.org; Thu, 12 Sep 2019 17:34:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i8Wj4-00021k-Fg for bug-gnu-emacs@gnu.org; Thu, 12 Sep 2019 17:34:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35338) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i8Wj4-00021J-C2 for bug-gnu-emacs@gnu.org; Thu, 12 Sep 2019 17:34:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i8Wj4-0008EB-6z for bug-gnu-emacs@gnu.org; Thu, 12 Sep 2019 17:34:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Konstantin Kharlamov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 12 Sep 2019 21:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 37395 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.156832399931563 (code B ref -1); Thu, 12 Sep 2019 21:34:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 12 Sep 2019 21:33:19 +0000 Original-Received: from localhost ([127.0.0.1]:44159 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i8WiM-0008D1-Lh for submit@debbugs.gnu.org; Thu, 12 Sep 2019 17:33:18 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:38192) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i8WiL-0008Ct-5S for submit@debbugs.gnu.org; Thu, 12 Sep 2019 17:33:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60488) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i8WiJ-0008V4-NA for bug-gnu-emacs@gnu.org; Thu, 12 Sep 2019 17:33:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i8WiH-0001jp-V5 for bug-gnu-emacs@gnu.org; Thu, 12 Sep 2019 17:33:14 -0400 Original-Received: from forward105o.mail.yandex.net ([2a02:6b8:0:1a2d::608]:49288) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i8WiH-0001i2-Cw for bug-gnu-emacs@gnu.org; Thu, 12 Sep 2019 17:33:13 -0400 Original-Received: from mxback5j.mail.yandex.net (mxback5j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10e]) by forward105o.mail.yandex.net (Yandex) with ESMTP id BF6F44200A8D for ; Fri, 13 Sep 2019 00:33:06 +0300 (MSK) Original-Received: from sas2-69645cccb3fe.qloud-c.yandex.net (sas2-69645cccb3fe.qloud-c.yandex.net [2a02:6b8:c08:bd8e:0:640:6964:5ccc]) by mxback5j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id OKJzOl3gzm-X6ZGZipi; Fri, 13 Sep 2019 00:33:06 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1568323986; bh=k6mLAK66dNdOlx/TDFfi9LrWSioc7TSNaE189RF+guw=; h=To:Subject:From:Date:Message-Id; b=kvSWIoV6OubWI4IhyeJlhyBs06mxQvjof2qdHsQKXTKMH76P4XNooQBxZKQrMkOjg VTWKLE5tsL3zaV5nUQHK2iYWUz6cAtLv07pGAH/FK1ZvInIANRlS3/wD/P0ZlTIzRE RR17ALun3/g9/rjMsxMlCGZaJuS3zFmNCKd2foCI= Authentication-Results: mxback5j.mail.yandex.net; dkim=pass header.i=@yandex.ru Original-Received: by sas2-69645cccb3fe.qloud-c.yandex.net (nwsmtp/Yandex) with ESMTPSA id s33Rxrqxom-X5HmaYK9; Fri, 13 Sep 2019 00:33:06 +0300 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client certificate not present) X-Mailer: geary/3.33.90 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:166375 Archived-At: As title says. As a follow-up to this report I'm gonna send a fix to this problem. Observable result of the problem is that Emacs thinks `-- ` patch line is a "deleted line", whereas it actually is end of the patch. The follow-up patch I successfully used to edit patch-series of 12 patches to libinput https://gitlab.freedesktop.org/libinput/libinput/merge_requests/288#note_223871 # Steps to reproduce 1. In terminal, go to Emacs git repository 2. Execute `git format-patch -1 --stdout > 1.patch` 3. Open 1.patch in Emacs (diff-mode should automatically get enabled) 4. Replace at the beginning of a "deleted line" the `-` with space ` `. ## Expected The 4-digit header (which looks like `@@ -561,7 +569,8`) should have first 2 digits (561 and 7 in example) unchanged. ## Actual The 4-digit header increases count of 2nd digit (7 in example) by one.