From: D. Goel <deego@glue.umd.edu>
Subject: Re: html mail filter in gnus
Date: 18 Sep 2002 16:07:32 -0400 [thread overview]
Message-ID: <87hegnjc3f.fsf@computer.localdomain> (raw)
In-Reply-To: 7ifzw8tp5z.fsf@neoscale.com
> 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)
)))
(And of course, after that, to see the actual html mail in lynx
itself, you can always type "lynx ~/tmp/email.html" on a term once
gnus has put it there.. in fact
alias browseemail='lynx ~/tmp/email.html'
or
alias browseemail='w3m ~/tmp/email.html'
)
next prev parent reply other threads:[~2002-09-18 20:07 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-17 19:02 html mail filter in gnus Kin Cho
2002-09-17 22:16 ` James Cozine
2002-09-18 6:38 ` Ichimusai
2002-09-18 8:38 ` Kai Großjohann
2002-09-18 8:57 ` Jonas Steverud
2002-09-18 20:07 ` D. Goel [this message]
2002-09-19 20:28 ` Kin Cho
2002-09-19 20:58 ` D. Goel
2002-09-19 21:00 ` D. Goel
2002-09-20 15:17 ` Nils Goesche
2002-09-20 16:45 ` D. Goel
2002-09-20 17:59 ` Nils Goesche
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87hegnjc3f.fsf@computer.localdomain \
--to=deego@glue.umd.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.