From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/25102 Path: main.gmane.org!not-for-mail From: Toby Speight Newsgroups: gmane.emacs.gnus.general Subject: Re: gnus-summary-mail-forward - included headers Date: 14 Sep 1999 19:20:07 +0100 Organization: Citrix Systems (Cambridge) Sender: owner-ding@hpc.uh.edu Message-ID: References: <199909141624.JAA09226@deimos.liberate.com> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1035162550 12306 80.91.224.250 (21 Oct 2002 01:09:10 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 01:09:10 +0000 (UTC) Return-Path: Original-Received: from spinoza.math.uh.edu (spinoza.math.uh.edu [129.7.128.18]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id OAA01677 for ; Tue, 14 Sep 1999 14:23:29 -0400 (EDT) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by spinoza.math.uh.edu (8.9.1/8.9.1) with ESMTP id NAB06733; Tue, 14 Sep 1999 13:23:06 -0500 (CDT) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Tue, 14 Sep 1999 13:20:52 -0500 (CDT) Original-Received: from sclp3.sclp.com (root@sclp3.sclp.com [204.252.123.139]) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id NAA07586 for ; Tue, 14 Sep 1999 13:20:39 -0500 (CDT) Original-Received: from gatekeeper.ctxuk.citrix.com (root@gatekeeper.ctxuk.citrix.com [195.153.38.114]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id OAA01610 for ; Tue, 14 Sep 1999 14:19:54 -0400 (EDT) Original-Received: from sh.ctxuk.citrix.com (sh.ctxuk.citrix.com [10.30.224.4]) by gatekeeper.ctxuk.citrix.com (8.8.7/BSCF-1.7) with ESMTP id TAA14017 for ; Tue, 14 Sep 1999 19:19:52 +0100 (BST) Original-Received: from hwmail01.ctxuk.citrix.com (hwmail01.ctxuk.citrix.com [10.30.224.23]) by sh.ctxuk.citrix.com (8.8.7/BSCF-1.7) with ESMTP id TAA00638 for ; Tue, 14 Sep 1999 19:19:51 +0100 (BST) Original-Received: from lanber.cam.citrix.com (LANBER [10.70.1.235]) by hwmail01.ctxuk.citrix.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2448.0) id RXFGN1XH; Tue, 14 Sep 1999 19:19:51 +0100 Original-To: The Gnus Mailing List Original-Lines: 93 In-Reply-To: Kai.Grossjohann@CS.Uni-Dortmund.DE's message of "14 Sep 1999 18:51:34 +0200" X-Author-Info: Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:25102 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:25102 Kai> Kai Großjohann 0> In article , Kai wrote: Kai> Jim Davidson writes: >> In PGnus, this has been modified. The argument has been renamed to >> not-used, and is ignored. All the headers are included in the >> forward message. I much preferred the former behavior. Kai> Well, pgnus now does MIME forwards. And that means that the Kai> remote client is explicitly told that the attachment is an RFC822 Kai> message. And presumably a mail reader is capable of displaying Kai> mail messages in a meaningful way (including hiding some headers, Kai> if so desired). For me, that isn't the issue. I'd prefer the default not to include stuff like "Path", "X-Gnus-Mail-Source" and "Xref" (call me paranoid, if you like) and I think that the likes of "X-From-Line", "X-From_", "Envelope-to" and "Delivery-date" (added by the mail delivery agent) and probably also "Received" are a waste of space, except if you are debugging message delivery problems. Trimming the headers by hand is a pain, and would be better if automated, as it was before. On a related note, what's the best way to narrow to the current part after inserting a message/rfc822? I have the following to submit articles to alt.humor.best-of-usenet: (defun gnus-summary-forward-to-abhou nil (interactive) (let ((message-mode-hook '(my-message-mode-hook))) (gnus-summary-post-forward) (message-goto-newsgroups) (insert "alt.humor.best-of-usenet") (and (search-forward mail-header-separator nil t) (let ((start (point-marker)) (end (copy-marker (point-max) t))) (message-strip-pgp-sig start end) (message-strip-sigfile start end) (nuke-trailing-blanks-in-region start end))) (set (make-local-variable 'gnus-check-before-posting) '(control-chars multiple-headers)) (set (make-local-variable 'message-syntax-checks) '((long-lines . disabled))))) (defun message-strip-sigfile (start end) (interactive "*r") (goto-char end) ;; first remove trailing blank lines (skip-syntax-backward "-") (let ((sig-end (point)) (sig-start (re-search-backward "\n-- *\n" start t))) (when (and sig-start (<= (count-lines sig-start sig-end) 6) ; 4-line sigblock + "\n-- \n" (2 lines) (y-or-n-p "Strip signature? ")) (undo-boundary) (delete-region sig-start end)))) (defun message-strip-pgp-sig (start end) (interactive "*r") (goto-char start) (while (re-search-forward "^---*BEGIN PGP \\([A-Z ]*\\)--*\n+" end t) (cond ((string= "SIGNATURE" (match-string 1)) (let ((sig-start (match-beginning 0)) (sig-end (or (search-forward "\n-----END PGP SIGNATURE-----" end t) end))) (delete-region sig-start sig-end))) ((string= "SIGNED MESSAGE" (match-string 1)) (let ((header-start (match-beginning 0)) (header-end (match-end 0)) (signed-region-end (or (search-forward "\n--" end t) end))) (goto-char header-end) (while (search-forward "\n- " signed-region-end t) (replace-match "\n")) (delete-region header-start header-end))) (t (delete-region (match-beginning 0) (match-end 0)))))) (defun nuke-trailing-blanks-in-buffer nil (interactive "*") (nuke-trailing-blanks-in-region (point-min) (point-max))) (defun nuke-trailing-blanks-in-region (start end) (interactive "*r") (save-excursion (goto-char start) (while (re-search-forward "[ \t]+$" end t) (replace-match "" t t)))) but of course, message-strip-sigfile tears off the part's end-tag.