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: Wed, 19 Feb 2014 12:08:44 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (windows-nt)

Michael Heerdegen wrote:
> Sebastien Vauban writes:
>
>> > That's good.  Then try adding it to `gnus-article-prepare-hook'.
>>
>> I was full of "excitement" but, nope, it isn't that one... That does
>> not help.
>
> Mmh, I'm no Gnus expert, I hoped that would do it.  Maybe you can find
> a better place when reading the sources?  Maybe an after advice for
> `gnus-summary-show-article' works.  Again, just guessing.

This:

--8<---------------cut here---------------start------------->8---
    (advice-add
     'gnus-summary-show-article :after
     (lambda (&rest _)
       (my--diff-make-fine-diffs-if-necessary)))
--8<---------------cut here---------------end--------------->8---

did not work either.

> In any case, the ugly solution of using an idle timer should always
> work.  Not very cool, but also not worse than doing it manually.

If you're talking of things such as:

--8<---------------cut here---------------start------------->8---
    (add-hook 'gnus-article-prepare-hook
              (lambda ()
                (run-at-time 0.0 nil 'my--diff-make-fine-diffs-if-necessary)))

    (add-hook 'gnus-article-mode-hook
              (lambda ()
                (run-at-time 0.0 nil 'my--diff-make-fine-diffs-if-necessary)))
--8<---------------cut here---------------end--------------->8---

I've tried them both with no success either...

One question I've for the last 2 cases is "where is point?" when those
functions are run?  If they're in the summary buffer, no luck for me, or
will it be moved to the buffer where the hook is supposed to be applied?

Thanks for your help!

Best regards,
  Seb

-- 
Sebastien Vauban


reply via email to

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