From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Dima Kogan Newsgroups: gmane.emacs.bugs Subject: bug#25105: 26.0.50; diff navigation is broken Date: Thu, 05 Jan 2017 20:16:12 -0800 Message-ID: <87lguovn5f.fsf@secretsauce.net> References: <87inpt6lce.fsf@gmail.com> <87tw9dc7bk.fsf@secretsauce.net> <87shoxc70l.fsf@secretsauce.net> <20170106030606.GB1101@holos.localdomain> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1483676241 24997 195.159.176.226 (6 Jan 2017 04:17:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 6 Jan 2017 04:17:21 +0000 (UTC) User-Agent: mu4e 0.9.19; emacs 26.0.50.1 Cc: 25105@debbugs.gnu.org, Dmitry Gutov , Tino Calancha , npostavs@users.sourceforge.net To: Mark Oteiza Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jan 06 05:17:12 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPLxl-0004vI-7J for geb-bug-gnu-emacs@m.gmane.org; Fri, 06 Jan 2017 05:17:10 +0100 Original-Received: from localhost ([::1]:50040 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cPLxn-0004jH-GV for geb-bug-gnu-emacs@m.gmane.org; Thu, 05 Jan 2017 23:17:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59023) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cPLxh-0004jC-Kz for bug-gnu-emacs@gnu.org; Thu, 05 Jan 2017 23:17:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cPLxe-0005X9-EI for bug-gnu-emacs@gnu.org; Thu, 05 Jan 2017 23:17:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57064) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cPLxe-0005X5-7u for bug-gnu-emacs@gnu.org; Thu, 05 Jan 2017 23:17:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cPLxe-0001cp-2X for bug-gnu-emacs@gnu.org; Thu, 05 Jan 2017 23:17:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dima Kogan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 06 Jan 2017 04:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25105 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25105-submit@debbugs.gnu.org id=B25105.14836761796191 (code B ref 25105); Fri, 06 Jan 2017 04:17:02 +0000 Original-Received: (at 25105) by debbugs.gnu.org; 6 Jan 2017 04:16:19 +0000 Original-Received: from localhost ([127.0.0.1]:44230 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPLwx-0001bn-12 for submit@debbugs.gnu.org; Thu, 05 Jan 2017 23:16:19 -0500 Original-Received: from out2-smtp.messagingengine.com ([66.111.4.26]:46606) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPLwv-0001bf-3a for 25105@debbugs.gnu.org; Thu, 05 Jan 2017 23:16:17 -0500 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 201D820D92; Thu, 5 Jan 2017 23:16:15 -0500 (EST) Original-Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Thu, 05 Jan 2017 23:16:15 -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=Kfj++cIvCk/tTnj36vDlGog6JP0=; b=S4HJK/ dRlgVlgLV2RXpUEzVsDYGW/4K+pGU7K90Ld4DcgPjyfo9N3imFT8tEUb7mUzWPVF NQxGTYGtvcZ2ov5QAEyyl4z+wMF7FaC7VdrcCePeZbUhVD82fB9zioETv6ZmVSbx 6XjgstcHhYPVkV+vCiV9bPaMgXAJ8TebiN7v4= 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=Kfj++cIvCk/tTn j36vDlGog6JP0=; b=CmVGCNOE4C3Nu6zra5xmauBzIC2YZbT5Ztibas/KIIUBjT G7NrtqnNQu6u22RTXknHOmNvgxusYSt85W8etcExrpz/oUF3vqxF+PCbEeE9S2CF wt9jbUOqaZ6Yf4H8nkPdsbI1DVkv8qL9rLLdhBRCZ4QVVLAX2ygm8k10ZdyGs= X-ME-Sender: X-Sasl-enc: ojZM4fGh54W2DJ3yJ1m8Wt0TEOodMY6nwAzVRqmagbf5 1483676174 Original-Received: from scrawny (50-1-153-216.dsl.dynamic.fusionbroadband.com [50.1.153.216]) by mail.messagingengine.com (Postfix) with ESMTPA id 5B8ED249A5; Thu, 5 Jan 2017 23:16:14 -0500 (EST) Original-Received: from dima by scrawny with local (Exim 4.88) (envelope-from ) id 1cPLwq-0000P6-Mg; Thu, 05 Jan 2017 20:16:12 -0800 In-reply-to: <20170106030606.GB1101@holos.localdomain> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:127811 Archived-At: Mark Oteiza writes: > On 05/01/17 at 05:27pm, Dima Kogan wrote: >> Dima Kogan 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 just re-read the commit message, and I think it's clear that it touches navigation. I'm not a seasoned contributor to this project, so I don't know what the policy is regarding NEWS. In either case, that is irrelevant: we'd still be having this conversation. Tests would be good, as always. However the diff-mode prior to this patch had no tests, and I've been using this code every day for years. And again, this doesn't matter. The issues in question aren't unintended bugs, and they would have passed any tests I would have written. > I fail to see how fixing corner cases in diff-apply-hunk has anything > to do with diff-{file,hunk}-{next-prev} The issues being fixed are making anything that operates on hunks more consistent, so diff-{file,hunk}-{next-prev} are relevant. > At first glance, it looks like the following patch would restore the > previous behavior, however it completely breaks auto refinement. > > If you want to restore the previous behavior, wouldn't a revert be better? Or are you trying to restore only a subset of the previous behavior? > With the number of actual bugs (email/format-patch/pre-diff content, > and auto refinement) the initial patch caused, perhaps this is best. The email/format-patch issue has nothing to do with me; it has been a problem for years. The way to "fix" auto-refinement is to invoke auto-refinement in a diff-mode-hook, as suggested earlier. The bug reporter didn't like that, and I don't know what they want. I'm not sure where the pre-diff content issue came from. Likely it came up because the patch that was in the BTS for years wasn't what ended up being merged, so I haven't sufficiently tested it. Lesson learned. I consider the current behavior a significant improvement in usability, but if there's a consensus that it's a step backward, then I'll go back to carrying this patch in my local tree. Let me ask the few people I know who would be using this code at all to get at least anecdotal feedback.