From b800512bf0ac940395e8c210c0e9adb11b300346 Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Thu, 1 May 2003 07:54:28 +0000 Subject: [PATCH] 2003-04-30 Mark A. Hershberger * mm-url.el (mm-url-insert-file-contents): set url-current-object in the case where mm-url-use-external is set. * nnrss.el (nnrss-request-article): Change the messages created to multipart/alternative. Hopefully fixes a problem interaction with w3m. (nnrss-find-rss-via-syndic8): Better handling if xml-rpc.el isn't around. --- lisp/ChangeLog | 11 +++++++++++ lisp/mm-url.el | 3 +++ lisp/nnrss.el | 42 +++++++++++++++++++++++++++++------------- 3 files changed, 43 insertions(+), 13 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 20b6b437a..879fe94ff 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,14 @@ +2003-04-30 Mark A. Hershberger + + * mm-url.el (mm-url-insert-file-contents): set url-current-object + in the case where mm-url-use-external is set. + + * nnrss.el (nnrss-request-article): Change the messages created to + multipart/alternative. Hopefully fixes a problem interaction with + w3m. + (nnrss-find-rss-via-syndic8): Better handling if xml-rpc.el isn't + around. + 2003-05-01 Lars Magne Ingebrigtsen * message.el (message-check-news-header-syntax): Alter "posting" diff --git a/lisp/mm-url.el b/lisp/mm-url.el index f74e7ac47..5fb925e05 100644 --- a/lisp/mm-url.el +++ b/lisp/mm-url.el @@ -279,6 +279,9 @@ This is taken from RFC 2396.") (insert-file-contents (substring url (1- (match-end 0)))) (mm-url-insert-file-contents-external url)) (goto-char (point-min)) + (if (fboundp 'url-generic-parse-url) + (setq url-current-object + (url-generic-parse-url url))) (list url (buffer-size))) (mm-url-load-url) (let ((name buffer-file-name) diff --git a/lisp/nnrss.el b/lisp/nnrss.el index f3fdcbf8d..fa6232c8f 100644 --- a/lisp/nnrss.el +++ b/lisp/nnrss.el @@ -142,6 +142,7 @@ ARTICLE is the article number of the current headline.") (deffoo nnrss-request-article (article &optional group server buffer) (nnrss-possibly-change-group group server) (let ((e (assq article nnrss-group-data)) + (boundary "=-=-=-=-=-=-=-=-=-") (nntp-server-buffer (or buffer nntp-server-buffer)) post err) (when e @@ -149,7 +150,7 @@ ARTICLE is the article number of the current headline.") (with-current-buffer nntp-server-buffer (erase-buffer) (goto-char (point-min)) - (insert "Mime-Version: 1.0\nContent-Type: text/html\n") + (insert "Mime-Version: 1.0\nContent-Type: multipart/alternative; boundary=\"" boundary "\"\n") (if group (insert "Newsgroups: " group "\n")) (if (nth 3 e) @@ -160,17 +161,32 @@ ARTICLE is the article number of the current headline.") (insert "Date: " (nnrss-format-string (nth 5 e)) "\n")) (insert "Message-ID: " (format "<%d@%s.nnrss>" (car e) group) "\n") (insert "\n") - (if (nth 6 e) - (let ((point (point))) - (insert (nnrss-string-as-multibyte (nth 6 e))) - (goto-char point) - (while (re-search-forward "\n" nil t) - (replace-match " ")) - (goto-char (point-max)) - (insert "\n\n") - (fill-region point (point)))) - (if (nth 2 e) - (insert "

link

\n")) + (let ((text (if (nth 6 e) + (nnrss-string-as-multibyte (nth 6 e)))) + (link (if (nth 2 e) + (nth 2 e)))) + (insert "\n\n--" boundary "\nContent-Type: text/plain\n\n") + (let ((point (point))) + (if text + (progn (insert text) + (goto-char point) + (while (re-search-forward "\n" nil t) + (replace-match " ")) + (goto-char (point-max)) + (insert "\n\n"))) + (if link + (insert link))) + (insert "\n\n--" boundary "\nContent-Type: text/html\n\n") + (let ((point (point))) + (if text + (progn (insert "\n" text "\n") + (goto-char point) + (while (re-search-forward "\n" nil t) + (replace-match " ")) + (goto-char (point-max)) + (insert "\n\n"))) + (if link + (insert "

link

\n")))) (if nnrss-content-function (funcall nnrss-content-function e group article))))) (cond @@ -668,7 +684,7 @@ whether they are `offsite' or `onsite'." (defun nnrss-find-rss-via-syndic8 (url) "query syndic8 for the rss feeds it has for the url." - (condition-case nil + (if (locate-library "xml-rpc") (progn (require 'xml-rpc) (let ((feedid (xml-rpc-method-call "http://www.syndic8.com/xmlrpc.php" -- 2.25.1