+2002-01-28 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * lpath.el: Bind `w3m-cid-retrieve-function-alist' and
+ `w3m-current-buffer'.
+
+2002-01-27 TSUCHIYA Masatoshi <tsuchiya@namazu.org>
+
+ * gnus-art.el (gnus-article-wash-html-with-w3m): Handle cid: URLs.
+
+ * mm-view.el (mm-setup-w3m): Add `mm-w3m-cid-retrieve' to
+ `w3m-cid-retrieve-function-alist' for `gnus-article-mode'.
+ (mm-w3m-cid-retrieve): New function.
+ (mm-inline-text-html-render-with-w3m): Handle cid: URLs.
+
+ * lpath.el: Bind `w3m-cid-retrieve-function-alist'.
+
2002-01-27 ShengHuo ZHU <zsh@cs.rochester.edu>
* gnus-agent.el (gnus-agent-fetch-articles): Don't save empty articles.
2002-01-27 Lars Magne Ingebrigtsen <larsi@gnus.org>
- * gnus-util.el (gnus-cache-file-contents): Don't use equalp.
+ * gnus-util.el (gnus-cache-file-contents): Don't use equalp.
2002-01-26 Lars Magne Ingebrigtsen <larsi@gnus.org>
2002-01-26 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus-agent.el (gnus-agent-load-alist): Use new caching
- function.
+ function.
* gnus-util.el (gnus-cache-file-contents): New function.
* gnus-agent.el (gnus-agent-file-loading-cache): New variable.
(gnus-agent-load-alist): Use it.
- * nnagent.el (nnagent-retrieve-headers): Use optimized function.
+ * nnagent.el (nnagent-retrieve-headers): Use optimized function.
* nnheader.el (nnheader-insert-nov-file): New function.
- * gnus-util.el (gnus-parse-without-error): Correct the loop.
+ * gnus-util.el (gnus-parse-without-error): Correct the loop.
* gnus-sum.el (gnus-dependencies-add-header): Use in-reply-to if
there are no references.
(gnus-extract-message-id-from-in-reply-to): New function.
(gnus-nov-parse-line): Use in-reply-to if there are no
- references.
+ references.
2002-01-25 Lars Magne Ingebrigtsen <larsi@gnus.org>
(defun gnus-article-wash-html-with-w3m ()
"Wash the current buffer with w3m."
(mm-setup-w3m)
- (w3m-region (point) (point-max))
+ (let ((w3m-safe-url-regexp "\\`cid:"))
+ (w3m-region (point) (point-max)))
(setq mm-w3m-minor-mode t))
(defun article-hide-list-identifiers ()
rmail-enable-mime-composing
rmail-insert-mime-forwarded-message-function
w3-meta-content-type-charset-regexp
+ w3m-cid-retrieve-function-alist w3m-current-buffer
w3m-meta-content-type-charset-regexp w3m-mode-map))
(if (featurep 'xemacs)
(defun mm-setup-w3m ()
(unless mm-w3m-setup
(require 'w3m)
+ (unless (assq 'gnus-article-mode w3m-cid-retrieve-function-alist)
+ (push (cons 'gnus-article-mode 'mm-w3m-cid-retrieve)
+ w3m-cid-retrieve-function-alist))
(gnus-add-minor-mode 'mm-w3m-minor-mode " w3m" w3m-mode-map)
(setq mm-w3m-setup t)))
+(defun mm-w3m-cid-retrieve (url &rest args)
+ (when (string-match "\\`cid:" url)
+ (setq url (concat "<" (substring url (match-end 0)) ">"))
+ (catch 'found-handle
+ (dolist (handle (with-current-buffer w3m-current-buffer
+ gnus-article-mime-handles))
+ (when (and (listp handle)
+ (equal url (mm-handle-id handle)))
+ (mm-insert-part handle)
+ (throw 'found-handle (mm-handle-media-type handle)))))))
+
(defun mm-inline-text-html-render-with-w3m (handle)
(mm-setup-w3m)
(let ((text (mm-get-part handle))
(when charset
(delete-region (point-min) (point-max))
(insert (mm-decode-string text charset)))
- (w3m-region (point-min) (point-max))
+ (let ((w3m-safe-url-regexp "\\`cid:"))
+ (w3m-region (point-min) (point-max)))
(setq mm-w3m-minor-mode t))
(mm-handle-set-undisplayer
handle