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: Tue, 18 Feb 2014 12:02:43 +0100 Organization: Sebastien Vauban Message-ID: <86eh30heek.fsf@somewhere.org> References: <86y51mx3x2.fsf@somewhere.org> <867g930xoz.fsf@somewhere.org> <86vbwcloke.fsf@somewhere.org> <86ioscheh0.fsf@somewhere.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1392721518 28231 80.91.229.3 (18 Feb 2014 11:05:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 18 Feb 2014 11: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 Tue Feb 18 12:05:27 2014 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 1WFiUP-0007eK-HK for geh-help-gnu-emacs@m.gmane.org; Tue, 18 Feb 2014 12:05:25 +0100 Original-Received: from localhost ([::1]:48165 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFiUP-0002Dw-2A for geh-help-gnu-emacs@m.gmane.org; Tue, 18 Feb 2014 06:05:25 -0500 Original-Path: usenet.stanford.edu!goblin3!goblin2!goblin.stu.neva.ru!news.stack.nl!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 47 Injection-Info: mx05.eternal-september.org; posting-host="402b34550bd938aa98825778083dce0e"; logging-data="5906"; mail-complaints-to="abuse-VVbKFVtnif8H+i2N2EyTrmui9UKz+5OX@public.gmane.org"; posting-account="U2FsdGVkX1+L+3erWkg+2JeQShcWoaoP" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (windows-nt) X-Archive: encrypt Cancel-Lock: sha1:taPr8lzA011o3LL6uP5LPByGIyg= sha1:5p1s5xuoZHbsvjAY+/GMvOpEflY= X-Url: Under construction... Original-Xref: usenet.stanford.edu gnu.emacs.help:203842 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:96109 Archived-At: "Sebastien Vauban" wrote: > "Sebastien Vauban" wrote: >> Michael Heerdegen wrote: >>> "Sebastien Vauban" writes: >>> >>>> Weirdly enough, [my-diff-make-fine-diffs] does not work when done >>>> automatically, well when done interactively... >>> >>> My guess is that diff-mode-hook is not a good place to push your >>> function to. Maybe it is called too early, and the effect is somehow >>> reverted later. You may try something like >>> >>> (advice-add >>> 'vc-diff :after >>> (lambda (&rest _) >>> (my--diff-make-fine-diffs-if-necessary))) >>> >>> I wonder if that work's. >> >> Well, that does work! Thanks a lot... That's something very >> handy... (that everybody should have IMO)... > > I now tried to get that as well in Gnus emails. I often receive emails > with Diffs inside them, and they're correctly highlighted (thanks to > some Gnus black magic): > > ;; regexp matching diff groups > (setq mm-uu-diff-groups-regexp ".*") > > Though, with your above suggestion, those mails aren't auto-refined... > > I tried adding the following: > > (add-hook 'gnus-article-mode-hook > 'my--diff-make-fine-diffs-if-necessary) > > but it doesn't help. Needless to say (but it's better to be stated ;-)): the auto-refine of Diffs in emails works when calling my--diff-make-fine-diffs-if-necessary interactively... Best regards, Seb -- Sebastien Vauban