From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/29621 Path: main.gmane.org!not-for-mail From: Paul Stevenson Newsgroups: gmane.emacs.gnus.general Subject: Re: Hiding of -----original message----- citations? Date: 24 Mar 2000 21:18:49 -0500 Organization: Gnus Information Center Sender: owner-ding@hpc.uh.edu Message-ID: References: <8766uevogd.fsf@dahaIM.bsdonline.org> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035166263 3771 80.91.224.250 (21 Oct 2002 02:11:03 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 02:11:03 +0000 (UTC) Return-Path: Original-Received: from lisa.math.uh.edu (lisa.math.uh.edu [129.7.128.49]) by mailhost.sclp.com (Postfix) with ESMTP id 42BA3D051E for ; Fri, 24 Mar 2000 21:19:56 -0500 (EST) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by lisa.math.uh.edu (8.9.1/8.9.1) with ESMTP id UAB12195; Fri, 24 Mar 2000 20:19:43 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Fri, 24 Mar 2000 20:19:01 -0600 (CST) Original-Received: from mailhost.sclp.com (postfix@sclp3.sclp.com [204.252.123.139]) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id UAA27451 for ; Fri, 24 Mar 2000 20:18:47 -0600 (CST) Original-Received: from quimby.gnus.org (quimby.gnus.org [193.69.4.139]) by mailhost.sclp.com (Postfix) with ESMTP id 9E7A2D051E for ; Fri, 24 Mar 2000 21:18:58 -0500 (EST) Original-Received: (from news@localhost) by quimby.gnus.org (8.9.3/8.9.3) id DAA16212 for ding@gnus.org; Sat, 25 Mar 2000 03:20:54 +0100 (CET) Original-To: ding@gnus.org Original-Path: not-for-mail Original-Newsgroups: gnus.ding Original-Lines: 109 Original-NNTP-Posting-Host: pm21k.icx.net Original-X-Trace: quimby.gnus.org 953950854 3381 216.82.9.26 (25 Mar 2000 02:20:54 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: 25 Mar 2000 02:20:54 GMT User-Agent: Gnus/5.0802 (Gnus v5.8.2) Emacs/20.4 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:29621 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:29621 Andreas Fuchs writes: > Is there a way to accomplish this? IIRC, the format for this sick(IMO) > way of quoting is: > -----original message------ > followed by the message that is replied to, followed by (most often) > the signature of the quotee, which is then followed by the signature > of the quoter. > > Is gnus-cite the right place to {search|implement} that functionality > in? > > kind regards, I wrote a silly function which will take a mail posted by Internet Mail Service or Outlook which quotes in the above way, with the reply before the original message, and other nonsense, and reformats it in the proper way. so a mail whose body looks like: .----------------------------------------------------------------------- | | 5UR3 Th1Ng d00d!!!!!1! | |-----Original Message----- |From: A Person [mailto:aperson@hotmail.com] |Sent: Friday, March 24, 2000 4:11 PM |To: me@tralala.com |Subject: hello | |Please reply to this message in as annoying a manner as you can .______________________________________________________________________ becomes .---------------------------------------------------------------------- |aperson wrote: |> |> Please reply to this message in as annoying a manner as you can |> | |5UR3 Th1Ng d00d!!!!!1! ._______________________________________________________________________ Unfortunately the function is very bad and clobbers the mark and puts things in the kill ring and so-on, so ought to be majorly tidied up, but it may be of some use to someone. Here it is. (defun un-stupify-article () (interactive) (save-excursion (set-buffer gnus-article-buffer) (message-narrow-to-head) (goto-char (point-max)) (widen) (toggle-read-only) (let ((here (point)) (un-stup-author) (nlines) (counter)) (if (re-search-forward "-----Original Message-----") (progn ;; first really quote quoted bits (save-excursion (re-search-forward "^Subject:") (forward-line) (delete-blank-lines) (save-excursion (let ((ici (point))) (goto-char (point-max)) (setq nlines (count-lines ici (point))))) (setq counter 1) (while (< counter nlines) (beginning-of-line) (insert "> ") (forward-line) (setq counter (+ counter 1)))) (beginning-of-line) (kill-region here (point)) (widen) (goto-char (point-max)) (yank) (goto-char (point-min)) (re-search-forward "-----Original Message-----") (beginning-of-line) (kill-line) (kill-line) (re-search-forward "From: ") (let ((ici (point))) (re-search-forward "@") (narrow-to-region ici (point)) (setq un-stup-author (current-word)) (widen)) (beginning-of-line)(kill-line) (insert (concat "\n" un-stup-author " wrote:")) (forward-line) (let ((ici (point))) (re-search-forward "^Subj") (end-of-line) (kill-region ici (point))) ))) (toggle-read-only)))