From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/59210 Path: main.gmane.org!not-for-mail From: Ted Stern Newsgroups: gmane.emacs.gnus.general Subject: Re: reducing headers in gnus-summary-mail-forward ARG 4 Date: Thu, 18 Nov 2004 12:43:06 -0800 Organization: Cray Inc. Message-ID: References: <86bre7l1rs.fsf@ketchup.de.uu.net> <864qjyp1x2.fsf@ketchup.de.uu.net> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: sea.gmane.org 1100842298 23312 80.91.229.6 (19 Nov 2004 05:31:38 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 19 Nov 2004 05:31:38 +0000 (UTC) Original-X-From: ding-owner+M7750@lists.math.uh.edu Fri Nov 19 06:31:24 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 1CV1Mi-0005X5-00 for ; Fri, 19 Nov 2004 06:31:24 +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 1CV1ID-0007Em-00; Thu, 18 Nov 2004 23:26:45 -0600 Original-Received: from util2.math.uh.edu ([129.7.128.23]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1CUt7h-0006FU-00 for ding@lists.math.uh.edu; Thu, 18 Nov 2004 14:43:21 -0600 Original-Received: from justine.libertine.org ([66.139.78.221] ident=postfix) by util2.math.uh.edu with esmtp (Exim 4.30) id 1CUt7e-0004aM-VU for ding@lists.math.uh.edu; Thu, 18 Nov 2004 14:43:19 -0600 Original-Received: from main.gmane.org (main.gmane.org [80.91.229.2]) by justine.libertine.org (Postfix) with ESMTP id 9243D3A0221 for ; Thu, 18 Nov 2004 14:43:17 -0600 (CST) Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1CUt7b-0001nQ-00 for ; Thu, 18 Nov 2004 21:43:15 +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 ; Thu, 18 Nov 2004 21:43:10 +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 ; Thu, 18 Nov 2004 21:43:10 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: ding@gnus.org Original-Lines: 74 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:1Yx9kKlXochtkMCc3lU5tlONw4E= Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: main.gmane.org gmane.emacs.gnus.general:59210 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:59210 On 10 Nov 2004 at 00:02 PST, Kai Grossjohann wrote: > Ted Stern writes: > >> On 9 Nov 2004 at 03:06 PST, Kai Grossjohann wrote: >>> Ted Stern writes: >>> >>>> If I use M-4 C-c C-f, I get the correct wrapper, but it includes nearly 40 >>>> lines of irrelevant headers. >>> >>> What does message-forward-ignored-headers do? >> >> It changes the headers in *all* forms of message forwarding. I want to reduce >> the number of headers only the non-attachment form. > > Ah, I see. Well, then a small function that let-binds > message-forward-ignored-headers around the invocation of > gnus-summary-mail-forward seems to be the way to go. > > Kai Here's my attempt. I used the defadvice opportunity to turn off message-signature as well, since I don't like that in forwards. Oddly enough, turning off the sig does work, but modifying the ignored headers does not. Any suggestions? I have this in my .gnus if it makes any difference. Should I byte-compile it and then load it before loading gnus? -- Ted ;; Add a defadvice around gnus-summary-mail-forward to reset ;; message-forward-ignored-headers from ;; "^Content-Transfer-Encoding:\\|^X-Gnus" when the argument is ;; non-nil ;; (defadvice gnus-summary-mail-forward (around gnus-summary-mail-forward-around (&optional prefix post) activate) "Reset message-forward-ignored-headers when ARG of `gnus-summary-mail-forward' is non-nil. Turn off signature also." (interactive "P") (let ((message-signature nil) ; also turn off signature for fwds (message-forward-ignored-headers (if prefix (concat "^" (regexp-opt '( "Content-" "X" "User" "Received" "Return" "Message" "MIME" "References-" "In-" "Status" "Lines" "List") t)) message-forward-ignored-headers))) (message "message-forward-ignored-headers = `%s'" message-forward-ignored-headers) ad-do-it) ) -- 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)