[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
Re: [Emacs-diffs] master 2c8a7e5: Improve diff-mode navigation/manipulat
From:
Dima Kogan
Subject:
Re: [Emacs-diffs] master 2c8a7e5: Improve diff-mode navigation/manipulation
Date:
2016年12月10日 09:27:44 -0800
User-agent:
K-9 Mail for Android
On December 10, 2016 2:14:41 AM PST, Dmitry Gutov <address@hidden> wrote:
>On 10.12.2016 03:27, Dima Kogan wrote:
>
>> I'm unclear about what the complaint is. Both the old and new
>behaviors
>> made the auto-refinement do its thing. Is the complaint that the
>point
>> no longer moves to the end (and if so, why is that "right"?) or is
>the
>> "ding" the "problem?
>
>Sorry, let me clarify.
>
>The first complaint is that, yes, point doesn't move to the end
>anymore.
>Foremost, I'm simply used to the old behavior. Second, I'm not sure how
>
>to implement on-demand refining of the first hunk in a sane fashion
>without it, see below.
>
>Third, it's simply handy if the first hunk is taller than the height of
>
>the window, I would navigate to its end to examine it. Fourth, I'd see
>the end of the buffer myself before the next pressing of `n' invokes a
>"ding".
>
>The second complaint is that the command does a "ding" (informing me
>that I did something wrong), and then proceeds to do something useful:
>refining the hunk.
>
>> OK. The logic in place is to auto-refine the hunk at point after a
>> motion, which is why you're seeing this behavior. Are you seeing this
>> issue only with the first hunk in a buffer and only when you first
>load
>> such a buffer?
>
>Yes.
>
>> If so, an auto-refinement call from a diff-mode-hook
>> would solve this. Sounds reasonable, or are such things frowned-upon?
>
>What if the first hunk is big and refining takes a lot of time?
>
>As it is now, I can make the choice to refine or not myself. If
>`diff-mode-hook' does that, I won't even see the diff before refining
>is
>done.
It sounds like "auto" refinement isn't what you really want. You want to ask
emacs to refine the hunk you are on by invoking diff-next even though
diff-refine-hunk makes more sense.
For the other concerns, I can special-case the last hunk, and move to eob for
diff-next, and to ding only if we're already at eob to begin with. That will
give you the legacy behavior if there's only a single hunk, I think. Seems
reasonable?
- Re: [Emacs-diffs] master 2c8a7e5: Improve diff-mode navigation/manipulation , Mark Oteiza, 2016年12月05日
- Re: [Emacs-diffs] master 2c8a7e5: Improve diff-mode navigation/manipulation , Dima Kogan, 2016年12月09日
- Re: [Emacs-diffs] master 2c8a7e5: Improve diff-mode navigation/manipulation , Dmitry Gutov, 2016年12月10日
- Re: [Emacs-diffs] master 2c8a7e5: Improve diff-mode navigation/manipulation,
Dima Kogan <=
- Re: [Emacs-diffs] master 2c8a7e5: Improve diff-mode navigation/manipulation , Dmitry Gutov, 2016年12月11日
- Re: [Emacs-diffs] master 2c8a7e5: Improve diff-mode navigation/manipulation , Dima Kogan, 2016年12月12日
- Re: [Emacs-diffs] master 2c8a7e5: Improve diff-mode navigation/manipulation , Dmitry Gutov, 2016年12月15日
- Re: [Emacs-diffs] master 2c8a7e5: Improve diff-mode navigation/manipulation , Tino Calancha, 2016年12月19日
- Re: [Emacs-diffs] master 2c8a7e5: Improve diff-mode navigation/manipulation , Dima Kogan, 2016年12月20日
- Re: [Emacs-diffs] master 2c8a7e5: Improve diff-mode navigation/manipulation , Dima Kogan, 2016年12月25日
- Re: [Emacs-diffs] master 2c8a7e5: Improve diff-mode navigation/manipulation , Tino Calancha, 2016年12月25日
- Re: [Emacs-diffs] master 2c8a7e5: Improve diff-mode navigation/manipulation , Tino Calancha, 2016年12月25日
- Re: [Emacs-diffs] master 2c8a7e5: Improve diff-mode navigation/manipulation , Dmitry Gutov, 2016年12月25日