From 62c4fff6cd661ebcb053485a20e6a457ec1741bd Mon Sep 17 00:00:00 2001 From: Ulf Jasper Date: Mon, 25 Aug 2008 17:41:16 +0000 Subject: [PATCH] Added newsticker-browse-url-item. --- lisp/net/newst-reader.el | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/lisp/net/newst-reader.el b/lisp/net/newst-reader.el index bed8b8f2a97..d364e973f2d 100644 --- a/lisp/net/newst-reader.el +++ b/lisp/net/newst-reader.el @@ -6,7 +6,7 @@ ;; Author: Ulf Jasper ;; Filename: newst-reader.el ;; URL: http://www.nongnu.org/newsticker -;; Time-stamp: "15. Juni 2008, 09:42:01 (ulf)" +;; Time-stamp: "25. August 2008, 19:35:45 (ulf)" ;; ====================================================================== @@ -1152,6 +1152,32 @@ static char * visit_xpm[] = { 'xpm t)) "Image for the browse button.") +(defun newsticker-browse-url-item (feed item) + "Convert FEED ITEM to html and call `browse-url' on result." + (interactive) + (let ((t-file (make-temp-file "newsticker"))) + (with-temp-file t-file + (insert " + + + ") + (insert "

" feed ": " (newsticker--title item) "

") + (insert (format-time-string newsticker-date-format + (newsticker--time item))) + (insert "
") + (insert (or (newsticker--desc item) "[No Description]")) + (when (newsticker--enclosure item) + (insert "

") + (newsticker--insert-enclosure item nil) + (insert "")) + (when (newsticker--extra item) + (insert "

") + (newsticker--print-extra-elements item nil) + (insert "")) + (insert "")) + (browse-url t-file))) + (provide 'newsticker-reader) ;; arch-tag: c604b701-bdf1-4fc1-8d05-5fabd1939533 -- 2.39.5