From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tom Newsgroups: gmane.emacs.help Subject: Re: Diff could also show the changes within lines Date: Thu, 15 Nov 2012 06:36:45 +0000 (UTC) Message-ID: 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; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1352961436 29502 80.91.229.3 (15 Nov 2012 06:37:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 15 Nov 2012 06:37:16 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Nov 15 07:37:26 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 1TYt4k-0000By-5R for geh-help-gnu-emacs@m.gmane.org; Thu, 15 Nov 2012 07:37:22 +0100 Original-Received: from localhost ([::1]:54121 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYt4a-0008IF-Eb for geh-help-gnu-emacs@m.gmane.org; Thu, 15 Nov 2012 01:37:12 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:49703) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYt4S-0008HI-4M for help-gnu-emacs@gnu.org; Thu, 15 Nov 2012 01:37:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TYt4P-0001WR-1e for help-gnu-emacs@gnu.org; Thu, 15 Nov 2012 01:37:04 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:37039) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYt4O-0001Vd-RI for help-gnu-emacs@gnu.org; Thu, 15 Nov 2012 01:37:00 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1TYt4U-0008SL-4G for help-gnu-emacs@gnu.org; Thu, 15 Nov 2012 07:37:06 +0100 Original-Received: from 94-21-240-180.pool.digikabel.hu ([94.21.240.180]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 15 Nov 2012 07:37:06 +0100 Original-Received: from adatgyujto by 94-21-240-180.pool.digikabel.hu with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 15 Nov 2012 07:37:06 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 37 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: sea.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 94.21.240.180 (Opera/9.80 (Windows NT 6.1) Presto/2.12.388 Version/12.10) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.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@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:87700 Archived-At: 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. 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.