info-gnus-english
[Top][All Lists]
Advanced

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

Re: Preprocessing message contents before displaying


From: Sean McAfee
Subject: Re: Preprocessing message contents before displaying
Date: Thu, 15 Mar 2012 13:27:15 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

I wrote:
> So, what I'd like to do is tell Gnus that messages from this co-worker
> should be passed through a custom filter before being rendered, so I can
> remove all these confounding <p> tags and use <br> tags to break lines
> instead.

Finally had some time to investigate further, but so far no luck getting
at the unwashed HTML content.

The first thing I tried was essentially this:

  (add-hook 'gnus-part-display-hook 
            (lambda () (article-goto-body) (show-buffer-content)))

show-buffer-content is shorthand for slightly more extensive code that
just saves the content of the visible region of the current buffer in a
newly-created buffer for me to inspect.  Unfortunately, this content is
still the HTML-washed version of the content, not the original HTML
content.  This seems strange, because when I look at the source code to
gnus-treat-article, gnus-part-display-hook is run BEFORE
gnus-treat-function-alist is trasversed and gnus-article-wash-html is
called.

The next thing I tried was:

  (setq gnus-article-wash-function (lambda () t))

>From looking at the source it seems that this should completely bypass
the normal HTML-washing process, but my HTML messages are still being
rendered just as before, as if nothing had changed.

Anyone have any ideas?


reply via email to

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