[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: html mail filter in gnus
From: |
Kin Cho |
Subject: |
Re: html mail filter in gnus |
Date: |
19 Sep 2002 13:28:27 -0700 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
D. Goel <deego@glue.umd.edu> writes:
> > Hi,
> >
> > I'm getting html mail quite often now and it's getting annoying.
> > Does anyone has a gnus filter to filter out the html tags and
> > leave the plain text behind?
>
>
> this shows you the lynxed mail.. this got into my .gnus from an
> earlier post in g.e.gnus --->
>
>
> ;; function to call to handle text/html attachments
> (defun my:gnus-html2text (handle)
> (let (text)
> (with-temp-buffer
> (mm-insert-part handle)
> (save-window-excursion
> (my:html2text-region (point-min) (point-max))
> (setq text (buffer-string))))
> (mm-insert-inline handle text)))
>
> (defun my:html2text-region (min max)
> "Replace the HTML region from MIN to MAX with lynx --dump."
> (interactive "r")
> (let ((file "~/tmp/email.html"))
> (unwind-protect
> (progn
> (write-region min max file)
> (delete-region min max)
> (insert (shell-command-to-string
> (concat "lynx "
> "lynx -dump "
> (shell-quote-argument
> (expand-file-name file))))))
> ;;(delete-file file)
> )))
Hi,
This approach seems to best fit my need. How do you hook
my:gnus-html2text into gnus so that it is run automatically on
html mail?
Thanks.
-kin
- html mail filter in gnus, Kin Cho, 2002/09/17
- Re: html mail filter in gnus, James Cozine, 2002/09/17
- Re: html mail filter in gnus, Kai Großjohann, 2002/09/18
- Re: html mail filter in gnus, Jonas Steverud, 2002/09/18
- Re: html mail filter in gnus, D . Goel, 2002/09/18
- Re: html mail filter in gnus,
Kin Cho <=
- Re: html mail filter in gnus, D . Goel, 2002/09/19
- Re: html mail filter in gnus, D . Goel, 2002/09/19
- Re: html mail filter in gnus, Nils Goesche, 2002/09/20
- Re: html mail filter in gnus, D . Goel, 2002/09/20
- Re: html mail filter in gnus, Nils Goesche, 2002/09/20