* 5 bugs
@ 1998-09-24 5:58 Shenghuo ZHU
1998-09-24 6:02 ` Matt Simmons
0 siblings, 1 reply; 3+ messages in thread
From: Shenghuo ZHU @ 1998-09-24 5:58 UTC (permalink / raw)
1. MIME does not show in PGNUS 0.32
A typo in gnus-display-mime
2. When press 'v' on MIME button, there is no table.
A typo in mm-interactively-view-part
3. Do not show MIME buttons of parts which have no content-type.
Mails from RFC Editor <rfc-ed@ISI.EDU> does not have content-type
in description.
4. Do not show MIME buttons of last part when article has no close
boundary.
tm-parse.el (mime/parse-multipart) of TM package will show the last
part.
5. Another '\201' bug when using external base64 decoder in a language
environment of GNUS Emacs 20.*.
Set default-process-coding-system to nil when run external decoder.
Patch attached.
--
Shenghuo
------------------------------------------------------------------------
--- ChangeLog 1998/09/24 05:22:48 1.1
+++ ChangeLog 1998/09/24 05:42:45
@@ -1,3 +1,26 @@
+Thu Sep 24 01:41:03 1998 ZHU Shenghuo <zsh@cs.rochester.edu>
+
+ * base64.el (base64-run-command-on-region): External base64
+ decoder do not use coding system
+
+Thu Sep 24 01:39:44 1998 ZHU Shenghuo <zsh@cs.rochester.edu>
+
+ * mm-decode.el (mm-interactively-view-part): Typo.
+
+Thu Sep 24 01:37:30 1998 ZHU Shenghuo <zsh@cs.rochester.edu>
+
+ * mm-decode.el (mm-dissect-multipart): Display last part when the
+ article has no close-delimiter
+
+Thu Sep 24 01:28:54 1998 ZHU Shenghuo <zsh@cs.rochester.edu>
+
+ * mm-decode.el (mm-dissect-buffer): Display parts which have no
+ content-type.
+
+Thu Sep 24 01:23:57 1998 ZHU Shenghuo <zsh@cs.rochester.edu>
+
+ * gnus-art.el (gnus-display-mime): Typo.
+
Thu Sep 24 02:29:57 1998 Lars Magne Ingebrigtsen <larsi@menja.ifi.uio.no>
* gnus.el: Pterodactyl Gnus v0.32 is released.
--- base64.el 1998/09/24 05:40:29 1.1
+++ base64.el 1998/09/24 05:40:57
@@ -75,7 +75,7 @@
(defun base64-run-command-on-region (start end output-buffer command
&rest arg-list)
- (let ((tempfile nil) status errstring)
+ (let ((tempfile nil) status errstring default-process-coding-system))
(unwind-protect
(progn
(setq tempfile (make-temp-name "base64"))
--- gnus-art.el 1998/09/24 05:21:08 1.1
+++ gnus-art.el 1998/09/24 05:22:38
@@ -2253,29 +2253,29 @@
(mail-narrow-to-head)
(when (setq ct (mail-fetch-field "content-type"))
(setq ctl (condition-case ()
- (mail-header-parse-content-type ct) (error nil)))
- (let* ((handles (mm-dissect-buffer))
- handle name type b e)
- (mapcar 'mm-destroy-part gnus-article-mime-handles)
- (setq gnus-article-mime-handles handles)
- (when handles
- (goto-char (point-min))
- (search-forward "\n\n" nil t)
- (delete-region (point) (point-max))
- (if (not (equal (car ctl) "multipart/alternative"))
- (while (setq handle (pop handles))
- (gnus-insert-mime-button handle)
- (insert "\n\n")
- (when (and (mm-automatic-display-p
- (car (mm-handle-type handle)))
- (or (not (mm-handle-disposition handle))
- (equal (car (mm-handle-disposition handle))
- "inline")))
- (forward-line -2)
- (mm-display-part handle t)
- (goto-char (point-max))))
- ;; Here we have multipart/alternative
- (gnus-mime-display-alternative handles))))))))
+ (mail-header-parse-content-type ct) (error nil)))))
+ (let* ((handles (mm-dissect-buffer))
+ handle name type b e)
+ (mapcar 'mm-destroy-part gnus-article-mime-handles)
+ (setq gnus-article-mime-handles handles)
+ (when handles
+ (goto-char (point-min))
+ (search-forward "\n\n" nil t)
+ (delete-region (point) (point-max))
+ (if (not (equal (car ctl) "multipart/alternative"))
+ (while (setq handle (pop handles))
+ (gnus-insert-mime-button handle)
+ (insert "\n\n")
+ (when (and (mm-automatic-display-p
+ (car (mm-handle-type handle)))
+ (or (not (mm-handle-disposition handle))
+ (equal (car (mm-handle-disposition handle))
+ "inline")))
+ (forward-line -2)
+ (mm-display-part handle t)
+ (goto-char (point-max))))
+ ;; Here we have multipart/alternative
+ (gnus-mime-display-alternative handles))))))
(defun gnus-mime-display-alternative (handles &optional preferred)
(let* ((preferred (mm-preferred-alternative handles preferred))
--- mm-decode.el 1998/09/24 05:27:00 1.1
+++ mm-decode.el 1998/09/24 05:38:56
@@ -102,7 +102,8 @@
cd (mail-fetch-field "content-disposition")
description (mail-fetch-field "content-description")
id (mail-fetch-field "content-id"))))
- (when ctl
+ (if (not ctl)
+ (mm-dissect-singlepart '("text/plain") nil no-strict-mime nil nil)
(setq type (split-string (car ctl) "/"))
(setq subtype (cadr type)
type (pop type))
@@ -140,9 +141,16 @@
(defun mm-dissect-multipart (ctl)
(goto-char (point-min))
- (let ((boundary (concat "\n--" (mail-content-type-get ctl 'boundary)))
- start parts end)
- (while (search-forward boundary nil t)
+ (let* ((boundary (concat "\n--" (mail-content-type-get ctl 'boundary)))
+ (close-delimiter (concat boundary "--[ \t]*$"))
+ start parts
+ (end (save-excursion
+ (goto-char (point-max))
+ (if (re-search-backward close-delimiter nil t)
+ (match-beginning 0)
+ (point-max)
+ ))))
+ (while (search-forward boundary end t)
(goto-char (match-beginning 0))
(when start
(save-excursion
@@ -151,6 +159,11 @@
(setq parts (nconc (mm-dissect-buffer t) parts)))))
(forward-line 2)
(setq start (point)))
+ (when start
+ (save-excursion
+ (save-restriction
+ (narrow-to-region start (point-max))
+ (setq parts (nconc (mm-dissect-buffer t) parts)))))
(nreverse parts)))
(defun mm-copy-to-buffer ()
@@ -367,7 +380,7 @@
"Display HANDLE using METHOD."
(let* ((type (car (mm-handle-type handle)))
(methods
- (mapcar (lambda (i) (list (cdr (assoc "viewer" i))))
+ (mapcar (lambda (i) (list (cdr (assoc 'viewer i))))
(mailcap-mime-info type 'all)))
(method (completing-read "Viewer: " methods)))
(mm-display-external (copy-sequence handle) method)))
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: 5 bugs
1998-09-24 5:58 5 bugs Shenghuo ZHU
@ 1998-09-24 6:02 ` Matt Simmons
1998-09-24 6:26 ` Shenghuo ZHU
0 siblings, 1 reply; 3+ messages in thread
From: Matt Simmons @ 1998-09-24 6:02 UTC (permalink / raw)
>>>>> "ZSH" == Shenghuo ZHU <zsh@cs.rochester.edu> writes:
ZSH> 1. MIME does not show in PGNUS 0.32
ZSH> A typo in gnus-display-mime
ZSH> (defun base64-run-command-on-region (start end output-buffer command
ZSH> &rest arg-list)
ZSH> - (let ((tempfile nil) status errstring)
ZSH> + (let ((tempfile nil) status errstring default-process-coding-system))
Did you add one too many right parens to your fix?
Matt
--
Matt Simmons - simmonmt@acm.org - http://www.netcom.com/~simmonmt
When ransacking a town, always remember: Pillage first and *then* burn,
not the other way around. --David Henry
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: 5 bugs
1998-09-24 6:02 ` Matt Simmons
@ 1998-09-24 6:26 ` Shenghuo ZHU
0 siblings, 0 replies; 3+ messages in thread
From: Shenghuo ZHU @ 1998-09-24 6:26 UTC (permalink / raw)
>>>>> "Matt" == Matt Simmons <simmonmt@acm.org> writes:
>>>>> "ZSH" == Shenghuo ZHU <zsh@cs.rochester.edu> writes:
ZSH> 1. MIME does not show in PGNUS 0.32
ZSH> A typo in gnus-display-mime
ZSH> (defun base64-run-command-on-region (start end output-buffer command
ZSH> &rest arg-list)
ZSH> - (let ((tempfile nil) status errstring)
ZSH> + (let ((tempfile nil) status errstring default-process-coding-system))
Matt> Did you add one too many right parens to your fix?
Matt> Matt
Thank you.
A modified patch is attached for convenience.
--
Shenghuo
-------------------------------------------------------------------------
--- ChangeLog 1998/09/24 05:22:48 1.1
+++ ChangeLog 1998/09/24 05:42:45
@@ -1,3 +1,26 @@
+Thu Sep 24 01:41:03 1998 ZHU Shenghuo <zsh@cs.rochester.edu>
+
+ * base64.el (base64-run-command-on-region): External base64
+ decoder do not use coding system
+
+Thu Sep 24 01:39:44 1998 ZHU Shenghuo <zsh@cs.rochester.edu>
+
+ * mm-decode.el (mm-interactively-view-part): Typo.
+
+Thu Sep 24 01:37:30 1998 ZHU Shenghuo <zsh@cs.rochester.edu>
+
+ * mm-decode.el (mm-dissect-multipart): Display last part when the
+ article has no close-delimiter
+
+Thu Sep 24 01:28:54 1998 ZHU Shenghuo <zsh@cs.rochester.edu>
+
+ * mm-decode.el (mm-dissect-buffer): Display parts which have no
+ content-type.
+
+Thu Sep 24 01:23:57 1998 ZHU Shenghuo <zsh@cs.rochester.edu>
+
+ * gnus-art.el (gnus-display-mime): Typo.
+
Thu Sep 24 02:29:57 1998 Lars Magne Ingebrigtsen <larsi@menja.ifi.uio.no>
* gnus.el: Pterodactyl Gnus v0.32 is released.
--- base64.el 1998/09/24 05:40:29 1.1
+++ base64.el 1998/09/24 05:40:57
@@ -75,7 +75,7 @@
(defun base64-run-command-on-region (start end output-buffer command
&rest arg-list)
- (let ((tempfile nil) status errstring)
+ (let ((tempfile nil) status errstring default-process-coding-system)
(unwind-protect
(progn
(setq tempfile (make-temp-name "base64"))
--- gnus-art.el 1998/09/24 05:21:08 1.1
+++ gnus-art.el 1998/09/24 05:22:38
@@ -2253,29 +2253,29 @@
(mail-narrow-to-head)
(when (setq ct (mail-fetch-field "content-type"))
(setq ctl (condition-case ()
- (mail-header-parse-content-type ct) (error nil)))
- (let* ((handles (mm-dissect-buffer))
- handle name type b e)
- (mapcar 'mm-destroy-part gnus-article-mime-handles)
- (setq gnus-article-mime-handles handles)
- (when handles
- (goto-char (point-min))
- (search-forward "\n\n" nil t)
- (delete-region (point) (point-max))
- (if (not (equal (car ctl) "multipart/alternative"))
- (while (setq handle (pop handles))
- (gnus-insert-mime-button handle)
- (insert "\n\n")
- (when (and (mm-automatic-display-p
- (car (mm-handle-type handle)))
- (or (not (mm-handle-disposition handle))
- (equal (car (mm-handle-disposition handle))
- "inline")))
- (forward-line -2)
- (mm-display-part handle t)
- (goto-char (point-max))))
- ;; Here we have multipart/alternative
- (gnus-mime-display-alternative handles))))))))
+ (mail-header-parse-content-type ct) (error nil)))))
+ (let* ((handles (mm-dissect-buffer))
+ handle name type b e)
+ (mapcar 'mm-destroy-part gnus-article-mime-handles)
+ (setq gnus-article-mime-handles handles)
+ (when handles
+ (goto-char (point-min))
+ (search-forward "\n\n" nil t)
+ (delete-region (point) (point-max))
+ (if (not (equal (car ctl) "multipart/alternative"))
+ (while (setq handle (pop handles))
+ (gnus-insert-mime-button handle)
+ (insert "\n\n")
+ (when (and (mm-automatic-display-p
+ (car (mm-handle-type handle)))
+ (or (not (mm-handle-disposition handle))
+ (equal (car (mm-handle-disposition handle))
+ "inline")))
+ (forward-line -2)
+ (mm-display-part handle t)
+ (goto-char (point-max))))
+ ;; Here we have multipart/alternative
+ (gnus-mime-display-alternative handles))))))
(defun gnus-mime-display-alternative (handles &optional preferred)
(let* ((preferred (mm-preferred-alternative handles preferred))
--- mm-decode.el 1998/09/24 05:27:00 1.1
+++ mm-decode.el 1998/09/24 05:38:56
@@ -102,7 +102,8 @@
cd (mail-fetch-field "content-disposition")
description (mail-fetch-field "content-description")
id (mail-fetch-field "content-id"))))
- (when ctl
+ (if (not ctl)
+ (mm-dissect-singlepart '("text/plain") nil no-strict-mime nil nil)
(setq type (split-string (car ctl) "/"))
(setq subtype (cadr type)
type (pop type))
@@ -140,9 +141,16 @@
(defun mm-dissect-multipart (ctl)
(goto-char (point-min))
- (let ((boundary (concat "\n--" (mail-content-type-get ctl 'boundary)))
- start parts end)
- (while (search-forward boundary nil t)
+ (let* ((boundary (concat "\n--" (mail-content-type-get ctl 'boundary)))
+ (close-delimiter (concat boundary "--[ \t]*$"))
+ start parts
+ (end (save-excursion
+ (goto-char (point-max))
+ (if (re-search-backward close-delimiter nil t)
+ (match-beginning 0)
+ (point-max)
+ ))))
+ (while (search-forward boundary end t)
(goto-char (match-beginning 0))
(when start
(save-excursion
@@ -151,6 +159,11 @@
(setq parts (nconc (mm-dissect-buffer t) parts)))))
(forward-line 2)
(setq start (point)))
+ (when start
+ (save-excursion
+ (save-restriction
+ (narrow-to-region start (point-max))
+ (setq parts (nconc (mm-dissect-buffer t) parts)))))
(nreverse parts)))
(defun mm-copy-to-buffer ()
@@ -367,7 +380,7 @@
"Display HANDLE using METHOD."
(let* ((type (car (mm-handle-type handle)))
(methods
- (mapcar (lambda (i) (list (cdr (assoc "viewer" i))))
+ (mapcar (lambda (i) (list (cdr (assoc 'viewer i))))
(mailcap-mime-info type 'all)))
(method (completing-read "Viewer: " methods)))
(mm-display-external (copy-sequence handle) method)))
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1998-09-24 6:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-09-24 5:58 5 bugs Shenghuo ZHU
1998-09-24 6:02 ` Matt Simmons
1998-09-24 6:26 ` Shenghuo ZHU
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).