GNU bug report logs - #25105
26.0.50; diff navigation is broken

Previous Next

Package: emacs;

Reported by: Mark Oteiza <mvoteiza <at> udel.edu>

Date: Sun, 4 Dec 2016 15:14:02 UTC

Severity: normal

Tags: patch

Merged with 25400

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

From: Mark Oteiza <mvoteiza <at> udel.edu>
To: Dima Kogan <dima <at> secretsauce.net>
Cc: 25105 <at> debbugs.gnu.org, npostavs <at> users.sourceforge.net, Dmitry Gutov <dgutov <at> yandex.ru>, Tino Calancha <tino.calancha <at> gmail.com>
Subject: bug#25105: 26.0.50; diff navigation is broken
Date: Thu, 5 Jan 2017 22:06:06 -0500
On 05/01/17 at 05:27pm, Dima Kogan wrote:
> Dima Kogan <dima <at> secretsauce.net> writes:
> 
> > The behavior I want is to always have a consistent idea of which hunk we
> > are currently on.
> 
> Some more behaviors that I think are desirable are described in the
> commit message of the main patch:
> 
>   https://github.com/emacs-mirror/emacs/commit/2c8a7e50d24daf19e

The only mention of the changes to navigation is "Better navigation
logic".  Not documented in NEWS, and no tests for the corner cases.
I fail to see how fixing corner cases in diff-apply-hunk has anything to
do with diff-{file,hunk}-{next-prev}

At first glance, it looks like the following patch would restore the
previous behavior, however it completely breaks auto refinement.

diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el
index 9dfcd944bb..3442b01d12 100644
--- a/lisp/vc/diff-mode.el
+++ b/lisp/vc/diff-mode.el
@@ -625,7 +625,7 @@ diff--wrap-navigation
 ;; inner one does not, which breaks the loop.
 (defun diff-hunk-prev (&optional count skip-hunk-start)
   "Go to the previous COUNT'th hunk."
-  (interactive (list (prefix-numeric-value current-prefix-arg) t))
+  (interactive (list (prefix-numeric-value current-prefix-arg) nil))
   (diff--wrap-navigation
    skip-hunk-start
    "prev hunk"
@@ -636,7 +636,7 @@ diff-hunk-prev
 
 (defun diff-hunk-next (&optional count skip-hunk-start)
   "Go to the next COUNT'th hunk."
-  (interactive (list (prefix-numeric-value current-prefix-arg) t))
+  (interactive (list (prefix-numeric-value current-prefix-arg) nil))
   (diff--wrap-navigation
    skip-hunk-start
    "next hunk"
@@ -647,7 +647,7 @@ diff-hunk-next
 
 (defun diff-file-prev (&optional count skip-hunk-start)
   "Go to the previous COUNT'th file."
-  (interactive (list (prefix-numeric-value current-prefix-arg) t))
+  (interactive (list (prefix-numeric-value current-prefix-arg) nil))
   (diff--wrap-navigation
    skip-hunk-start
    "prev file"
@@ -658,7 +658,7 @@ diff-file-prev
 
 (defun diff-file-next (&optional count skip-hunk-start)
   "Go to the next COUNT'th file."
-  (interactive (list (prefix-numeric-value current-prefix-arg) t))
+  (interactive (list (prefix-numeric-value current-prefix-arg) nil))
   (diff--wrap-navigation
    skip-hunk-start
    "next file"




This bug report was last modified 8 years and 123 days ago.

Previous Next


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