From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Pogonyshev Newsgroups: gmane.emacs.bugs Subject: bug#18128: Diff-mode doesn't refine hunks automatically Date: Mon, 28 Jul 2014 16:49:36 +0200 Message-ID: References: <83d2cph81y.fsf@gnu.org> <83bns9h7aj.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e0158b09e2c72dc04ff420879 X-Trace: ger.gmane.org 1406559026 23456 80.91.229.3 (28 Jul 2014 14:50:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 28 Jul 2014 14:50:26 +0000 (UTC) Cc: 18128@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jul 28 16:50:18 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XBmFm-0002WW-HD for geb-bug-gnu-emacs@m.gmane.org; Mon, 28 Jul 2014 16:50:18 +0200 Original-Received: from localhost ([::1]:40119 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XBmFl-0002W0-SY for geb-bug-gnu-emacs@m.gmane.org; Mon, 28 Jul 2014 10:50:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49401) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XBmFc-0002Sq-Uw for bug-gnu-emacs@gnu.org; Mon, 28 Jul 2014 10:50:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XBmFX-0003jp-9q for bug-gnu-emacs@gnu.org; Mon, 28 Jul 2014 10:50:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45649) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XBmFX-0003j6-7J for bug-gnu-emacs@gnu.org; Mon, 28 Jul 2014 10:50:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XBmFW-00052Z-H3 for bug-gnu-emacs@gnu.org; Mon, 28 Jul 2014 10:50:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Pogonyshev Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 28 Jul 2014 14:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18128 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18128-submit@debbugs.gnu.org id=B18128.140655899319350 (code B ref 18128); Mon, 28 Jul 2014 14:50:02 +0000 Original-Received: (at 18128) by debbugs.gnu.org; 28 Jul 2014 14:49:53 +0000 Original-Received: from localhost ([127.0.0.1]:40915 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XBmFI-00051x-Eu for submit@debbugs.gnu.org; Mon, 28 Jul 2014 10:49:52 -0400 Original-Received: from mail-oa0-f49.google.com ([209.85.219.49]:58474) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XBmFC-00051f-H8 for 18128@debbugs.gnu.org; Mon, 28 Jul 2014 10:49:46 -0400 Original-Received: by mail-oa0-f49.google.com with SMTP id eb12so8668715oac.8 for <18128@debbugs.gnu.org>; Mon, 28 Jul 2014 07:49:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=51HyWStphBCoEeqOjfAJwFSPu/xtJGkNCWxtElL/iNQ=; b=Btst8hnH0XQiGuzz7ffWk465SsEC21gk3AigiBUI3krqAwHZ/95sn30rrR3ynrTQNt sQ30hySg/PsMBFo49ds8LjzjvcfoJNFG9KASll/OXdYuYOWyiuYUph5BLvI+3s/avJz/ fJPc28JnIo0QH/brAu1YIw89ri4hCPzG/FEYCSdIQjU6j3ZwvtN0ydCvDOT2Kj9Ys0/m OqYWOxqnOo0f1aObH9Onrf9SYsx4gdldqTJyE4g1WbXhKqvOzhE7U1V0Y3jb6/dX3tDV YXm/KdIG5XZHhtsDMx4HW6/2W1pz0/7WpO6aXNj/A4kOJKMqYVqAFBpLhRoECjdZ4PCu 8vQQ== X-Received: by 10.182.28.66 with SMTP id z2mr50818301obg.19.1406558976896; Mon, 28 Jul 2014 07:49:36 -0700 (PDT) Original-Received: by 10.182.162.67 with HTTP; Mon, 28 Jul 2014 07:49:36 -0700 (PDT) In-Reply-To: <83bns9h7aj.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:91890 Archived-At: --089e0158b09e2c72dc04ff420879 Content-Type: text/plain; charset=UTF-8 I'd like hunks to be refined regardless of the way I move around the file. E.g. if I chose to page-up through uninteresting parts of the diff, auto-refinining shouldn't stop. Paul On 28 July 2014 16:44, Eli Zaretskii wrote: > > Date: Mon, 28 Jul 2014 16:39:56 +0200 > > From: Paul Pogonyshev > > Cc: 18128@debbugs.gnu.org > > > > It is enough. Then please add a reference to it to documentation of > > diff-refine-hunk, I wasn't even aware of that mode. > > It is currently mentioned there as follows: > > `M-n' > Move to the next hunk-start (`diff-hunk-next'). > > This command has a side effect: it "refines" the hunk you move to, > highlighting its changes with better granularity. To disable this > feature, type `M-x diff-auto-refine-mode' to toggle off the minor > mode Diff Auto-Refine mode. To disable Diff Auto Refine mode by > default, add this to your init file (*note Hooks::): > > (add-hook 'diff-mode-hook > (lambda () (diff-auto-refine-mode -1))) > > If you think this is not enough, please tell what else would you like > to see there about this minor mode. > --089e0158b09e2c72dc04ff420879 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I'd like hunks to be refined regardless of the wa= y I move around the file. E.g. if I chose to page-up through uninteresting = parts of the diff, auto-refinining shouldn't stop.

Paul


On 28 J= uly 2014 16:44, Eli Zaretskii <eliz@gnu.org> wrote:
> Date: Mon, 28 Jul 2014 16:39:56 +0200
> From: Paul Pogonyshev <pogo= nyshev@gmail.com>
> Cc: 18128@debbugs.gnu.org=
>
> It is enough. Then please add a reference to it to documentation of > diff-refine-hunk, I wasn't even aware of that mode.

It is currently mentioned there as follows:

=C2=A0 =C2=A0`M-n'
=C2=A0 =C2=A0 =C2=A0 =C2=A0 Move to the next hunk-start (`diff-hunk-next= 9;).

=C2=A0 =C2=A0 =C2=A0 =C2=A0 This command has a side effect: it "refine= s" the hunk you move to,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 highlighting its changes with better granularit= y. =C2=A0To disable this
=C2=A0 =C2=A0 =C2=A0 =C2=A0 feature, type `M-x diff-auto-refine-mode' t= o toggle off the minor
=C2=A0 =C2=A0 =C2=A0 =C2=A0 mode Diff Auto-Refine mode. =C2=A0To disable Di= ff Auto Refine mode by
=C2=A0 =C2=A0 =C2=A0 =C2=A0 default, add this to your init file (*note Hook= s::):

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(add-hook 'diff-mode-ho= ok
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0(lambda () (diff-auto-refine-mode -1)))

If you think this is not enough, please tell what else would you like
to see there about this minor mode.

--089e0158b09e2c72dc04ff420879--