From unknown Mon Aug 18 11:16:17 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25524: 26.0.50; diff-mode is broken Resent-From: Dima Kogan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Jan 2017 06:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 25524 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 25524@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.148532654917838 (code B ref -1); Wed, 25 Jan 2017 06:43:01 +0000 Received: (at submit) by debbugs.gnu.org; 25 Jan 2017 06:42:29 +0000 Received: from localhost ([127.0.0.1]:41412 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cWHHo-0004dd-Pp for submit@debbugs.gnu.org; Wed, 25 Jan 2017 01:42:28 -0500 Received: from eggs.gnu.org ([208.118.235.92]:43860) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cWHHo-0004dR-3M for submit@debbugs.gnu.org; Wed, 25 Jan 2017 01:42:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cWHHe-0002Ms-VI for submit@debbugs.gnu.org; Wed, 25 Jan 2017 01:42:22 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:36359) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cWHHe-0002Mo-Rf for submit@debbugs.gnu.org; Wed, 25 Jan 2017 01:42:18 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34818) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cWHHd-0001EQ-Mf for bug-gnu-emacs@gnu.org; Wed, 25 Jan 2017 01:42:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cWHHa-0002MH-Jm for bug-gnu-emacs@gnu.org; Wed, 25 Jan 2017 01:42:17 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:48417) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cWHHa-0002Lt-DO for bug-gnu-emacs@gnu.org; Wed, 25 Jan 2017 01:42:14 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 98D0720818 for ; Wed, 25 Jan 2017 01:42:09 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Wed, 25 Jan 2017 01:42:09 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net; h=content-type:date:from:message-id:mime-version:subject:to :x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=avh D5lBdl+3ksPmjc4R8h7pHbrg=; b=V6TI69Q5GWWL1PwSCTacpSHU/G4cNdNG9g+ 7YsumSLgDcimRQUhT5lsaEYJUzdX6zJlLHyz6PsMzlbgmThWmR02eHbQ8lCHN5NZ dNqqmsoGH961eCGFTNuoN99C4hmdAhqOd+WVAZAdDbpsgcrTk7EVzNclSO/9FoAh yKUOmFiY= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=smtpout; bh=avhD5lBdl+3ksPmjc4R8h7pHbrg=; b=M0o1D 5ciSd/6lIHaI/Xc08ksCYKti0szQOKlPLFBHo1lsxqN/jD7olrd4jYZmpvDXqbu5 wm1kBiE1xZ4RWN9+ZkDA3BwfI4RchbIkYqXBAv9c8PXj69ll7iqTMbYtR940Pj0i EXvhrPNaFZBqFYEjFmBHSgzsb5HFeOk29mX6kY= X-ME-Sender: X-Sasl-enc: 6OETu/seQWqELlbWDJCSfLWsRKFA/W2JiQpwRUFE2ouR 1485326529 Received: from scrawny (50-1-153-216.dsl.dynamic.fusionbroadband.com [50.1.153.216]) by mail.messagingengine.com (Postfix) with ESMTPA id 4BA672453A for ; Wed, 25 Jan 2017 01:42:09 -0500 (EST) Received: from dima by scrawny with local (Exim 4.88) (envelope-from ) id 1cWHHU-0007uF-7v for bug-gnu-emacs@gnu.org; Tue, 24 Jan 2017 22:42:08 -0800 From: Dima Kogan Date: Tue, 24 Jan 2017 22:42:08 -0800 Message-ID: <874m0nwshr.fsf@secretsauce.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) --=-=-= Content-Type: text/plain I'm using a very recent build from git: 0a49f158f15. I see diff-mode being broken in 2 ways. I'm attaching a diff file, produced by C-x v D in a project using subversion (then cut down and de-contented). Breakage 1: 1. emacs -Q /tmp/tst.patch 2. M-k I would expect this to kill the first hunk. Instead emacs barfs: Args out of range: something something Breakage 2: 1. emacs -Q /tmp/tst.patch 2. M-g g 13 RET move point to the start of the 2nd hunk 3. M-k I would expect this to kill the hunk at point (2nd hunk). I would then expect the point to remain at the 2nd hunk 4. M-k Same as before. Should kill 2nd hunk 5. M-k Same as before. Should kill 2nd hunk Instead, M-k #2 kills the 2nd hunk and then moves the point to the 1st hunk. So that subsequent M-k #3 kills the 1st hunk. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=tst.patch Index: Makefile.1 =================================================================== --- Makefile.1 (revision 81382) +++ Makefile.1 (working copy) @@ -220,2 +220,3 @@ # 1111 +# 2222 # 3333 Index: Makefile.2 =================================================================== --- Makefile.2 (revision 81382) +++ Makefile.2 (working copy) @@ -220,2 +220,3 @@ # 2222 +# 3333 # 4444 @@ -330,2 +330,3 @@ # 3333 +# 4444 # 5555 Index: Makefile.3 =================================================================== --- Makefile.3 (revision 81382) +++ Makefile.3 (working copy) @@ -220,2 +220,3 @@ # 4444 +# 5555 # 6666 --=-=-=-- From unknown Mon Aug 18 11:16:17 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25524: 26.0.50; diff-mode is broken Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Jan 2017 16:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25524 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dima Kogan Cc: 25524@debbugs.gnu.org, tino.calancha@gmail.com Received: via spool by 25524-submit@debbugs.gnu.org id=B25524.148536199020525 (code B ref 25524); Wed, 25 Jan 2017 16:34:01 +0000 Received: (at 25524) by debbugs.gnu.org; 25 Jan 2017 16:33:10 +0000 Received: from localhost ([127.0.0.1]:42997 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cWQVR-0005Ky-Sm for submit@debbugs.gnu.org; Wed, 25 Jan 2017 11:33:10 -0500 Received: from mail-pf0-f193.google.com ([209.85.192.193]:35315) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cWQVQ-0005Km-8E for 25524@debbugs.gnu.org; Wed, 25 Jan 2017 11:33:08 -0500 Received: by mail-pf0-f193.google.com with SMTP id f144so14703651pfa.2 for <25524@debbugs.gnu.org>; Wed, 25 Jan 2017 08:33:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=7Ia5ozesL48oduWsK2/k8i2XsqZmrvKHdiyzQ4ZwteI=; b=KxsYKK8OguxjgiEe4BVsKXFLQesTW+XfofKZSOg02G9Nh/GSe4FV3PAYvKgumw+t1U 2Vsj4sB6yDmXmeclAdDEFcw8EjyvaspmxQ+qDQjBdTUIlLoK6aReXmJ/xQcoytujcpH6 XlrPKE/8Md7BeCnxNBHknfA4A2FDRqwG572hSI6BO/Xwq499jagCiycYon9Dj5HL1idn zjs5GfQ+nosGurFA3+KKuTGic+hYt0OF3ywdPfuOD7rgekpjwZje+DpSCZoXpV8sbhpB JxPV46wXYZ+DvCeGOHGBi/na47gUWyJ6OCJTylAcz9BxSbCbOTENnAt5lhY5qolJjCFG eaiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=7Ia5ozesL48oduWsK2/k8i2XsqZmrvKHdiyzQ4ZwteI=; b=pf/uiicUq1GCxTZPV4Pk2zOZycUGF2f5NSOXrG77zWgPSry8kgAnaPj3/O2Wo9wawd m1u9lWWx8wo4ZcB4Jt2j+g6r2XVh84DlKFgMHE5rhl9HS6JEkEdnCVZcMy0zXREQbvRo ucD2UKmiQogUsKRrNZUMI/JZCL76d9DvOhvavg8bdpIUSpE1kklzMGtQA2N+hWZ2f+pf MgHI89GZENNcKH5VMiyGmUMmny6xek/MV5OtmwVZ/QX4hw5S2gYbZJ/LRo0eRie28hZo 0yFKNuG9t4ONYcyjnjr/WoumJcuGbjtWRDfXCLI9km1efnTZW32zJhwxBvha72FJ05g2 h2Yw== X-Gm-Message-State: AIkVDXKcKCwKesV4nkDQ9i/193OQzd9KWMFSVU9SsbNG9efyPUFfbbvv61Np8Jty7FEaGA== X-Received: by 10.84.136.7 with SMTP id 7mr5018161plk.100.1485361982296; Wed, 25 Jan 2017 08:33:02 -0800 (PST) Received: from calancha-pc (33.94.100.220.dy.bbexcite.jp. [220.100.94.33]) by smtp.gmail.com with ESMTPSA id z74sm2347742pfd.70.2017.01.25.08.33.00 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 25 Jan 2017 08:33:01 -0800 (PST) From: Tino Calancha References: <874m0nwshr.fsf@secretsauce.net> Date: Thu, 26 Jan 2017 01:32:56 +0900 In-Reply-To: <874m0nwshr.fsf@secretsauce.net> (Dima Kogan's message of "Tue, 24 Jan 2017 22:42:08 -0800") Message-ID: <87tw8ncd6v.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.1 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.1 (-) Dima Kogan writes: > I'm using a very recent build from git: 0a49f158f15. I see diff-mode > being broken in 2 ways. Thank you for report this. I confirm your observations. > I'm attaching a diff file, produced by C-x v D in a project using > subversion (then cut down and de-contented). > > Breakage 1: > > 1. emacs -Q /tmp/tst.patch > 2. M-k > > I would expect this to kill the first hunk. Instead emacs barfs: > Args out of range: something something `diff-beginning-of-hunk' must return the pos of the beginning of the hunk as stated in its docstring. > > Breakage 2: > > 1. emacs -Q /tmp/tst.patch > 2. M-g g 13 RET move point to the start of the 2nd hunk > 3. M-k I would expect this to kill the hunk at point (2nd > hunk). I would then expect the point to remain at > the 2nd hunk > 4. M-k Same as before. Should kill 2nd hunk > 5. M-k Same as before. Should kill 2nd hunk > > Instead, M-k #2 kills the 2nd hunk and then moves the point to the 1st > hunk. So that subsequent M-k #3 kills the 1st hunk. After recent changes `diff-file-junk-re' must be updated; currently, it just contains Git diff keywords, i.e. `diff--at-diff-header-p' with point in the first line of your example returns nil. Following patch fix 1) and 2): ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; >From 91351edff90628a1c134d79e13f3062467612478 Mon Sep 17 00:00:00 2001 From: Tino Calancha Date: Thu, 26 Jan 2017 01:16:31 +0900 Subject: [PATCH] Fix Bug#25524 * lisp/vc/diff-mode.el (diff-beginning-of-hunk): Return pos at beginning of hunk. (diff-file-junk-re): Add SVN keywords. --- lisp/vc/diff-mode.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index b7ad8e8ebd..0de314df2d 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -499,9 +499,11 @@ diff-end-of-hunk (goto-char (or end (point-max))))) ;; "index ", "old mode", "new mode", "new file mode" and -;; "deleted file mode" are output by git-diff. +;; "deleted file mode" are output by git-diff; "Index: " and +;; "========..." by SVN. (defconst diff-file-junk-re - "diff \\|index \\|\\(?:deleted file\\|new\\(?: file\\)?\\|old\\) mode\\|=== modified file") + (concat "Index: \\|" (make-string 67 ?=) "\\|" + "diff \\|index \\|\\(?:deleted file\\|new\\(?: file\\)?\\|old\\) mode\\|=== modified file")) ;; If point is in a diff header, then return beginning ;; of hunk position otherwise return nil. @@ -545,7 +547,8 @@ diff-beginning-of-hunk (error "Can't find the beginning of the hunk"))) ((re-search-backward regexp nil t)) ; In the middle of a hunk. ((re-search-forward regexp nil t) ; At first hunk header. - (forward-line 0)) + (forward-line 0) + (point)) (t (error "Can't find the beginning of the hunk")))))) (defun diff-unified-hunk-p () -- 2.11.0 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; In GNU Emacs 26.0.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.6) of 2017-01-26 Repository revision: 6bfa9e9abca17290bc393d90aedb5abef83a3e06 From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 25 11:38:46 2017 Received: (at control) by debbugs.gnu.org; 25 Jan 2017 16:38:46 +0000 Received: from localhost ([127.0.0.1]:43005 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cWQas-0005U7-4z for submit@debbugs.gnu.org; Wed, 25 Jan 2017 11:38:46 -0500 Received: from eggs.gnu.org ([208.118.235.92]:60239) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cWQaq-0005Tj-G1 for control@debbugs.gnu.org; Wed, 25 Jan 2017 11:38:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cWQak-0001hJ-O8 for control@debbugs.gnu.org; Wed, 25 Jan 2017 11:38:39 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:34493) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cWQak-0001hF-LC for control@debbugs.gnu.org; Wed, 25 Jan 2017 11:38:38 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1cWQak-0003nO-AO for control@debbugs.gnu.org; Wed, 25 Jan 2017 11:38:38 -0500 Subject: control message for bug 24655 To: X-Mailer: mail (GNU Mailutils 2.99.98) Message-Id: From: Glenn Morris Date: Wed, 25 Jan 2017 11:38:38 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -8.2 (--------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -8.2 (--------) block 24655 by 25521 25522 25524 From unknown Mon Aug 18 11:16:17 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25524: 26.0.50; diff-mode is broken Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Jan 2017 20:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25524 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Tino Calancha Cc: 25524@debbugs.gnu.org, Dima Kogan Received: via spool by 25524-submit@debbugs.gnu.org id=B25524.1485377281494 (code B ref 25524); Wed, 25 Jan 2017 20:48:01 +0000 Received: (at 25524) by debbugs.gnu.org; 25 Jan 2017 20:48:01 +0000 Received: from localhost ([127.0.0.1]:43618 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cWUU4-00007r-NH for submit@debbugs.gnu.org; Wed, 25 Jan 2017 15:48:01 -0500 Received: from mail-oi0-f52.google.com ([209.85.218.52]:34838) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cWUU3-00007W-46 for 25524@debbugs.gnu.org; Wed, 25 Jan 2017 15:47:59 -0500 Received: by mail-oi0-f52.google.com with SMTP id j15so124538933oih.2 for <25524@debbugs.gnu.org>; Wed, 25 Jan 2017 12:47:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=Wh02TxJH8er7m+Yphx3FkDk+bp0ESxgTOZl9nrh7RA4=; b=GdoYqwgRinpbzbcTwZd5kNzoiA4Gj5XaefMpqADzQaesa8cYqQYVJYUHhsfKEnyCRR uC03BDdp4S6Gx2C5YF0srco2pX7YekpS4lt9BgZzs265yNtyPyBKt+Yzmn0PrLYJ81xO LNQo6jd0sD5SQoGePajXeEr/2BCcWmO/qQPOwdI/W6so/D+TtkXu1umurSc/v5VL92si 0qMWu+AuAaATt3Y3aYId6vPkSkyb3kb+PfW5yXE/D1F3ZCYX5CWW/h2JKbg6e5927sHC 48YA0Tf1SdVqsq0yraA0f0HrukPZe+A/BocDz4kfQR7UqK+AW8vd++5QAkRkp9inVWzR 3EoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=Wh02TxJH8er7m+Yphx3FkDk+bp0ESxgTOZl9nrh7RA4=; b=en71LrDIQIh7Qd2lmQWFlfYSe8Z1i9LhFNxS0YtbmOrB+olRB3+1SST3bv+k2CI8ff jt3rSZ5ycvRpzARzA+lw5Lzj6RWGYwr7RkP+JlAKStbmbp8gFFO5PXCumY8HNX3mkeDy KWNcO7Z6tEmCOHlGvbYSkKaz9q+n5uN3nbbTmKVKRyQHC/naqeq0b2QTXmq0jfzpz4cN 5RVuLygGZc6JwKJ624eT5RG52cBuKvSK9ztH0zHG9DLCMkVl1eeKbZheMtgbArGjntKY a0sMwAtX/+81IIuwveDx32EFjC24GiPlz0OkftKBOCgzx7chAGIKndR6CvKyFeCY0NCY WV6A== X-Gm-Message-State: AIkVDXK/4zsV/aOw6tT/pccqsXgoYvhjo3OHQ/INZHhCxpKgSFvdPrbBrdxpwPPmquMPD8s15/3zjgiivQZiVg== X-Received: by 10.202.85.206 with SMTP id j197mr18775332oib.108.1485377273494; Wed, 25 Jan 2017 12:47:53 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.21.117 with HTTP; Wed, 25 Jan 2017 12:47:53 -0800 (PST) In-Reply-To: <87tw8ncd6v.fsf@gmail.com> References: <874m0nwshr.fsf@secretsauce.net> <87tw8ncd6v.fsf@gmail.com> From: Noam Postavsky Date: Wed, 25 Jan 2017 15:47:53 -0500 X-Google-Sender-Auth: 7U6Ovi9syRMkq6g0F5KfjuvBhwc Message-ID: Content-Type: text/plain; charset=UTF-8 X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) On Wed, Jan 25, 2017 at 11:32 AM, Tino Calancha wrote: > ;; "index ", "old mode", "new mode", "new file mode" and > -;; "deleted file mode" are output by git-diff. > +;; "deleted file mode" are output by git-diff; "Index: " and > +;; "========..." by SVN. > (defconst diff-file-junk-re > - "diff \\|index \\|\\(?:deleted file\\|new\\(?: file\\)?\\|old\\) mode\\|=== modified file") > + (concat "Index: \\|" (make-string 67 ?=) "\\|" > + "diff \\|index \\|\\(?:deleted file\\|new\\(?: file\\)?\\|old\\) mode\\|=== modified file")) Is it safe to assume exactly 67 "="? Maybe it would be better to use something like "=\\{20,\\}", i.e. a sequence of 20 or more "=". From unknown Mon Aug 18 11:16:17 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25524: 26.0.50; diff-mode is broken Resent-From: Dima Kogan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Jan 2017 21:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25524 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Noam Postavsky Cc: 25524@debbugs.gnu.org, Tino Calancha Received: via spool by 25524-submit@debbugs.gnu.org id=B25524.148537950710616 (code B ref 25524); Wed, 25 Jan 2017 21:26:01 +0000 Received: (at 25524) by debbugs.gnu.org; 25 Jan 2017 21:25:07 +0000 Received: from localhost ([127.0.0.1]:43715 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cWV3z-0002lA-7x for submit@debbugs.gnu.org; Wed, 25 Jan 2017 16:25:07 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:35656) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cWV3x-0002l2-7g for 25524@debbugs.gnu.org; Wed, 25 Jan 2017 16:25:05 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id C237A20B7E; Wed, 25 Jan 2017 16:25:04 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Wed, 25 Jan 2017 16:25:04 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net; h=cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=ASLzdr0w75p3p01eDA4CK3O7090=; b=rz/mYX htmZocP53PSAAEJ1Ew1PTAXYKLQGRH0TgSZ0eie/u+uzTFUtTp/+FME0urjJ3CWj 7oTYs8GFLkGoU+Iw1hWKP+b+CjeVbrjV927hvNi/X930EBKGE43QjrL6YuQVuI1H bxshqApTd+YuTTatxAZKXjcaMsuUL40pbOJvQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=smtpout; bh=ASLzdr0w75p3p0 1eDA4CK3O7090=; b=HU6+znKu/RdpoVjsxx4lKrHmDG58KC/Ag3vEAaYvQz0foM DJ9AdXrn4QAcoQi68KysyW4Ka8DbZDW+0tYxlFO7kWHsam5MZY3xb2yod5GO/Clk 8zt2NTj1WvnU/u1j8oUTkFw7jrFAPY1514k+QSSnmb0uGuWPNqDCmOBFr2/y4= X-ME-Sender: X-Sasl-enc: szIg+M4viD5baH2lJsVikP74+2sBNIUr+NXs8ZspW447 1485379504 Received: from shorty.local (unknown [128.149.110.210]) by mail.messagingengine.com (Postfix) with ESMTPA id 84E217E5A0; Wed, 25 Jan 2017 16:25:04 -0500 (EST) Received: from dima by shorty.local with local (Exim 4.88) (envelope-from ) id 1cWV3w-000755-4L; Wed, 25 Jan 2017 13:25:04 -0800 References: <874m0nwshr.fsf@secretsauce.net> <87tw8ncd6v.fsf@gmail.com> User-agent: mu4e 0.9.17; emacs 26.0.50.1 From: Dima Kogan In-reply-to: Date: Wed, 25 Jan 2017 13:25:04 -0800 Message-ID: <87wpdin87j.fsf@secretsauce.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Noam Postavsky writes: > On Wed, Jan 25, 2017 at 11:32 AM, Tino Calancha wrote: >> ;; "index ", "old mode", "new mode", "new file mode" and >> -;; "deleted file mode" are output by git-diff. >> +;; "deleted file mode" are output by git-diff; "Index: " and >> +;; "========..." by SVN. >> (defconst diff-file-junk-re >> - "diff \\|index \\|\\(?:deleted file\\|new\\(?: file\\)?\\|old\\) mode\\|=== modified file") >> + (concat "Index: \\|" (make-string 67 ?=) "\\|" >> + "diff \\|index \\|\\(?:deleted file\\|new\\(?: file\\)?\\|old\\) mode\\|=== modified file")) > > Is it safe to assume exactly 67 "="? Maybe it would be better to use > something like "=\\{20,\\}", i.e. a sequence of 20 or more "=". More broadly, are we sure we need to be touching this? The previous approach and the one before that worked with the stock regexes. From unknown Mon Aug 18 11:16:17 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25524: 26.0.50; diff-mode is broken Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 26 Jan 2017 04:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25524 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Noam Postavsky Cc: 25524@debbugs.gnu.org, Dima Kogan , tino.calancha@gmail.com Received: via spool by 25524-submit@debbugs.gnu.org id=B25524.148540501230119 (code B ref 25524); Thu, 26 Jan 2017 04:31:02 +0000 Received: (at 25524) by debbugs.gnu.org; 26 Jan 2017 04:30:12 +0000 Received: from localhost ([127.0.0.1]:44015 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cWbhL-0007pj-QC for submit@debbugs.gnu.org; Wed, 25 Jan 2017 23:30:12 -0500 Received: from mail-pf0-f196.google.com ([209.85.192.196]:36251) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cWbhK-0007ot-K8 for 25524@debbugs.gnu.org; Wed, 25 Jan 2017 23:30:11 -0500 Received: by mail-pf0-f196.google.com with SMTP id 19so15691284pfo.3 for <25524@debbugs.gnu.org>; Wed, 25 Jan 2017 20:30:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=fWjP+EZPySifgwmbAbMEIiMzL9/bjsL2gWq4syBF3t0=; b=g7jak23tdXyP63IOC/j5bGvqHxw/oWfdRz7i9QSySBPQyw92M/jQLii9q1ZHzm02H6 LKG66ptLtS8QNMkQ7WXX5ZHrjuCGZlDDmzkgupoc1wKjQ+fY/Px5u+m27wO7o/f5oe8t M5reg1qg1WHB+AoyKqyi4urB5Ul0naNBcixIN2NLMVvUHJ7/vWiniFM1HvcqIMb5Gjvk C3yH4Xp9EU6Wcp7u4DytjvK+Rzx+soW3u5V6z+elvI3CyFl4Nx2MkXRw7Wd7kESvmV01 UGsc8rwiy6OTeYLLEuncsBxg9VS8pM6yUovD49MhIM6LiGAyxwBdWMWitAIsd+5lcCjW gVtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=fWjP+EZPySifgwmbAbMEIiMzL9/bjsL2gWq4syBF3t0=; b=BIYq8QRDS003Ez7VLFrNJbY7Q0b5W2A0raHhHPNfYo8OKN9w2vfRdAPcSRucKRfpn7 bsNRW2QvqC2MT4BQC7sDz8bjJ64ObbcVm0/J5Aq0DL9kJOuW2/9zsNDqPmN3fqp7cVfa ExbgK1acwFBdYbs6tqKpPsh7EKuBUHEdi+6W7S+vGiwoQN4rSlmdf2/Y+yILDEvK4m4x TT5BfZhPBb0paaJfepCcPKMD9n+NmSq1dbhQHV8ntmqK3oRwdZFCZt2ea53mholV6DQX FI/k21Mnx/EktUyjFQQJ+O2LvbFVdj49Td6xisMsLG9uWC0oVaY/MimeUWU39b2ZZGJ+ BUPQ== X-Gm-Message-State: AIkVDXJslNwuDsZdEt6eTjwQoPWlZCMAq0bUwpNOjQkEHNi+P/u/SKbMvN6gxm61RPZaLw== X-Received: by 10.98.86.203 with SMTP id h72mr988068pfj.108.1485405004729; Wed, 25 Jan 2017 20:30:04 -0800 (PST) Received: from calancha-pc (33.94.100.220.dy.bbexcite.jp. [220.100.94.33]) by smtp.gmail.com with ESMTPSA id p14sm562218pfl.75.2017.01.25.20.30.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 25 Jan 2017 20:30:04 -0800 (PST) From: Tino Calancha References: <874m0nwshr.fsf@secretsauce.net> <87tw8ncd6v.fsf@gmail.com> Date: Thu, 26 Jan 2017 13:29:59 +0900 In-Reply-To: (Noam Postavsky's message of "Wed, 25 Jan 2017 15:47:53 -0500") Message-ID: <87k29ie94o.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.3 (-) Noam Postavsky writes: > On Wed, Jan 25, 2017 at 11:32 AM, Tino Calancha wrote: >> ;; "index ", "old mode", "new mode", "new file mode" and >> -;; "deleted file mode" are output by git-diff. >> +;; "deleted file mode" are output by git-diff; "Index: " and >> +;; "========..." by SVN. >> (defconst diff-file-junk-re >> - "diff \\|index \\|\\(?:deleted file\\|new\\(?: file\\)?\\|old\\) mode\\|=== modified file") >> + (concat "Index: \\|" (make-string 67 ?=) "\\|" >> + "diff \\|index \\|\\(?:deleted file\\|new\\(?: file\\)?\\|old\\) mode\\|=== modified file")) > > Is it safe to assume exactly 67 "="? Maybe it would be better to use > something like "=\\{20,\\}", i.e. a sequence of 20 or more "=". Humm probably 20 is OK, but i am not using SVN in a while: i ignore if such '====...' might be coustomizable. Updated the patch to use >=20 ?=. Dima Kogan writes: > More broadly, are we sure we need to be touching this? The previous > approach and the one before that worked with the stock regexes. 1) The previous approach touch more things that just and already existant regexp: it caused several problems already well discussed in Bug#25105. 2) In the original approach, the mere existance of 'diff-file-junk-re' as it is, it looks weird. The file want to support all kind VCS, not just Git, so it's unnatural that the regexp just contains words from Git diff headers. Indeed, you can see that there are some hardcoded "^Index: " around the file to handle SVN. IMO, it's more readable adding the necessary stuff to `diff-file-junk-re' and perform such operations uniformly just with same function and regexp. Then, if later turns out that we need more keyword to handle other VCS we just need to change on line of code, i.e., add those words into `diff-file-junk-re'. That said, you are very welcome to improve current implementation so that any `diff-file-junk-re' is required at all, without changing other desirable functionality of the file. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; >From c3788c73140af02d6fc2b414ddcdbaf273890cdf Mon Sep 17 00:00:00 2001 From: Tino Calancha Date: Thu, 26 Jan 2017 13:22:46 +0900 Subject: [PATCH] Fix Bug#25524 * lisp/vc/diff-mode.el (diff-beginning-of-hunk): Return pos at beginning of hunk. (diff-file-junk-re): Add SVN keywords. --- lisp/vc/diff-mode.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index b7ad8e8ebd..e609ca9f94 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -501,7 +501,8 @@ diff-end-of-hunk ;; "index ", "old mode", "new mode", "new file mode" and ;; "deleted file mode" are output by git-diff. (defconst diff-file-junk-re - "diff \\|index \\|\\(?:deleted file\\|new\\(?: file\\)?\\|old\\) mode\\|=== modified file") + (concat "Index: \\|=\\{20,\\}\\|" ; SVN + "diff \\|index \\|\\(?:deleted file\\|new\\(?: file\\)?\\|old\\) mode\\|=== modified file")) ;; If point is in a diff header, then return beginning ;; of hunk position otherwise return nil. @@ -545,7 +546,8 @@ diff-beginning-of-hunk (error "Can't find the beginning of the hunk"))) ((re-search-backward regexp nil t)) ; In the middle of a hunk. ((re-search-forward regexp nil t) ; At first hunk header. - (forward-line 0)) + (forward-line 0) + (point)) (t (error "Can't find the beginning of the hunk")))))) (defun diff-unified-hunk-p () -- 2.11.0 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; In GNU Emacs 26.0.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.6) of 2017-01-26 built Repository revision: 44765de2005fb56c5930383d6bd1e959a0102a45 From unknown Mon Aug 18 11:16:17 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Dima Kogan Subject: bug#25524: closed (Re: bug#25524: 26.0.50; diff-mode is broken) Message-ID: References: <87h94ijip9.fsf@calancha-pc> <874m0nwshr.fsf@secretsauce.net> X-Gnu-PR-Message: they-closed 25524 X-Gnu-PR-Package: emacs Reply-To: 25524@debbugs.gnu.org Date: Sun, 29 Jan 2017 09:54:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1485683642-8373-1" This is a multi-part message in MIME format... ------------=_1485683642-8373-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #25524: 26.0.50; diff-mode is broken which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 25524@debbugs.gnu.org. --=20 25524: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D25524 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1485683642-8373-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 25524-done) by debbugs.gnu.org; 29 Jan 2017 09:53:36 +0000 Received: from localhost ([127.0.0.1]:49701 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cXmAx-0002AQ-Qc for submit@debbugs.gnu.org; Sun, 29 Jan 2017 04:53:35 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:34877) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cXmAv-0002AE-Tn for 25524-done@debbugs.gnu.org; Sun, 29 Jan 2017 04:53:34 -0500 Received: by mail-pg0-f67.google.com with SMTP id 204so28946716pge.2 for <25524-done@debbugs.gnu.org>; Sun, 29 Jan 2017 01:53:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version; bh=dY3Vk2ktj2NQoTcYX6pjkldl4Mv37bALWgp6zWQVx/Q=; b=G2/J9VoUUy11R77AW2JyRB+XAjJhN7pHZ5d5iKf+DJH4cMogfiTmTdCmAGJh21JKIs g5wuqWLzWegO4ebw2Rm0I4gwRCDfZDSceZ0xb5Q99zJhc9ft1JD5dcxId8f7WLrJV4tH Rnj5ZYk7AKUDfyI4Br2KutMeanhL3SPWYA3p1vL1WtM1R1FDwvVUJEomnqlK1a+TuaXW 4eea2Ho/LqFTkubMU0i8+Mqg3esAj2VF9i/zUzj7QojLcnhTmgKuI2ruJhCxks288e7K frOVvcjJXxYCSKDJdVd32EdLdU8BiEdYmoLjNgz7P3IxsnR2B0YrlTx7Xk9ETFUD+ZuA xgiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=dY3Vk2ktj2NQoTcYX6pjkldl4Mv37bALWgp6zWQVx/Q=; b=GPEOSa/yS7VpxmLxYzbiyFsx1tWo3deFNgGozNuKrxsjKZScjgwYvgHAIvgefRtQ7T 2gZyaPypVL3pIWkFW8FUavDeIj5lW1kr0bF92ueOESnaz5aw85lytydgL2UamAIulRgs +UXdH2xNZvQ19V3EC2AvFVcpY0lj670FK3V/bAPVQuCcJ+W0AkCv0Y7GlW0rg/lelmyV nV6QPxCqKMT90h2/tSLJIuyaioY+CP26Y9/Y3MFsECQ6hzbXj8slRZpfXIOYIUGJImcv BUycYy2hvnzyKrwNq6n751jfzZ9C/iNAo0To/KSfQPQ78suUYkttsf2VFcxqGy4wgi3b qKoA== X-Gm-Message-State: AIkVDXIJpuRvYchdbosojZi4CDgI9UosBuk3Ykj+oMmZZDUN30fYza39V0dWeutMnNUleA== X-Received: by 10.84.147.71 with SMTP id r7mr24365352ple.48.1485683607855; Sun, 29 Jan 2017 01:53:27 -0800 (PST) Received: from calancha-pc (33.94.100.220.dy.bbexcite.jp. [220.100.94.33]) by smtp.gmail.com with ESMTPSA id p25sm23808286pfd.0.2017.01.29.01.53.26 for <25524-done@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 29 Jan 2017 01:53:27 -0800 (PST) From: Tino Calancha To: 25524-done@debbugs.gnu.org Subject: Re: bug#25524: 26.0.50; diff-mode is broken References: <874m0nwshr.fsf@secretsauce.net> <87tw8ncd6v.fsf@gmail.com> <87k29ie94o.fsf@gmail.com> Date: Sun, 29 Jan 2017 18:53:22 +0900 In-Reply-To: <87k29ie94o.fsf@gmail.com> (Tino Calancha's message of "Thu, 26 Jan 2017 13:29:59 +0900") Message-ID: <87h94ijip9.fsf@calancha-pc> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 25524-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) Tino Calancha writes: > Noam Postavsky writes: > >> On Wed, Jan 25, 2017 at 11:32 AM, Tino Calancha wrote: >>> ;; "index ", "old mode", "new mode", "new file mode" and >>> -;; "deleted file mode" are output by git-diff. >>> +;; "deleted file mode" are output by git-diff; "Index: " and >>> +;; "========..." by SVN. >>> (defconst diff-file-junk-re >>> - "diff \\|index \\|\\(?:deleted file\\|new\\(?: file\\)?\\|old\\) mode\\|=== modified file") >>> + (concat "Index: \\|" (make-string 67 ?=) "\\|" >>> + "diff \\|index \\|\\(?:deleted file\\|new\\(?: file\\)?\\|old\\) mode\\|=== modified file")) >> >> Is it safe to assume exactly 67 "="? Maybe it would be better to use >> something like "=\\{20,\\}", i.e. a sequence of 20 or more "=". > Humm probably 20 is OK, but i am not using SVN in a while: i ignore if > such '====...' might be coustomizable. > Updated the patch to use >=20 ?=. Pushed fix to master branch as commit 0073223c23749ffd6bd3f882bc30a82cc37efd2a ------------=_1485683642-8373-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 25 Jan 2017 06:42:29 +0000 Received: from localhost ([127.0.0.1]:41412 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cWHHo-0004dd-Pp for submit@debbugs.gnu.org; Wed, 25 Jan 2017 01:42:28 -0500 Received: from eggs.gnu.org ([208.118.235.92]:43860) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cWHHo-0004dR-3M for submit@debbugs.gnu.org; Wed, 25 Jan 2017 01:42:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cWHHe-0002Ms-VI for submit@debbugs.gnu.org; Wed, 25 Jan 2017 01:42:22 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:36359) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cWHHe-0002Mo-Rf for submit@debbugs.gnu.org; Wed, 25 Jan 2017 01:42:18 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34818) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cWHHd-0001EQ-Mf for bug-gnu-emacs@gnu.org; Wed, 25 Jan 2017 01:42:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cWHHa-0002MH-Jm for bug-gnu-emacs@gnu.org; Wed, 25 Jan 2017 01:42:17 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:48417) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cWHHa-0002Lt-DO for bug-gnu-emacs@gnu.org; Wed, 25 Jan 2017 01:42:14 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 98D0720818 for ; Wed, 25 Jan 2017 01:42:09 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Wed, 25 Jan 2017 01:42:09 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net; h=content-type:date:from:message-id:mime-version:subject:to :x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=avh D5lBdl+3ksPmjc4R8h7pHbrg=; b=V6TI69Q5GWWL1PwSCTacpSHU/G4cNdNG9g+ 7YsumSLgDcimRQUhT5lsaEYJUzdX6zJlLHyz6PsMzlbgmThWmR02eHbQ8lCHN5NZ dNqqmsoGH961eCGFTNuoN99C4hmdAhqOd+WVAZAdDbpsgcrTk7EVzNclSO/9FoAh yKUOmFiY= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=smtpout; bh=avhD5lBdl+3ksPmjc4R8h7pHbrg=; b=M0o1D 5ciSd/6lIHaI/Xc08ksCYKti0szQOKlPLFBHo1lsxqN/jD7olrd4jYZmpvDXqbu5 wm1kBiE1xZ4RWN9+ZkDA3BwfI4RchbIkYqXBAv9c8PXj69ll7iqTMbYtR940Pj0i EXvhrPNaFZBqFYEjFmBHSgzsb5HFeOk29mX6kY= X-ME-Sender: X-Sasl-enc: 6OETu/seQWqELlbWDJCSfLWsRKFA/W2JiQpwRUFE2ouR 1485326529 Received: from scrawny (50-1-153-216.dsl.dynamic.fusionbroadband.com [50.1.153.216]) by mail.messagingengine.com (Postfix) with ESMTPA id 4BA672453A for ; Wed, 25 Jan 2017 01:42:09 -0500 (EST) Received: from dima by scrawny with local (Exim 4.88) (envelope-from ) id 1cWHHU-0007uF-7v for bug-gnu-emacs@gnu.org; Tue, 24 Jan 2017 22:42:08 -0800 From: Dima Kogan To: bug-gnu-emacs@gnu.org Subject: 26.0.50; diff-mode is broken Date: Tue, 24 Jan 2017 22:42:08 -0800 Message-ID: <874m0nwshr.fsf@secretsauce.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) --=-=-= Content-Type: text/plain I'm using a very recent build from git: 0a49f158f15. I see diff-mode being broken in 2 ways. I'm attaching a diff file, produced by C-x v D in a project using subversion (then cut down and de-contented). Breakage 1: 1. emacs -Q /tmp/tst.patch 2. M-k I would expect this to kill the first hunk. Instead emacs barfs: Args out of range: something something Breakage 2: 1. emacs -Q /tmp/tst.patch 2. M-g g 13 RET move point to the start of the 2nd hunk 3. M-k I would expect this to kill the hunk at point (2nd hunk). I would then expect the point to remain at the 2nd hunk 4. M-k Same as before. Should kill 2nd hunk 5. M-k Same as before. Should kill 2nd hunk Instead, M-k #2 kills the 2nd hunk and then moves the point to the 1st hunk. So that subsequent M-k #3 kills the 1st hunk. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=tst.patch Index: Makefile.1 =================================================================== --- Makefile.1 (revision 81382) +++ Makefile.1 (working copy) @@ -220,2 +220,3 @@ # 1111 +# 2222 # 3333 Index: Makefile.2 =================================================================== --- Makefile.2 (revision 81382) +++ Makefile.2 (working copy) @@ -220,2 +220,3 @@ # 2222 +# 3333 # 4444 @@ -330,2 +330,3 @@ # 3333 +# 4444 # 5555 Index: Makefile.3 =================================================================== --- Makefile.3 (revision 81382) +++ Makefile.3 (working copy) @@ -220,2 +220,3 @@ # 4444 +# 5555 # 6666 --=-=-=-- ------------=_1485683642-8373-1--