From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/19039 Path: main.gmane.org!not-for-mail From: Dale Hagglund Newsgroups: gmane.emacs.gnus.general Subject: pgnus 0.51: multipart/alternative with no preferred subparts Date: 21 Nov 1998 05:02:30 -0800 Sender: owner-ding@hpc.uh.edu Message-ID: <86emqxtd09.fsf@ponoka.battleriver.com> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1035157462 9520 80.91.224.250 (20 Oct 2002 23:44:22 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 23:44:22 +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 IAA07151 for ; Sat, 21 Nov 1998 08:04:55 -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 HAB20368; Sat, 21 Nov 1998 07:04:08 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Sat, 21 Nov 1998 07:04:04 -0600 (CST) Original-Received: from sclp3.sclp.com (root@sclp3.sclp.com [204.252.123.139]) by sina.hpc.uh.edu (8.7.3/8.7.3) with ESMTP id HAA13455 for ; Sat, 21 Nov 1998 07:03:53 -0600 (CST) Original-Received: from proxy4.ba.best.com (root@proxy4.ba.best.com [206.184.139.15]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id IAA07144 for ; Sat, 21 Nov 1998 08:03:46 -0500 (EST) Original-Received: from best.com (dynamic51.pm01.pleasanton.best.com [204.156.131.51]) by proxy4.ba.best.com (8.9.0/8.9.0/best.out) with ESMTP id FAA15453 for ; Sat, 21 Nov 1998 05:02:39 -0800 (PST) Original-Received: (from rdh@localhost) by best.com (8.8.5/8.8.5) id FAA24227; Sat, 21 Nov 1998 05:02:34 -0800 (PST) Original-To: ding@gnus.org Original-Lines: 79 User-Agent: Gnus/5.070051 (Pterodactyl Gnus v0.51) Emacs/20.3 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:19039 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:19039 This is a MIME multipart message. If you are reading this, you shouldn't. --=-=-= I get mail from an ietf mailing list that uses multipart/alternative to wrap two message/external-body subparts. This type doesn't show up in `mm-alternative-precedence'. The message displays ok, with neither of the alternative parts marked with an asterisk. However, if I try to toggle the button, either by, say `N b' in the summary buffer, or by `RET' in the article buffer, I get Wrong type argument: integer-or-marker-p, nil After poking around a bit, I believe the problem is due to the (when preferred ... (setcdr begend (point-max))) block near the end of gnus-mime-display-alternative. Because none of the alternatives was chosen to display, this is not executed. Because the setcdr doesn't happen, when gnus-mime-display-alternative is invoked from the gnus-callback property, narrow-to-region fails in (when ibegend ...) just inside the save-restriction. I've attached a traceback at the end of this message. Below is an example multipart alternative that should exhibit the problem. --=-=-= Content-Type: multipart/alternative; boundary="==-=-=" --==-=-= Content-Type: text/unknown blah blah 1 --==-=-= Content-Type: text/unknown blah blah 2 --==-=-=-- --=-=-= I tried the following patch, which just moves the setcdr above outside the `(when preferred ...)'. The error stops happening, and other multipart/alternative stuff seems to keep working fine, but I don't grok the internals of gnus-art.el well enough to say if it's the right way to fix the problem, and, of course, it may not be relevant any more with the various button changes that have been underway. --=-=-= *** gnus-art.el.orig Sat Nov 21 04:26:30 1998 --- gnus-art.el Sat Nov 21 04:47:43 1998 *************** *** 2547,2554 **** (if (stringp (car preferred)) (gnus-display-mime preferred) (mm-display-part preferred) ! (goto-char (point-max))) ! (setcdr begend (point-marker)))) (when ibegend (goto-char point)))) --- 2547,2554 ---- (if (stringp (car preferred)) (gnus-display-mime preferred) (mm-display-part preferred) ! (goto-char (point-max)))) ! (setcdr begend (point-marker))) (when ibegend (goto-char point)))) --=-=-= Below is the traceback from the unaltered 0.51 code. --=-=-= Signaling: (wrong-type-argument integer-or-marker-p nil) narrow-to-region(# nil) (progn (narrow-to-region (car ibegend) (cdr ibegend)) (delete-region (point-min) (point-max)) (mm-remove-parts handles)) (if ibegend (progn (narrow-to-region ... ...) (delete-region ... ...) (mm-remove-parts handles))) (when ibegend (narrow-to-region (car ibegend) (cdr ibegend)) (delete-region (point-min) (point-max)) (mm-remove-parts handles)) (save-restriction (when ibegend (narrow-to-region ... ...) (delete-region ... ...) (mm-remove-parts handles)) (setq begend (list ...)) (unless (setq not-pref ...) (setq not-pref ...)) (gnus-add-text-properties (setq from ...) (progn ... ...) (\` ...)) (widget-convert-button (quote link) from (point) :action (quote gnus-widget-press-button) :button-keymap gnus-widget-button-keymap) (while (setq handle ...) (gnus-add-text-properties ... ... ...) (widget-convert-button ... from ... :action ... :button-keymap gnus-widget-button-keymap) (insert " ")) (insert "\n\n") (when preferred (if ... ... ... ...) (setcdr begend ...))) (let* ((preferred ...) (ihandles handles) (point ...) handle buffer-read-only from props begend not-pref) (save-restriction (when ibegend ... ... ...) (setq begend ...) (unless ... ...) (gnus-add-text-properties ... ... ...) (widget-convert-button ... from ... :action ... :button-keymap gnus-widget-button-keymap) (while ... ... ... ...) (insert "\n\n") (when preferred ... ...)) (when ibegend (goto-char point))) gnus-mime-display-alternative(((# ("text/unknown") nil nil nil nil) (#> ("text/unknown") nil nil nil nil)) (# ("text/unknown") nil nil nil nil) (#) 1) (lambda (handles) (gnus-mime-display-alternative (quote ...) (quote ...) (quote ...) 1))((# ("text/unknown") nil nil nil nil)) gnus-article-press-button() * call-interactively(gnus-article-press-button) --=-=-=--