unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Dima Kogan <dima@secretsauce.net>
To: 25524@debbugs.gnu.org
Subject: bug#25524: 26.0.50; diff-mode is broken
Date: Tue, 24 Jan 2017 22:42:08 -0800	[thread overview]
Message-ID: <874m0nwshr.fsf@secretsauce.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 893 bytes --]

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.




[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: tst.patch --]
[-- Type: text/x-diff, Size: 621 bytes --]

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


             reply	other threads:[~2017-01-25  6:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-25  6:42 Dima Kogan [this message]
2017-01-25 16:32 ` bug#25524: 26.0.50; diff-mode is broken Tino Calancha
2017-01-25 20:47   ` Noam Postavsky
2017-01-25 21:25     ` Dima Kogan
2017-01-26  4:29     ` Tino Calancha
2017-01-29  9:53       ` Tino Calancha

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874m0nwshr.fsf@secretsauce.net \
    --to=dima@secretsauce.net \
    --cc=25524@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).