all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Mark Oteiza <mvoteiza@udel.edu>
To: Dima Kogan <dima@secretsauce.net>
Cc: 25105@debbugs.gnu.org, emacs-devel@gnu.org,
	Tino Calancha <tino.calancha@gmail.com>
Subject: Re: [Emacs-diffs] master 2c8a7e5: Improve diff-mode navigation/manipulation
Date: Thu, 5 Jan 2017 21:58:11 -0500	[thread overview]
Message-ID: <20170106025811.GA1101@holos.localdomain> (raw)
In-Reply-To: <874m2gfb9b.fsf@secretsauce.net>

On 06/12/16 at 11:29pm, Dima Kogan wrote:
> Mark Oteiza <mvoteiza@udel.edu> writes:
> 
> > Fixing C-c C-a to DTRT is great, thanks, but I don't think the
> > off-by-one navigation changes to "n" and "p" (diff-hunk-next,
> > diff-hunk-prev) make sense. While it may have made fixing the issues
> > mentioned in the commit message easier, the changes to what "n" and "p"
> > do at the beginning and end of a diff are not documented, and I didn't
> > see any discussion of it in the associated bug.
> >
> > I contend that the new behavior is inconsistent with the behavior of
> > other outline/thing-with-headers type things in Emacs.  outline-mode,
> > org-mode, and rst-mode are the first ones that come to mind.
> 
> Can you give a specific example of interaction in any of these modes
> that is analogous to the off-by-one behavior you're referring to?

I wrote about how your changes are make diff-mode _not_ analogous.

> The
> fundamental question is what hunk diff-mode should think the point is
> looking at, when it is in some non-diff message above the first hunk.
> The answer I chose for the new navigation logic is "first hunk". You
> could also choose "invalid hunk, not a hunk at all", which would imply
> that C-c C-a and M-ret and such shouldn't work there. Better suggestions
> welcome.

One might argue that C-c C-a and friends in a file header should apply
all hunks in a file, or perhaps that there should actually be
diff-apply-file commands, etc.

The way n and p worked was not a bug, yet you gratuitously changed them,
and broke auto-refinement.  Why do I have to now hit two keys to refine
the first hunk, and one key to refine the second?

> > It's also not clear how the introduced oddity with auto-refine is going
> > to be resolved, unless a way is found to autorefine the first hunk
> > without there being any user interaction.  Then opening a diff has
> > inconsistent auto-refining from the start.
> 
> I don't use auto-refinement, so didn't notice the breakage. Will look at
> it in a bit.

It's on by default, so this statement perplexes me.



      parent reply	other threads:[~2017-01-06  2:58 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-29 12:07 [Emacs-diffs] master 2c8a7e5: Improve diff-mode navigation/manipulation Tino Calancha
2016-11-30  0:03 ` Noam Postavsky
2016-11-30 14:22 ` Dmitry Gutov
2016-11-30 14:31   ` Stefan Monnier
2016-11-30 14:34     ` Dmitry Gutov
2016-11-30 15:07       ` Stefan Monnier
2016-12-10  1:27   ` Dima Kogan
2016-12-10 10:14     ` Dmitry Gutov
2016-12-10 17:27       ` Dima Kogan
2016-12-11 11:07         ` Dmitry Gutov
2016-12-12  7:28           ` Dima Kogan
2016-12-16  1:05             ` Dmitry Gutov
2016-12-20  2:22             ` Tino Calancha
2016-12-20  7:31               ` Dima Kogan
2016-12-25  6:52               ` Dima Kogan
2016-12-25  9:48                 ` Tino Calancha
2016-12-25  9:58                   ` Tino Calancha
2016-12-25 14:10                     ` Dmitry Gutov
2016-12-06  2:03 ` Mark Oteiza
2016-12-07  7:29   ` bug#25105: " Dima Kogan
2016-12-07  7:29   ` Dima Kogan
2017-01-06  2:58     ` bug#25105: " Mark Oteiza
2017-01-06  2:58     ` Mark Oteiza [this message]

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

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

  git send-email \
    --in-reply-to=20170106025811.GA1101@holos.localdomain \
    --to=mvoteiza@udel.edu \
    --cc=25105@debbugs.gnu.org \
    --cc=dima@secretsauce.net \
    --cc=emacs-devel@gnu.org \
    --cc=tino.calancha@gmail.com \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.