+2002-02-18 Paul Jarc <prj@po.cwru.edu>
+
+ * gnus-util.el (gnus-parent-id): Ignore trailing whitespace in the
+ References header field. From Mark Thomas <mthomas@cmu.edu>.
+
+2002-02-18 ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ * mm-view.el (mm-inline-render-with-file): With unibyte buffer.
+ (mm-inline-render-with-stdin): Ditto.
+ (mm-inline-render-with-function): Ditto.
+ (mm-inline-wash-with-file): Bind coding-system-for-write.
+ (mm-inline-wash-with-stdin): Ditto.
+
+2002-02-18 ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ Suggested by Felix Natter <fnatter@gmx.net>
+
+ * gnus-art.el (gnus-mime-view-part-externally): Rename from
+ gnus-mime-externalize-view.
+ (gnus-mime-view-part-internally): Rename from
+ gnus-mime-internalize-view.
+ (gnus-article-view-part-externally): Rename from
+ gnus-article-externalize-part.
+ (gnus-mime-action-alist): Change correspondingly.
+ (gnus-mime-button-commands): Ditto.
+ (gnus-mime-action-alist): Remove duplication.
+
+ * gnus-sum.el (gnus-summary-mime-map): Change correspondingly.
+
+2002-02-18 ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ * mm-decode.el (mm-dissect-buffer): Add loose-mime parameter.
+
+ * gnus-art.el (gnus-display-mime): Use it.
+
+ * mm-partial.el (mm-partial-find-parts): Use it.
+
+ * gnus-sum.el (gnus-article-loose-mime): Rename from
+ gnus-article-no-strict-mime.
+ (gnus-summary-save-parts): Use it.
+
2002-02-18 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-fun.el (gnus-convert-gray-x-face-to-xpm): Remove unused
- local varriable.
+ local variable.
* gnus-art.el (article-display-x-face): Don't sort multiple
X-Faces.
("toggle display" . gnus-article-press-button)
("toggle display" . gnus-article-view-part-as-charset)
("view as type" . gnus-mime-view-part-as-type)
- ("internalize type" . gnus-mime-internalize-part)
- ("externalize type" . gnus-mime-externalize-part))
+ ("view internally" . gnus-mime-view-part-internally)
+ ("view externally" . gnus-mime-view-part-externally))
"An alist of actions that run on the MIME attachment."
:group 'gnus-article-mime
:type '(repeat (cons (string :tag "name")
(function))))
-(defcustom gnus-mime-action-alist
- '(("save to file" . gnus-mime-save-part)
- ("display as text" . gnus-mime-inline-part)
- ("view the part" . gnus-mime-view-part)
- ("pipe to command" . gnus-mime-pipe-part)
- ("toggle display" . gnus-article-press-button)
- ("view as type" . gnus-mime-view-part-as-type)
- ("internalize type" . gnus-mime-internalize-part)
- ("externalize type" . gnus-mime-externalize-part))
- "An alist of actions that run on the MIME attachment."
- :version "21.1"
- :group 'gnus-article-mime
- :type '(repeat (cons (string :tag "name")
- (function))))
-
;;;
;;; The treatment variables
;;;
(gnus-mime-save-part-and-strip "\C-o" "Save and Strip")
(gnus-mime-copy-part "c" "View As Text, In Other Buffer")
(gnus-mime-inline-part "i" "View As Text, In This Buffer")
- (gnus-mime-internalize-part "E" "View Internally")
- (gnus-mime-externalize-part "e" "View Externally")
+ (gnus-mime-view-part-internally "E" "View Internally")
+ (gnus-mime-view-part-externally "e" "View Externally")
(gnus-mime-print-part "p" "Print")
(gnus-mime-pipe-part "|" "Pipe To Command...")
(gnus-mime-action-on-part "." "Take action on the part")))
(gnus-newsgroup-ignored-charsets 'gnus-all))
(gnus-article-press-button)))))
-(defun gnus-mime-externalize-part (&optional handle)
+(defun gnus-mime-view-part-externally (&optional handle)
"View the MIME part under point with an external viewer."
(interactive)
(gnus-article-check-buffer)
(mm-remove-part handle)
(mm-display-part handle)))))
-(defun gnus-mime-internalize-part (&optional handle)
+(defun gnus-mime-view-part-internally (&optional handle)
"View the MIME part under point with an internal viewer.
If no internal viewer is available, use an external viewer."
(interactive)
(interactive "p")
(gnus-article-part-wrapper n 'gnus-mime-view-part-as-charset))
-(defun gnus-article-externalize-part (n)
+(defun gnus-article-view-part-externally (n)
"View MIME part N externally, which is the numerical prefix."
(interactive "p")
- (gnus-article-part-wrapper n 'gnus-mime-externalize-part))
+ (gnus-article-part-wrapper n 'gnus-mime-view-part-externally))
(defun gnus-article-inline-part (n)
"Inline MIME part N, which is the numerical prefix."
;; may change the point. So we set the window point.
(set-window-point window point)))
(let* ((handles (or ihandles (mm-dissect-buffer
- gnus-article-no-strict-mime)
+ nil gnus-article-loose-mime)
(mm-uu-dissect)))
buffer-read-only handle name type b e display)
(when (and (not ihandles)
:group 'gnus-summary
:type 'string)
-(defcustom gnus-article-no-strict-mime nil
- "If non-nil, don't require strict MIME.
+(defcustom gnus-article-loose-mime nil
+ "If non-nil, don't require MIME-Version header.
Some brain-damaged MUA/MTA, e.g. Lotus Domino 5.0.6 clients, does not
supply the MIME-Version header or deliberately strip it From the mail.
Set it to non-nil, Gnus will treat some articles as MIME even if
"o" gnus-article-save-part
"c" gnus-article-copy-part
"C" gnus-article-view-part-as-charset
- "e" gnus-article-externalize-part
+ "e" gnus-article-view-part-externally
"E" gnus-article-encrypt-body
"i" gnus-article-inline-part
"|" gnus-article-pipe-part))
(save-excursion
(set-buffer gnus-article-buffer)
(let ((handles (or gnus-article-mime-handles
- (mm-dissect-buffer
- gnus-article-no-strict-mime)
+ (mm-dissect-buffer nil gnus-article-loose-mime)
(mm-uu-dissect))))
(when handles
(gnus-summary-save-parts-1 type dir handles reverse)
(while (nthcdr n ids)
(setq ids (cdr ids)))
(car ids))
- (when (string-match "<[^<]+\\'" references)
- (match-string 0 references)))))
+ (when (string-match "\\(<[^<]+>\\)[ \t]*\\'" references)
+ (match-string 1 references)))))
(defun gnus-buffer-live-p (buffer)
"Say whether BUFFER is alive or not."
`w3' : using Emacs/W3;
`w3m' : using emacs-w3m;
`links': using links;
-`lynx' : using lynx."
+`lynx' : using lynx;
+`nil' : using external viewer."
:type '(choice (symbol w3)
(symbol w3m)
(symbol links)
(symbol lynx)
+ (symbol nil)
(function))
:version "21.3"
:group 'mime-display)
(message "Destroying external MIME viewers")
(mm-destroy-parts mm-postponed-undisplay-list)))
-(defun mm-dissect-buffer (&optional no-strict-mime)
+(defun mm-dissect-buffer (&optional no-strict-mime loose-mime)
"Dissect the current buffer and return a list of MIME handles."
(save-excursion
(let (ct ctl type subtype cte cd description id result from)
(save-restriction
(mail-narrow-to-head)
(when (or no-strict-mime
+ loose-mime
(mail-fetch-field "mime-version"))
(setq ct (mail-fetch-field "content-type")
ctl (ignore-errors (mail-header-parse-content-type ct))
gnus-newsgroup-name)
(when (search-forward id nil t)
(let ((nhandles (mm-dissect-buffer
- gnus-article-no-strict-mime)) nid)
+ nil gnus-article-loose-mime)) nid)
(if (consp (car nhandles))
(mm-destroy-parts nhandles)
(setq nid (cdr (assq 'id
(defvar mm-text-html-renderer-alist
'((w3 . mm-inline-text-html-render-with-w3)
(w3m . mm-inline-text-html-render-with-w3m)
- (links mm-inline-render-with-file
+ (links mm-inline-render-with-file
mm-links-remove-leading-blank
"links" "-dump" file)
(lynx mm-inline-render-with-stdin nil
"lynx" "-dump" "-force_html" "-stdin"))
- "The attributes of renderer types.")
+ "The attributes of renderer types for text/html.")
(defvar mm-text-html-washer-alist
'((w3 . gnus-article-wash-html-with-w3)
(w3m . gnus-article-wash-html-with-w3m)
- (links mm-inline-wash-with-file
+ (links mm-inline-wash-with-file
mm-links-remove-leading-blank
"links" "-dump" file)
(lynx mm-inline-wash-with-stdin nil
"lynx" "-dump" "-force_html" "-stdin"))
- "The attributes of washer types.")
+ "The attributes of washer types for text/html.")
;;; Internal variables.
(delete-region (match-beginning 0) (match-end 0))))
(defun mm-inline-wash-with-file (post-func cmd &rest args)
- (let ((file (make-temp-name
+ (let ((file (make-temp-name
(expand-file-name "mm" mm-tmp-directory))))
- (write-region (point-min) (point-max) file nil 'silent)
+ (let ((coding-system-for-write 'binary))
+ (write-region (point-min) (point-max) file nil 'silent))
(delete-region (point-min) (point-max))
(unwind-protect
(apply 'call-process cmd nil t nil (mapcar 'eval args))
(and post-func (funcall post-func))))
(defun mm-inline-wash-with-stdin (post-func cmd &rest args)
- (apply 'call-process-region (point-min) (point-max)
- cmd t t nil args)
+ (let ((coding-system-for-write 'binary))
+ (apply 'call-process-region (point-min) (point-max)
+ cmd t t nil args))
(and post-func (funcall post-func)))
(defun mm-inline-render-with-file (handle post-func cmd &rest args)
(let ((source (mm-get-part handle)))
(mm-insert-inline
handle
- (with-temp-buffer
+ (mm-with-unibyte-buffer
(insert source)
(apply 'mm-inline-wash-with-file post-func cmd args)
(buffer-string)))))
(defun mm-inline-render-with-stdin (handle post-func cmd &rest args)
(let ((source (mm-get-part handle)))
- (mm-insert-inline
- handle
- (with-temp-buffer
+ (mm-insert-inline
+ handle
+ (mm-with-unibyte-buffer
(insert source)
(apply 'mm-inline-wash-with-stdin post-func cmd args)
(buffer-string)))))
(defun mm-inline-render-with-function (handle func &rest args)
(let ((source (mm-get-part handle)))
- (mm-insert-inline
- handle
- (with-temp-buffer
+ (mm-insert-inline
+ handle
+ (mm-with-unibyte-buffer
(insert source)
(apply func args)
(buffer-string)))))
+2002-02-18 ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ * emacs-mime.texi (mailcap): Addition.
+
+ * gnus.texi (Using MIME): Rename functions. Addition.
+
2002-02-16 Simon Josefsson <jas@extundo.com>
* gnus.texi (Top): Change description of Posting Server node.
@example
image/*; gimp -8 %s
audio/wav; wavplayer %s
+application/msword; catdoc %s ; copiousoutput ; nametemplate=%s.doc
@end example
-This says that all image files should be displayed with @code{gimp}, and
-that WAVE audio files should be played by @code{wavplayer}.
+This says that all image files should be displayed with @code{gimp},
+that WAVE audio files should be played by @code{wavplayer}, and that
+MS-WORD files should be inlined by @code{catdoc}.
The @code{mailcap} library parses this file, and provides functions for
matching types.
@code{To} \e$BMs$,0l$D$h$j$bB?$1$l$P!"$=$l$i$rA4$F>C5n$7$^$9!#\e(B
@end table
-\e$B$3$l$i$N;0$D$NMWAG$rF~$l$?$1$l$P!"$3$s$JIw$K$J$j$^$9!#\e(B
+\e$B$3$l$i$N;0$D$NMWAG$rF~$l$?$1$l$P!"$3$s$JIw$K$J$j$^$9\e(B:
@lisp
(setq gnus-boring-article-headers
Remove all @code{To} headers if there are more than one.
@end table
-To include these three elements, you could say something like;
+To include these three elements, you could say something like:
@lisp
(setq gnus-boring-article-headers