Gnus development mailing list
 help / color / mirror / Atom feed
* Resending
@ 1995-12-05  9:52 David K}gedal
  1995-12-06 18:08 ` Resending Sten Drescher
  0 siblings, 1 reply; 6+ messages in thread
From: David K}gedal @ 1995-12-05  9:52 UTC (permalink / raw)
  Cc: gnus-bug

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


^ permalink raw reply	[flat|nested] 6+ messages in thread
* Resending
@ 1995-12-04  4:18 Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 6+ messages in thread
From: Lars Magne Ingebrigtsen @ 1995-12-04  4:18 UTC (permalink / raw)


`S D r' will now prompt you for an address and resend the current
message to that address.  A slew of "Resend-*"-headers will be added
to the message; other than that the message won't be changed at all. 

(Took longer to write the documentation than writing the function. :-) 

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


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

end of thread, other threads:[~1995-12-10 15:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1995-12-05  9:52 Resending David K}gedal
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

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