help-gnu-emacs
[Top][All Lists]
Advanced

[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:01:15 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (windows-nt)

"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


reply via email to

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