Gnus development mailing list
 help / color / mirror / Atom feed
From: Paul Stevenson <spaul@icx.net>
Subject: Re: Hiding of -----original message----- citations?
Date: 24 Mar 2000 21:18:49 -0500	[thread overview]
Message-ID: <m3zornhjw6.birthplaces@pumpkin.dyndns.org> (raw)
In-Reply-To: <8766uevogd.fsf@dahaIM.bsdonline.org>

Andreas Fuchs <asf@acm.org> 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)))







  parent reply	other threads:[~2000-03-25  2:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-22 18:39 Andreas Fuchs
     [not found] ` <wtnhfdyennv.fsf@licia.dtek.chalmers.se>
2000-03-23 18:27   ` Andreas Fuchs
     [not found]     ` <wtnwvmsk5t5.fsf@licia.dtek.chalmers.se>
2000-03-24 14:24       ` Hannu Koivisto
2000-03-25  2:18 ` Paul Stevenson [this message]
     [not found]   ` <wtnya7778ga.fsf@licia.dtek.chalmers.se>
2000-03-25 14:18     ` Paul Stevenson
2000-04-20 18:36   ` Lars Magne Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3zornhjw6.birthplaces@pumpkin.dyndns.org \
    --to=spaul@icx.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).