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: Fri, 16 Nov 2012 16:24:38 +0000 (UTC) Message-ID: References: <87txu9arc8.fsf@gmail.com> <80d2zlvnos.fsf@somewhere.org> <80vcd8l0h4.fsf@somewhere.org> <80zk2j3kkf.fsf@somewhere.org> <80obizp4fv.fsf@somewhere.org> <808va3p0ia.fsf@somewhere.org> <80d2zej3kd.fsf@somewhere.org> <80lie2vigu.fsf@somewhere.org> <80a9uift32.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 1353083102 13248 80.91.229.3 (16 Nov 2012 16:25:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 16 Nov 2012 16:25:02 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Nov 16 17:25:13 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 1TZOjB-0004hh-8v for geh-help-gnu-emacs@m.gmane.org; Fri, 16 Nov 2012 17:25:13 +0100 Original-Received: from localhost ([::1]:48118 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TZOj0-0005kb-Va for geh-help-gnu-emacs@m.gmane.org; Fri, 16 Nov 2012 11:25:02 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:59469) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TZOis-0005kG-Km for help-gnu-emacs@gnu.org; Fri, 16 Nov 2012 11:24:57 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TZOip-00022z-IF for help-gnu-emacs@gnu.org; Fri, 16 Nov 2012 11:24:54 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:33550) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TZOip-00022o-C7 for help-gnu-emacs@gnu.org; Fri, 16 Nov 2012 11:24:51 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1TZOiw-0004Ol-Le for help-gnu-emacs@gnu.org; Fri, 16 Nov 2012 17:24:58 +0100 Original-Received: from 94-21-239-158.pool.digikabel.hu ([94.21.239.158]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 16 Nov 2012 17:24:58 +0100 Original-Received: from adatgyujto by 94-21-239-158.pool.digikabel.hu with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 16 Nov 2012 17:24:58 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 42 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.239.158 (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:87720 Archived-At: Sebastien Vauban writes: > > Yep! This does work perfectly: all hunks refined, and pointer at beginning of > buffer... > > Thanks a lot for your more than precious help! > No problem. I'll also need it when I upgrade emacs, so I helped my future self as well. :) BTW, highlighting within the lines is helpful in most of the cases, but sometimes when the diff is very convoluted it can get in the way. To remedy this I added a key (f7) which when pressed in the diff buffer toggles the in-line highlight on and off. I put it here in case someone else also finds it useful: (add-hook 'diff-mode-hook 'my-diff-stuff) (setq my-diff-refine-change-color "yellow1") (defun my-toggle-diff-refine-change-color() (interactive) (if (face-background 'diff-refine-change) (set-face-background 'diff-refine-change nil) (set-face-background 'diff-refine-change my-diff-refine-change-color))) (defun my-diff-stuff () (set-face-background 'diff-refine-change my-diff-refine-change-color) (local-set-key (kbd "") 'my-toggle-diff-refine-change-color) (unless (or (eq this-command 'dvc-diff) (eq this-command 'dvc-generic-refresh) (> (buffer-size) 20000)) (my-refine-all-diff-hunks)))