From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/59319 Path: main.gmane.org!not-for-mail From: Ted Stern Newsgroups: gmane.emacs.gnus.general Subject: Re: bug in message.el, message-forward-make-body-plain Date: Wed, 01 Dec 2004 13:39:49 -0800 Organization: Cray Inc. Message-ID: References: <87y8ghyf39.fsf@orebokech.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1101937493 12538 80.91.229.6 (1 Dec 2004 21:44:53 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 1 Dec 2004 21:44:53 +0000 (UTC) Original-X-From: ding-owner+M7859@lists.math.uh.edu Wed Dec 01 22:44:47 2004 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13] ident=mail) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CZcHF-0007lp-00 for ; Wed, 01 Dec 2004 22:44:46 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1CZcCt-00067C-00; Wed, 01 Dec 2004 15:40:15 -0600 Original-Received: from util2.math.uh.edu ([129.7.128.23]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1CZcCo-000677-00 for ding@lists.math.uh.edu; Wed, 01 Dec 2004 15:40:10 -0600 Original-Received: from justine.libertine.org ([66.139.78.221] ident=postfix) by util2.math.uh.edu with esmtp (Exim 4.30) id 1CZcCj-0005xK-L6 for ding@lists.math.uh.edu; Wed, 01 Dec 2004 15:40:06 -0600 Original-Received: from main.gmane.org (main.gmane.org [80.91.229.2]) by justine.libertine.org (Postfix) with ESMTP id EC0103A0247 for ; Wed, 1 Dec 2004 15:39:56 -0600 (CST) Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1CZcCZ-0005Kr-00 for ; Wed, 01 Dec 2004 22:39:55 +0100 Original-Received: from ip-136-162-71-19.cray.com ([136.162.71.19]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 01 Dec 2004 22:39:55 +0100 Original-Received: from stern+gnus by ip-136-162-71-19.cray.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 01 Dec 2004 22:39:55 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: ding@gnus.org Original-Lines: 85 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: ip-136-162-71-19.cray.com User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (gnu/linux) Cancel-Lock: sha1:u3OiOROklRNzufw0Cf++2I/XtTQ= Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: main.gmane.org gmane.emacs.gnus.general:59319 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:59319 --=-=-= Content-Type: text/plain On 1 Dec 2004 at 11:48 PST, Romain Francoise wrote: > The fix looks simple enough; the problem appears to be in this change: > > > > With the following ChangeLog entry: > > 2003-10-29 Simon Josefsson > > * message.el (message-forward-make-body-plain): Remove ignored > headers. Tiny patch from Andre Srinivasan . > (message-forward-make-body-plain): Fix ARG=1. > > The test is weird: > > (when (and (not current-prefix-arg) > message-forward-ignored-headers) > > how can current-prefix-arg be nil since you call this function from C-u > C-c C-f? Its value is '(4) here... unless I'm missing something. > > Index: message.el > =================================================================== > RCS file: /usr/local/cvsroot/gnus/lisp/message.el,v > retrieving revision 7.63 > diff -u -r7.63 message.el > --- message.el 26 Nov 2004 03:07:29 -0000 7.63 > +++ message.el 1 Dec 2004 19:46:41 -0000 > @@ -6257,8 +6263,7 @@ > (buffer-string))) > (setq e (point)) > (insert > - (when (and (not current-prefix-arg) > - message-forward-ignored-headers) > + (when message-forward-ignored-headers > (save-restriction > (narrow-to-region b e) > (goto-char b) Thanks Romain, This patch works for me, but the offsets are wrong. After making the change manually I am able to advise gnus-summary-mail-forward correctly to do what I want (remove unwanted headers when not forwarding as rfc822 MIME). I did my own diff and am attaching it as inline MIME to avoid space problems. Ted -- Ted Stern Applications Group Cray Inc. office: 206-701-2182 411 First Avenue South, Suite 600 cell: 206-383-1049 Seattle, WA 98104-2860 FAX: 206-701-2500 Frango ut patefaciam -- I break that I may reveal (The Paleontological Society motto, equally apropos for debugging) --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=message.diff Content-Description: message.el patch for message-forward-make-body-plain bug Index: message.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/message.el,v retrieving revision 7.63 diff -u -r7.63 message.el --- message.el 26 Nov 2004 03:07:29 -0000 7.63 +++ message.el 1 Dec 2004 21:37:22 -0000 @@ -6258,8 +6258,7 @@ (setq e (point)) (insert "\n-------------------- End of forwarded message --------------------\n") - (when (and (not current-prefix-arg) - message-forward-ignored-headers) + (when message-forward-ignored-headers (save-restriction (narrow-to-region b e) (goto-char b) --=-=-=--