[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
rss feeds
From: |
Marko Lerota |
Subject: |
rss feeds |
Date: |
Mon, 26 Jul 2004 15:53:49 +0200 |
User-agent: |
Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Reasonable Discussion, berkeley-unix) |
I want to read my rss feeds in gnus, not any other external
program (mozilla, firefox).
Is it possible to hack this with -dump option in links or lynx?
Hrvoje Niksic used simular hack for displaying html mail
here it is:
(eval-after-load "mm-decode"
'(push '("text/html"
my-html-handler
(lambda (handle) t))
mm-inline-media-tests))
(defun my-html-handler (handle)
(let ((source (mm-get-part handle))
(tmpfile (make-temp-name "/tmp/tralala"))
text)
(with-temp-buffer
(insert source)
(write-region (point-min) (point-max) tmpfile nil 'silent)
(delete-region (point-min) (point-max))
(unwind-protect
;; It would be nice if we could use `call-process-region' to
;; feed the HTML to links's stdin thus avoiding the tmpfile.
;; But `links -dump /dev/stdin' doesn't work when stdin is a
;; pipe.
(call-process "links" nil t nil "-dump" tmpfile)
(delete-file tmpfile))
;; Delete the annoying three spaces preceding each line of links
;; output.
(goto-char (point-min))
(while (re-search-forward "^ " nil t)
(delete-region (match-beginning 0) (match-end 0)))
(setq text (buffer-string)))
(mm-insert-inline handle text)))
--
/\ _
============/ \=========/\=======/\-------------/ \---------
/ \ _/ \/\ / \ /\ / \
/ \ _-~ \_/ \ \ _-~ \
/ \/ \ / \
#/o
@<, PGP http://www.softnet.hr/mlerota/public_key.asc
_____/_\_____________________________________________________
One cannot sell the earth upon which the people walk
Tacunka Witco
- rss feeds,
Marko Lerota <=