From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Sebastien Vauban" Newsgroups: gmane.emacs.help Subject: Re: Diff could also show the changes within lines Date: Thu, 15 Nov 2012 11:04:52 +0100 Organization: Sebastien Vauban Message-ID: <80obizp4fv.fsf@somewhere.org> References: <87txu9arc8.fsf@gmail.com> <80d2zlvnos.fsf@somewhere.org> <80vcd8l0h4.fsf@somewhere.org> <80zk2j3kkf.fsf@somewhere.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1352973918 29326 80.91.229.3 (15 Nov 2012 10:05:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 15 Nov 2012 10:05:18 +0000 (UTC) To: help-gnu-emacs-mXXj517/zsQ@public.gmane.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Thu Nov 15 11:05:29 2012 Return-path: Envelope-to: geh-help-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 1TYwK4-0006tQ-I0 for geh-help-gnu-emacs@m.gmane.org; Thu, 15 Nov 2012 11:05:24 +0100 Original-Received: from localhost ([::1]:52637 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYwJu-0007oH-F0 for geh-help-gnu-emacs@m.gmane.org; Thu, 15 Nov 2012 05:05:14 -0500 Original-Path: usenet.stanford.edu!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 49 Injection-Info: mx04.eternal-september.org; posting-host="368fa3c7dc5c1bbe516391bd65bd1ab2"; logging-data="6481"; mail-complaints-to="abuse-VVbKFVtnif8H+i2N2EyTrmui9UKz+5OX@public.gmane.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... Original-Xref: usenet.stanford.edu gnu.emacs.help:195380 X-BeenThere: help-gnu-emacs-mXXj517/zsQ@public.gmane.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Xref: news.gmane.org gmane.emacs.help:87703 Archived-At: Hi Tom, Tom wrote: > Sebastien Vauban 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