GNU bug report logs -
#25524
26.0.50; diff-mode is broken
Previous Next
Reported by: Dima Kogan <dima <at> secretsauce.net>
Date: Wed, 25 Jan 2017 06:43:01 UTC
Severity: normal
Found in version 26.0.50
Done: Tino Calancha <tino.calancha <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Sun, 29 Jan 2017 18:53:22 +0900
with message-id <87h94ijip9.fsf <at> calancha-pc>
and subject line Re: bug#25524: 26.0.50; diff-mode is broken
has caused the debbugs.gnu.org bug report #25524,
regarding 26.0.50; diff-mode is broken
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
25524: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=25524
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
[Message part 3 (text/plain, inline)]
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.
[tst.patch (text/x-diff, inline)]
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
[Message part 5 (message/rfc822, inline)]
Tino Calancha <tino.calancha <at> gmail.com> writes:
> Noam Postavsky <npostavs <at> users.sourceforge.net> writes:
>
>> On Wed, Jan 25, 2017 at 11:32 AM, Tino Calancha <tino.calancha <at> gmail.com> 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
This bug report was last modified 8 years and 176 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.