GNU bug report logs - #33054
25.2; diff-model: M-k kills wrong hunk

Previous Next

Package: emacs;

Reported by: Dima Kogan <dima <at> secretsauce.net>

Date: Mon, 15 Oct 2018 20:56:02 UTC

Severity: normal

Found in version 25.2

Done: "dima\@secretsauce.net" <dima <at> secretsauce.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 33054 in the body.
You can then email your comments to 33054 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#33054; Package emacs. (Mon, 15 Oct 2018 20:56:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dima Kogan <dima <at> secretsauce.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 15 Oct 2018 20:56:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Dima Kogan <dima <at> secretsauce.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.2; diff-model: M-k kills wrong hunk
Date: Mon, 15 Oct 2018 13:56:27 -0700
[Message part 1 (text/plain, inline)]
I'm using a very recent build: e4896856172

Steps to reproduce bug:

- Open attached diff. Emacs should open it in diff-mode
- Put point on 'd' in the second "diff": (goto-char 98)
- M-k

This should kill the hunk we're on. We are unambiguously sitting on the
second hunk, but the latest diff-mode is confused, thinks we're on the
first hunk, and kills that instead. Kinda. Moving the point even one
character forward makes it work.

[bug.patch (text/x-diff, inline)]
diff --git a/111.py b/111.py
--- a/111.py
+++ b/111.py
@@ -154,3 +154,3 @@
 
-    aaa
+    bbb
 
diff --git a/222.py b/222.py
--- a/222.py
+++ b/222.py
@@ -224,3 +230,3 @@ writemodel(m_to)
     asdf
-    21234
+    345
     zxcv

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#33054; Package emacs. (Tue, 16 Oct 2018 18:27:01 GMT) Full text and rfc822 format available.

Message #8 received at 33054 <at> debbugs.gnu.org (full text, mbox):

From: Alan Mackenzie <acm <at> muc.de>
To: Dima Kogan <dima <at> secretsauce.net>
Cc: 33054 <at> debbugs.gnu.org
Subject: Re: bug#33054: 25.2; diff-model: M-k kills wrong hunk
Date: 16 Oct 2018 18:26:37 -0000
Hello, Dima:

In article <mailman.2215.1539636970.1284.bug-gnu-emacs <at> gnu.org> you wrote:
> [-- text/plain, encoding 7bit, charset: US-ASCII, 14 lines --]

> I'm using a very recent build: e4896856172

Very recent?  That was from September 8th, over a month ago.  ;-)

> Steps to reproduce bug:

> - Open attached diff. Emacs should open it in diff-mode
> - Put point on 'd' in the second "diff": (goto-char 98)
> - M-k

> This should kill the hunk we're on.

It does that for me.

> We are unambiguously sitting on the second hunk, but the latest
> diff-mode is confused, thinks we're on the first hunk, and kills that
> instead. Kinda. Moving the point even one character forward makes it
> work.

It works for me anyway (With a build updated at most a day ago).  I've
looked at the git log for diff-mode.el, and nobody's changed anything
relevant, that I can see, since early September.

What's your environment?  Operating system, and so on?

Or, maybe something really wierd is happening, and it would stop
happening on an up to date snapshot of Emacs.

-- 
Alan Mackenzie (Nuremberg, Germany).





Reply sent to "dima\@secretsauce.net" <dima <at> secretsauce.net>:
You have taken responsibility. (Tue, 16 Oct 2018 19:07:01 GMT) Full text and rfc822 format available.

Notification sent to Dima Kogan <dima <at> secretsauce.net>:
bug acknowledged by developer. (Tue, 16 Oct 2018 19:07:02 GMT) Full text and rfc822 format available.

Message #13 received at 33054-done <at> debbugs.gnu.org (full text, mbox):

From: "dima\@secretsauce.net" <dima <at> secretsauce.net>
To: Alan Mackenzie <acm <at> muc.de>
Cc: 33054-done <at> debbugs.gnu.org
Subject: Re: bug#33054: 25.2; diff-model: M-k kills wrong hunk
Date: Tue, 16 Oct 2018 12:06:10 -0700
Alan Mackenzie <acm <at> muc.de> writes:

>> Steps to reproduce bug:
>
>> - Open attached diff. Emacs should open it in diff-mode
>> - Put point on 'd' in the second "diff": (goto-char 98)
>> - M-k
>
>> This should kill the hunk we're on.
>
> It does that for me.

Hi Alan. Thanks for the response. I was consistently seeing the problem,
but poked around a bit more after seeing your comment. I found the
issue: I was doing something wrong (specifics completely uninteresting).
There is no issue, and I'm closing the bug. Sorry for the noise.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#33054; Package emacs. (Tue, 16 Oct 2018 19:36:01 GMT) Full text and rfc822 format available.

Message #16 received at 33054-done <at> debbugs.gnu.org (full text, mbox):

From: Alan Mackenzie <acm <at> muc.de>
To: "dima <at> secretsauce.net" <dima <at> secretsauce.net>
Cc: 33054-done <at> debbugs.gnu.org
Subject: Re: bug#33054: 25.2; diff-model: M-k kills wrong hunk
Date: Tue, 16 Oct 2018 19:27:39 +0000
Hello, Dima

On Tue, Oct 16, 2018 at 12:06:10 -0700, dima <at> secretsauce.net wrote:
> Alan Mackenzie <acm <at> muc.de> writes:

> >> Steps to reproduce bug:

> >> - Open attached diff. Emacs should open it in diff-mode
> >> - Put point on 'd' in the second "diff": (goto-char 98)
> >> - M-k

> >> This should kill the hunk we're on.

> > It does that for me.

> Hi Alan. Thanks for the response. I was consistently seeing the problem,
> but poked around a bit more after seeing your comment. I found the
> issue: I was doing something wrong (specifics completely uninteresting).
> There is no issue, and I'm closing the bug. Sorry for the noise.

That's OK, glad you got it sorted out!

-- 
Alan Mackenzie (Nuremberg, Germany).




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 14 Nov 2018 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 220 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.