From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/18758 Path: main.gmane.org!not-for-mail From: Shenghuo ZHU Newsgroups: gmane.emacs.gnus.general Subject: Re: p0.48 errors on `2 b' in *Article* Date: 16 Nov 1998 23:49:57 -0500 Organization: Computer Dept of U Rochester Sender: owner-ding@hpc.uh.edu Message-ID: <2naf1q6hze.fsf@zsh.cs.rochester.edu> References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 X-Trace: main.gmane.org 1035157230 7980 80.91.224.250 (20 Oct 2002 23:40:30 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 23:40:30 +0000 (UTC) Return-Path: Original-Received: from karazm.math.uh.edu (karazm.math.uh.edu [129.7.128.1]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id XAA01755 for ; Mon, 16 Nov 1998 23:43:10 -0500 (EST) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by karazm.math.uh.edu (8.9.1/8.9.1) with ESMTP id WAB04972; Mon, 16 Nov 1998 22:42:30 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Mon, 16 Nov 1998 22:42:21 -0600 (CST) Original-Received: from sclp3.sclp.com (root@sclp3.sclp.com [209.195.19.139]) by sina.hpc.uh.edu (8.7.3/8.7.3) with ESMTP id WAA01950 for ; Mon, 16 Nov 1998 22:42:11 -0600 (CST) Original-Received: from cayuga.cs.rochester.edu (cayuga.cs.rochester.edu [192.5.53.209]) by sclp3.sclp.com (8.8.5/8.8.5) with SMTP id XAA01719 for ; Mon, 16 Nov 1998 23:42:03 -0500 (EST) Original-Received: from slate.cs.rochester.edu (slate.cs.rochester.edu [192.5.53.101]) by cayuga.cs.rochester.edu (8.6.9/O) with ESMTP id XAA13441 for ; Mon, 16 Nov 1998 23:42:01 -0500 Original-Received: from brain.cs.rochester.edu (heart.cs.rochester.edu [192.5.53.109]) by slate.cs.rochester.edu (8.6.9/O) with ESMTP id XAA11674 for ; Mon, 16 Nov 1998 23:41:58 -0500 Original-Received: (from zsh@localhost) by brain.cs.rochester.edu (8.9.0/8.8.5) id XAA00814; Mon, 16 Nov 1998 23:49:58 -0500 Original-To: ding@gnus.org X-Attribution: ZSH X-Face: 'IF:e51ib'Qbl^(}l^&4-J`'P!@[4~O|&k#:@Gld#b/]oMq&`&FVY._3+b`mzp~Jeve~/#/ ERD!OTe<86UhyN=l`mrPY)M7_}`Ktt\K+58Z!hu7>qU,i.N7TotU[FYE(f1;}`g2xj!u*l`^&=Q!g{ *q|ddto|nkt"$r,K$[)"|6,elPH= GJ6Q In-Reply-To: Karl Kleinpaste's message of "16 Nov 1998 15:15:50 -0500" Original-Lines: 82 User-Agent: Gnus/5.070048 (Pterodactyl Gnus v0.48) XEmacs/20.4 (Emerald) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:18758 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:18758 >>>>> "KK" == Karl Kleinpaste 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((#"> ("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: (# # # # # # # # #) 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 + + * 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 * 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)))