Gnus development mailing list
 help / color / mirror / Atom feed
From: davidk@lysator.liu.se (David K}gedal)
Cc: gnus-bug@ifi.uio.no
Subject: Resending
Date: 05 Dec 1995 10:52:37 +0100	[thread overview]
Message-ID: <jpivjvzvkq.fsf@tiny.lysator.liu.se> (raw)

This patch fixes the most serious bugs in the resending code in 0.18,
making it almost useful...

It also fixes a bug that made Gnus always insert a Sender header, even
when it was not supposed to.

I still get the headers "Resent-Sender" and "Resent-Message-ID", which
I'm not too fond of, at least not the first.

*** lisp/ChangeLog	Tue Dec  5 06:11:09 1995
--- lisp/ChangeLog	Tue Dec  5 10:44:13 1995
***************
*** 1,3 ****
--- 1,10 ----
+ Tue Dec  5 10:35:51 1995  David K}gedal  <davidk@lysator.liu.se>
+ 
+ 	* gnus-msg.el (gnus-inews-insert-headers): Use cadr of the result
+ 	from gnus-extract-address-components instead of the car.
+ 	(gnus-summary-resend-message): Do not call mail-setup, and use
+ 	fewer headers.
+ 
  Tue Dec  5 03:22:37 1995  Lars Magne Ingebrigtsen  <larsi@narfi.ifi.uio.no>
  
  	* nnbabyl.el (nnbabyl-close-server): Restore buffer mode on exit.
*** lisp/gnus-msg.el	Tue Dec  5 06:10:53 1995
--- lisp/gnus-msg.el	Tue Dec  5 10:44:05 1995
***************
*** 1182,1193 ****
        (if (and from 
  	       (not (gnus-check-before-posting 'sender))
  	       (not (string=
! 		     (downcase (car (gnus-extract-address-components from)))
  		     (downcase (gnus-inews-real-user-address))))
  	       (or (null sender)
  		   (not 
  		    (string=
! 		     (downcase (car (gnus-extract-address-components sender)))
  		     (downcase (gnus-inews-real-user-address))))))
  	  (progn
  	    (goto-char (point-min))    
--- 1182,1193 ----
        (if (and from 
  	       (not (gnus-check-before-posting 'sender))
  	       (not (string=
! 		     (downcase (car (cdr (gnus-extract-address-components from))))
  		     (downcase (gnus-inews-real-user-address))))
  	       (or (null sender)
  		   (not 
  		    (string=
! 		     (downcase (car (cdr (gnus-extract-address-components sender))))
  		     (downcase (gnus-inews-real-user-address))))))
  	  (progn
  	    (goto-char (point-min))    
***************
*** 1512,1527 ****
      (let (resent)
        ;; We first set up a normal mail buffer.
        (nnheader-set-temp-buffer " *Gnus resend*")
!       (gnus-mail-setup 'new address)
        ;; Insert our usual headers.
        (gnus-inews-narrow-to-headers)
!       (let ((headers '(From Date To Message-ID Organization)))
  	(gnus-inews-insert-headers headers))
        (goto-char (point-min))
        ;; Rename them all to "Resent-*".
!       (while (re-search-forward "^" nil t)
  	(insert "Resent-"))
        (widen)
        (delete-region (point) (point-max))
        ;; Insert the message to be resent.
        (insert-buffer-substring gnus-original-article-buffer)
--- 1512,1536 ----
      (let (resent)
        ;; We first set up a normal mail buffer.
        (nnheader-set-temp-buffer " *Gnus resend*")
!       ;; This code from sendmail.el
!       (insert "To: ")
!       (let ((fill-prefix "\t")
! 	    (address-start (point)))
! 	(insert address "\n")
! 	(fill-region-as-paragraph address-start (point-max)))
!       ;;
!       (insert mail-header-separator "\n")
        ;; Insert our usual headers.
        (gnus-inews-narrow-to-headers)
!       (let ((headers '(From Date To)))
  	(gnus-inews-insert-headers headers))
        (goto-char (point-min))
        ;; Rename them all to "Resent-*".
!       (while (re-search-forward "^[A-Za-z]" nil t)
! 	(forward-char -1)
  	(insert "Resent-"))
        (widen)
+       (forward-line)
        (delete-region (point) (point-max))
        ;; Insert the message to be resent.
        (insert-buffer-substring gnus-original-article-buffer)


-- 
David Kågedal     Lysator Academic Computer Society       davidk@lysator.liu.se
http://www.lysator.liu.se/~davidk/                              +46-13 17 65 89


             reply	other threads:[~1995-12-05  9:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-12-05  9:52 David K}gedal [this message]
1995-12-06 18:08 ` Resending Sten Drescher
1995-12-08 16:45   ` Resending David K}gedal
1995-12-08 20:09     ` Resending Sten Drescher
1995-12-10 15:15       ` Resending Lars Magne Ingebrigtsen
  -- strict thread matches above, loose matches on Subject: below --
1995-12-04  4:18 Resending 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=jpivjvzvkq.fsf@tiny.lysator.liu.se \
    --to=davidk@lysator.liu.se \
    --cc=gnus-bug@ifi.uio.no \
    /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).