* lpath.el: Bind `w3m-cid-retrieve-function-alist'.
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.
+2002-01-28 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * lpath.el: Bind `w3m-cid-retrieve-function-alist'.
+
+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.
+
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>
:type 'string
:group 'mime-security)
-(defcustom gnus-article-wash-function
+(defcustom gnus-article-wash-function
(cond ((locate-library "w3")
'gnus-article-wash-html-with-w3)
((locate-library "w3m")
(defun gnus-article-treat-body-boundary ()
"Place a boundary line at the end of the headers."
(interactive)
- (when (and gnus-body-boundary-delimiter
+ (when (and gnus-body-boundary-delimiter
(> (length gnus-body-boundary-delimiter) 0))
(gnus-with-article-headers
(goto-char (point-max))
(when (and wash-face-p
(progn
(goto-char (point-min))
- (not (re-search-forward
+ (not (re-search-forward
"^X-Face\\(-[0-9]+\\)?:[\t ]*" nil t)))
(gnus-buffer-live-p gnus-original-article-buffer))
;; If type `W f', use gnus-original-article-buffer,
(when xpm
(setq image (gnus-create-image xpm 'xpm t))
(gnus-article-goto-header "from")
- (when (bobp)
+ (when (bobp)
(insert "From: [no `from' set]\n")
(forward-char -17))
(gnus-add-wash-type 'xface)
(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 ()
"Remove list identifies from the Subject header.
The `gnus-list-identifiers' variable specifies what to do."
(gnus-cache-request-article article group))
'article)
;; Check the agent cache.
- ((and gnus-agent gnus-agent-cache gnus-plugged
+ ((and gnus-agent gnus-agent-cache gnus-plugged
(numberp article)
(gnus-agent-request-article article group))
'article)
(gnus-eval-format
gnus-prev-page-line-format nil
`(,@(gnus-local-map-property gnus-prev-page-map)
- gnus-prev t
+ gnus-prev t
gnus-callback gnus-article-button-prev-page
article-type annotation))
(widget-convert-button
(buffer-read-only nil))
(gnus-eval-format gnus-next-page-line-format nil
`(,@(gnus-local-map-property gnus-next-page-map)
- gnus-next t
+ gnus-next t
gnus-callback gnus-article-button-next-page
article-type annotation))
(widget-convert-button
rmail-enable-mime-composing
rmail-insert-mime-forwarded-message-function
w3-meta-content-type-charset-regexp
+ w3m-current-buffer w3m-cid-retrieve-function-alist
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