From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/18132 Path: main.gmane.org!not-for-mail From: Shenghuo ZHU Newsgroups: gmane.emacs.gnus.general Subject: Re: Test: alternative multipart in a mixed multipart Date: 25 Oct 1998 01:16:07 -400 Organization: Computer Dept of U Rochester Sender: owner-ding@hpc.uh.edu Message-ID: <2nbtn1usq0.fsf@zsh.cs.rochester.edu> References: <199810250507.BAA01119@brain.cs.rochester.edu> NNTP-Posting-Host: coloc-standby.netfonds.no X-Trace: main.gmane.org 1035156709 4545 80.91.224.250 (20 Oct 2002 23:31:49 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 23:31:49 +0000 (UTC) Return-Path: Original-Received: from fisher.math.uh.edu (fisher.math.uh.edu [129.7.128.35]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id BAA17024 for ; Sun, 25 Oct 1998 01:09:22 -0400 (EDT) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by fisher.math.uh.edu (8.9.1/8.9.1) with ESMTP id AAB21006; Sun, 25 Oct 1998 00:09:12 -0500 (CDT) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Sat, 24 Oct 1998 23:09:05 -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 XAA03411 for ; Sat, 24 Oct 1998 23:08:55 -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 BAA17014 for ; Sun, 25 Oct 1998 01:08:54 -0400 (EDT) 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 BAA01891 for ; Sun, 25 Oct 1998 01:08:53 -0400 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 BAA25172 for ; Sun, 25 Oct 1998 01:08:49 -0400 Original-Received: (from zsh@localhost) by brain.cs.rochester.edu (8.9.0/8.8.5) id BAA01147; Sun, 25 Oct 1998 01:16:07 -0400 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: Shenghuo ZHU's message of "Sun, 25 Oct 1998 01:07:27 -0400" Original-Lines: 83 User-Agent: Gnus/5.070038 (Pterodactyl Gnus v0.38) XEmacs/20.4 (Emerald) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:18132 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:18132 After applying the patch, it will shown as [1. text/plain] Part1 [*] text/plain [ ] image/gif Test [2. text/plain] Part3 This patch is a bit ugly. It seems better to split gnus-mime-display-alternative into initial function and callback function. -- Shenghuo :- cut -------------------------------- --- ChangeLog 1998/10/25 04:56:31 1.1 +++ ChangeLog 1998/10/25 05:01:04 @@ -1,3 +1,8 @@ +Sun Oct 25 00:59:23 1998 Shenghuo ZHU + + * gnus-art.el (gnus-mime-display-alternative): Show alternative + multipart with other parts in a mixed multipart. + Sat Oct 24 16:48:51 1998 Shenghuo ZHU * mm-uu.el (mm-uu-dissect): Delete the begining spurious newline --- gnus-art.el 1998/10/25 04:56:12 1.1 +++ gnus-art.el 1998/10/25 04:57:37 @@ -2400,18 +2400,14 @@ (goto-char (point-max))))) (defun gnus-mime-display-alternative (handles &optional preferred) - (let* ((preferred (mm-preferred-alternative handles preferred)) + (let* ((is-callback preferred) + (preferred (mm-preferred-alternative handles preferred)) (ihandles handles) (point (point)) handle buffer-read-only from) - (goto-char (point-min)) - (search-forward "\n\n" nil t) - (delete-region (point) (point-max)) - (when preferred - ;; Top-level call; we clean up. - (mm-remove-parts gnus-article-mime-handles) - (setq gnus-article-mime-handles handles - gnus-article-mime-handle-alist nil)) + (when is-callback + (delete-region (gnus-point-at-bol) (progn (forward-line 1) (point))) + (mm-remove-parts handles)) (while (setq handle (pop handles)) (gnus-add-text-properties (setq from (point)) @@ -2437,12 +2433,18 @@ :action 'gnus-widget-press-button :button-keymap gnus-widget-button-keymap) (insert " ")) - (insert "\n\n") + (insert "\n") + (if is-callback nil + (insert "\n") + (goto-char (point-max))) (when preferred (if (stringp (car preferred)) (gnus-display-mime preferred) (mm-display-part preferred))) - (goto-char point))) + (if is-callback + (goto-char point) + (goto-char (point-max)) + (insert "\n")))) (defun gnus-article-wash-status () "Return a string which display status of article washing."