Gnus development mailing list
 help / color / mirror / Atom feed
* Removing headers from mail..
@ 1996-03-05  8:14 Andrew Eskilsson
  1996-03-05 20:17 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Eskilsson @ 1996-03-05  8:14 UTC (permalink / raw)


When looking at the raw mail articles I have, they have a bunch of
'Received' lines in their headers, it would be nice if these could be
removed.. 

The gnus-save-all-headers seems only to work when saving news
articles, not when archiving mail.

	/andy

-- 
 Don't walk in front of me, I might be unable to follow you.
 Don't walk after me, I might be unable to lead you.
 Just walk by my side and be my friend.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Removing headers from mail..
  1996-03-05  8:14 Removing headers from mail Andrew Eskilsson
@ 1996-03-05 20:17 ` Lars Magne Ingebrigtsen
  1996-03-05 20:57   ` Andy Eskilsson
  0 siblings, 1 reply; 5+ messages in thread
From: Lars Magne Ingebrigtsen @ 1996-03-05 20:17 UTC (permalink / raw)


Andrew Eskilsson <mpt95aes@pt.hk-r.se> writes:

> When looking at the raw mail articles I have, they have a bunch of
> 'Received' lines in their headers, it would be nice if these could be
> removed.. 

Write a function to remove the Received headers and put in
`nnmail-prepare-incoming-hook'.  That hook is called before handling
incoming mail.

-- 
  "Yes.  The journey through the human heart 
     would have to wait until some other time."


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Removing headers from mail..
  1996-03-05 20:17 ` Lars Magne Ingebrigtsen
@ 1996-03-05 20:57   ` Andy Eskilsson
  1996-03-07 21:29     ` Kai Grossjohann
  1996-03-17 13:24     ` Lars Magne Ingebrigtsen
  0 siblings, 2 replies; 5+ messages in thread
From: Andy Eskilsson @ 1996-03-05 20:57 UTC (permalink / raw)
  Cc: ding

/ larsi@ifi.uio.no (Lars Magne Ingebrigtsen) wrote:
| 
| Andrew Eskilsson <mpt95aes@pt.hk-r.se> writes:
| 
| > When looking at the raw mail articles I have, they have a bunch of
| > 'Received' lines in their headers, it would be nice if these could be
| > removed.. 
| 
| Write a function to remove the Received headers and put in
| `nnmail-prepare-incoming-hook'.  That hook is called before handling
| incoming mail.

Hmm could be nice to have a chance seeing the received-by headings
first, but I guess there is a hook to attach to when copying/moving
articles too.

The second problem is that I could do a hook that deletes one line,
but the Received lines often span a couple of lines, is there any
small function that can take care of this?

	/andy

-- 
 Don't walk in front of me, I might be unable to follow you.
 Don't walk after me, I might be unable to lead you.
 Just walk by my side and be my friend.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Removing headers from mail..
  1996-03-05 20:57   ` Andy Eskilsson
@ 1996-03-07 21:29     ` Kai Grossjohann
  1996-03-17 13:24     ` Lars Magne Ingebrigtsen
  1 sibling, 0 replies; 5+ messages in thread
From: Kai Grossjohann @ 1996-03-07 21:29 UTC (permalink / raw)
  Cc: ding

>>>>> On 05 Mar 1996 21:57:13 +0100, Andy Eskilsson
>>>>> <mpt95aes@pt.hk-r.se> said:

  Andy> The second problem is that I could do a hook that deletes one
  Andy> line, but the Received lines often span a couple of lines, is
  Andy> there any small function that can take care of this?

This should kinda give you the idea:

(defun kill-long-line ()
  ; kill a region between (A) and (B)
  (kill-region
    ; (A) is the spot where the cursor currently is
    (point)
    ; don't move point while determining (B)
    (save-excursion
      ; (B) is at least at the beginning of the next line
      ; (note that forward-line moves to beginning of next line)
      (forward-line 1)
      ; if we're looking at a continuation line (which begins with
      ; whitespace followed by non-whitespace), ...
      (while (looking-at "^[ \t]+[^ \t]+")
        ; move another line
        (forward-line 1))
      ; (B) is where we have moved now
      (point))))

I don't know if you want to restrict the whole thing to the header
section only, or something.

The code is untested!!

        kai
--
~/.signature


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Removing headers from mail..
  1996-03-05 20:57   ` Andy Eskilsson
  1996-03-07 21:29     ` Kai Grossjohann
@ 1996-03-17 13:24     ` Lars Magne Ingebrigtsen
  1 sibling, 0 replies; 5+ messages in thread
From: Lars Magne Ingebrigtsen @ 1996-03-17 13:24 UTC (permalink / raw)
  Cc: ding

Andy Eskilsson <mpt95aes@pt.hk-r.se> writes:

> The second problem is that I could do a hook that deletes one line,
> but the Received lines often span a couple of lines, is there any
> small function that can take care of this?

`(nnheader-remove-header "received")' will delete all Received headers
in the narrowed buffer.  It should handle continuation lines
correctly. 

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@ifi.uio.no * Lars Ingebrigtsen


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1996-03-17 13:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-03-05  8:14 Removing headers from mail Andrew Eskilsson
1996-03-05 20:17 ` Lars Magne Ingebrigtsen
1996-03-05 20:57   ` Andy Eskilsson
1996-03-07 21:29     ` Kai Grossjohann
1996-03-17 13:24     ` Lars Magne Ingebrigtsen

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).