From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitriy Blinov Newsgroups: gmane.emacs.bugs Subject: bug#1537: diff-mode for git patches trouble Date: Thu, 11 Dec 2008 16:08:59 +0300 Message-ID: <494110EB.3040600@mns.spb.ru> Reply-To: Dmitriy Blinov , 1537@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1229008158 14006 80.91.229.12 (11 Dec 2008 15:09:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 11 Dec 2008 15:09:18 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Dec 11 16:10:22 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LAnAf-0000oV-CQ for geb-bug-gnu-emacs@m.gmane.org; Thu, 11 Dec 2008 16:09:45 +0100 Original-Received: from localhost ([127.0.0.1]:60010 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LAn9T-0000Tc-PI for geb-bug-gnu-emacs@m.gmane.org; Thu, 11 Dec 2008 10:08:31 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LAlWh-00050o-2o for bug-gnu-emacs@gnu.org; Thu, 11 Dec 2008 08:24:23 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LAlWf-0004yL-3y for bug-gnu-emacs@gnu.org; Thu, 11 Dec 2008 08:24:21 -0500 Original-Received: from [199.232.76.173] (port=45397 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LAlWe-0004xT-QH for bug-gnu-emacs@gnu.org; Thu, 11 Dec 2008 08:24:21 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:60215) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LAlWe-0005HM-91 for bug-gnu-emacs@gnu.org; Thu, 11 Dec 2008 08:24:20 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mBBDOI25022436; Thu, 11 Dec 2008 05:24:18 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id mBBDF2o2019378; Thu, 11 Dec 2008 05:15:02 -0800 X-Loop: don@donarmstrong.com Resent-From: Dmitriy Blinov Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 11 Dec 2008 13:15:02 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1537 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.122900098617588 (code B ref -1); Thu, 11 Dec 2008 13:15:02 +0000 X-Spam-Bayes: score:0.0000 Tokens: new, 16; hammy, 74; neutral, 75; spammy, 0. spammytokens: hammytokens:0.000-+--emacs, 0.000-+--diff, 0.001-+--100644, 0.001-+--append, 0.002-4--deletions Original-Received: (at submit) by emacsbugs.donarmstrong.com; 11 Dec 2008 13:09:46 +0000 Original-Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mBBD9guH017577 for ; Thu, 11 Dec 2008 05:09:44 -0800 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LAlIS-0000K4-Em for bug-gnu-emacs@gnu.org; Thu, 11 Dec 2008 08:09:41 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LAlIQ-0000J3-P1 for bug-gnu-emacs@gnu.org; Thu, 11 Dec 2008 08:09:39 -0500 Original-Received: from [199.232.76.173] (port=40071 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LAlIP-0000Ih-6k for bug-gnu-emacs@gnu.org; Thu, 11 Dec 2008 08:09:37 -0500 Original-Received: from mail.mnsspb.ru ([84.204.75.2]:39673) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LAlIO-0003LG-O7 for bug-gnu-emacs@gnu.org; Thu, 11 Dec 2008 08:09:36 -0500 Original-Received: from [192.168.0.114] by mail.mnsspb.ru with esmtps id 1LAlHc-0000lq-4d for ; Thu, 11 Dec 2008 16:08:48 +0300 User-Agent: Mozilla-Thunderbird 2.0.0.17 (X11/20081018) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Thu, 11 Dec 2008 08:24:21 -0500 X-Mailman-Approved-At: Thu, 11 Dec 2008 10:08:28 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:23172 Archived-At: There is the problem then I'm trying to edit git-generated patches in emacs diff-mode. git patches look like: --- hello.txt | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hello.txt b/hello.txt index 55bf894..25a09cc 100644 --- a/hello.txt +++ b/hello.txt @@ -6,7 +6,7 @@ 5 6 7 -8 +8 8 9 10 11 -- 1.5.6.5 The last but one line is two minuses by default. And diff-mode recognizes first minus as deleted string. Therefore when we change some strings in patch, emacs creates malformed hunk offset. It will be @@ -6,8 +6,7 @@ insead of correct @@ -6,7 +6,7 @@ after patch edition (if we don't delete/create strings). Is it possible to fix this harm or I should append whitespace before "--" string always?