Message from discussion
Diff could also show the changes within lines
Received: by 10.112.100.226 with SMTP id fb2mr112993lbb.16.1353230828160;
Sun, 18 Nov 2012 01:27:08 -0800 (PST)
Path: ha8ni330764wib.1!nntp.google.com!feeder2.cambriumusenet.nl!feed.tweaknews.nl!85.12.40.130.MISMATCH!xlned.com!feeder1.xlned.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!news.stack.nl!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail
From: "Sebastien Vauban" <wxhgmqzgw...@spammotel.com>
Newsgroups: gnu.emacs.help
Subject: Re: Diff could also show the changes within lines
Date: Thu, 15 Nov 2012 11:04:52 +0100
Organization: Sebastien Vauban
Lines: 49
Message-ID: <80obizp4fv.fsf@somewhere.org>
References: <loom.20121005T163605-672@post.gmane.org>
<87txu9arc8.fsf@gmail.com> <loom.20121005T165541-721@post.gmane.org>
<loom.20121005T182234-640@post.gmane.org>
<mailman.10388.1349460693.855.help-gnu-emacs@gnu.org>
<80d2zlvnos.fsf@somewhere.org>
<mailman.12687.1352561429.855.help-gnu-emacs@gnu.org>
<80vcd8l0h4.fsf@somewhere.org>
<mailman.12981.1352916228.855.help-gnu-emacs@gnu.org>
<80zk2j3kkf.fsf@somewhere.org>
<mailman.13015.1352961428.855.help-gnu-emacs@gnu.org>
Mime-Version: 1.0
Injection-Info: mx04.eternal-september.org; posting-host="368fa3c7dc5c1bbe516391bd65bd1ab2";
logging-data="6481"; mail-complaints-to="ab...@eternal-september.org"; posting-account="U2FsdGVkX18aC8qam/sDzo6HNEqHl3wg"
User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.2.50 (windows-nt)
X-Archive: encrypt
Cancel-Lock: sha1:7csN/Gt8Y5ZddAl4tWpAPdXdnRo=
sha1:vnmpAgH+f1C105+msSDYryBFcx8=
X-Url: Under construction...
Content-Type: text/plain
Hi Tom,
Tom wrote:
> Sebastien Vauban <wxhgmqzgwmuf@...> writes:
>>> Does it highlight all the hunks then?
>>
>> No, it doesn't, as you can see on http://screencast.com/t/5NHwKwF7c9h.
>>
>> What does that mean, then -- excepting that it looks coherent with what is put
>> in the hook?
>
> The diff highlighting function simply calls a builtin feature repeatedly:
>
> (goto-char (point-min))
> (while (not (eobp))
> (diff-hunk-next)))
>
> diff-hunk-next is bound to TAB, so you can try going to the diff buffer, go
> to the beginning of the buffer and start pressing TAB.
>
> Every TAB press should jump to the next hunk and highlight the diffs within
> lines in that hunk. It is done by default.
Going to the beginning of the diff buffer and hitting TAB, does indeed moves
over every hunk, in turn, and refines the differences at the same time.
> Here's the relevant code from diff-mode.el:
>
> ;; Define diff-{hunk,file}-{prev,next}
> (easy-mmode-define-navigation
> diff-hunk diff-hunk-header-re "hunk" diff-end-of-hunk diff-restrict-view
> (if diff-auto-refine-mode
> (condition-case-unless-debug nil (diff-refine-hunk) (error nil))))
>
> The last two lines show that if diff-auto-refine-mode is t (which is by
> default) then it should do the highlighting. If it doesn't the you may want
> to ask the emacs developers about it.
The variable diff-auto-refine-mode is as well t on my side. But... that does
not help.
BTW, how do you explain that your cursor is not at the end of the buffer, in
your case, after the refine process?
Best regards,
Seb
--
Sebastien Vauban