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:01:15 +0100 Organization: Sebastien Vauban Message-ID: <86ioscheh0.fsf@somewhere.org> References: <86y51mx3x2.fsf@somewhere.org> <867g930xoz.fsf@somewhere.org> <86vbwcloke.fsf@somewhere.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1392721520 28245 80.91.229.3 (18 Feb 2014 11:05:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 18 Feb 2014 11:05:20 +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:29 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 1WFiUS-0007iJ-Fm for geh-help-gnu-emacs@m.gmane.org; Tue, 18 Feb 2014 12:05:28 +0100 Original-Received: from localhost ([::1]:48166 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFiUS-0002En-35 for geh-help-gnu-emacs@m.gmane.org; Tue, 18 Feb 2014 06:05:28 -0500 Original-Path: usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!rt.uk.eu.org!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 48 Injection-Info: mx05.eternal-september.org; posting-host="402b34550bd938aa98825778083dce0e"; logging-data="5906"; mail-complaints-to="abuse-VVbKFVtnif8H+i2N2EyTrmui9UKz+5OX@public.gmane.org"; posting-account="U2FsdGVkX185L+Egbh1KXLjV8BofsFIv" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (windows-nt) X-Archive: encrypt Cancel-Lock: sha1:sx/ZMVkmJnRkjLvDIwKuIunG7b8= sha1:NhuKUvkmzfXwcY6UPMf+BSUzQbY= X-Url: Under construction... Original-Xref: usenet.stanford.edu gnu.emacs.help:203841 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:96110 Archived-At: "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): --8<---------------cut here---------------start------------->8--- ;; regexp matching diff groups (setq mm-uu-diff-groups-regexp ".*") --8<---------------cut here---------------end--------------->8--- Though, with your above suggestion, those mails aren't auto-refined... I tried adding the following: --8<---------------cut here---------------start------------->8--- (add-hook 'gnus-article-mode-hook 'my--diff-make-fine-diffs-if-necessary) --8<---------------cut here---------------end--------------->8--- but it doesn't help. Any other excellent idea? Best regards, Seb -- Sebastien Vauban