Gnus development mailing list
 help / color / mirror / Atom feed
* p0.48 errors on `2 b' in *Article*
@ 1998-11-16 20:15 Karl Kleinpaste
  1998-11-17  4:49 ` Shenghuo ZHU
  0 siblings, 1 reply; 2+ messages in thread
From: Karl Kleinpaste @ 1998-11-16 20:15 UTC (permalink / raw)



A message containing a uuencoded image (displaying MIMEishly with
[1. text/plain] (no content) and [2. image/jpeg (P008.jpg)]) throws an
error only if the cursor is in *Article* when one types `2 b'.  If the
cursor is in *Summary*, it works fine.

Signaling: (wrong-type-argument windowp nil)
  select-window(nil)
  gnus-mm-display-part((#<buffer " *mm-uu*<2>"> ("image/jpeg") uudecode-decode-region nil ("attachment" (filename . "P008.jpg")) "P008.jpg"))
  gnus-article-view-part(2)
  call-interactively(gnus-article-view-part)
  gnus-article-read-summary-keys(2)
  call-interactively(gnus-article-read-summary-keys)


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: p0.48 errors on `2 b' in *Article*
  1998-11-16 20:15 p0.48 errors on `2 b' in *Article* Karl Kleinpaste
@ 1998-11-17  4:49 ` Shenghuo ZHU
  0 siblings, 0 replies; 2+ messages in thread
From: Shenghuo ZHU @ 1998-11-17  4:49 UTC (permalink / raw)




>>>>> "KK" == Karl Kleinpaste <karl@justresearch.com> writes:

KK> A message containing a uuencoded image (displaying MIMEishly with
KK> [1. text/plain] (no content) and [2. image/jpeg (P008.jpg)]) throws an
KK> error only if the cursor is in *Article* when one types `2 b'.  If the
KK> cursor is in *Summary*, it works fine.

KK> Signaling: (wrong-type-argument windowp nil)
KK>   select-window(nil)
KK>   gnus-mm-display-part((#<buffer " *mm-uu*<2>"> ("image/jpeg") uudecode-decode-region nil ("attachment" (filename . "P008.jpg")) "P008.jpg"))
KK>   gnus-article-view-part(2)
KK>   call-interactively(gnus-article-view-part)
KK>   gnus-article-read-summary-keys(2)
KK>   call-interactively(gnus-article-read-summary-keys)

This happens with any MIME message. Fixed.  

Another fixed bug is when switch from a MIME message to a normal one
and press 'b', an error is thrown.  The reason is that
gnus-article-mime-handles is not cleaned.

A not fixed bug is that mm-dissection-list is never cleaned since
mm-remove-all-parts is never called. e.g.

Value: (#<killed buffer> #<killed buffer> #<killed buffer> #<killed
buffer> #<killed buffer> #<killed buffer> #<killed buffer> #<killed
buffer> #<killed buffer>)

And you might never know when it should be called beside exiting gnus.

A patch is attached.

-- 
Shenghuo

:- cut -------------
--- ChangeLog	1998/11/17 04:30:17	1.2
+++ ChangeLog	1998/11/17 04:36:57
@@ -1,3 +1,9 @@
+Mon Nov 16 23:34:12 1998  Shenghuo ZHU  <zsh@cs.rochester.edu>
+
+	* gnus-art.el (gnus-display-mime): Clean up even when no handles.
+	(gnus-mm-display-part): Do not select-window if the article window
+ 	is not found.
+
 Mon Nov 16 02:26:40 1998  Shenghuo ZHU  <zsh@cs.rochester.edu>
 
 	* gnus-sum.el (gnus-summary-move-article): Use no-encode for B m.

--- gnus-art.el	1998/11/17 03:46:14	1.1
+++ gnus-art.el	1998/11/17 04:33:30
@@ -2335,8 +2335,9 @@
 	(let ((window (selected-window)))
 	  (save-excursion
 	    (unwind-protect
-		(progn
-		  (select-window (get-buffer-window (current-buffer) t))
+		(let ((win (get-buffer-window (current-buffer) t)))
+		  (if win
+		      (select-window win))
 		  (goto-char point)
 		  (forward-line)
 		  (mm-display-part handle))
@@ -2391,12 +2392,14 @@
   "Insert MIME buttons in the buffer."
   (let* ((handles (or ihandles (mm-dissect-buffer) (mm-uu-dissect)))
 	 handle name type b e display)
+    (unless ihandles
+      ;; Top-level call; we clean up.
+      (mm-destroy-parts gnus-article-mime-handles)
+      (setq gnus-article-mime-handles handles
+	    gnus-article-mime-handle-alist nil))
     (when handles
       (unless ihandles
-	;; Top-level call; we clean up.
-	(mm-destroy-parts gnus-article-mime-handles)
-	(setq gnus-article-mime-handles handles
-	      gnus-article-mime-handle-alist nil)
+	;; Clean up for mime parts.
 	(goto-char (point-min))
 	(search-forward "\n\n" nil t)
 	(delete-region (point) (point-max)))


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1998-11-17  4:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-11-16 20:15 p0.48 errors on `2 b' in *Article* Karl Kleinpaste
1998-11-17  4:49 ` 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).