[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Diff could also show the changes within lines

From: Sebastien Vauban
Subject: Re: Diff could also show the changes within lines
Date: Tue, 18 Feb 2014 12:02:43 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (windows-nt)

"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

Best regards,

Sebastien Vauban

reply via email to

[Prev in Thread] Current Thread [Next in Thread]