🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #100016

Re: Bug in sendmail.el

#100016
From: Piet van Oostrum
Date: Tue, 06 Mar 1990 12:21
41 lines
2543 bytes
In article <2593@ruuinf.cs.ruu.nl>, piet@cs (Piet van Oostrum) writes:
 `The function mail-do-fcc will insert a message in the buffer if the file
 `mentioned is in memory. However, if the buffer has been narrowed, the
 `contents of the outgoing mail message is put at the end of the narrowed
 `region, rather than the end of the buffer. This can be corrected by doing a
 `widen (inside a save-restriction) in the function. This still does not
 `correctly restore the narrowing, but at least puts the data in the correct
 `place. I got the problem while using VM.
 `
I have got a new patch that does correctly restore the narrowing:

*** sendmail.el.~1~	Fri Sep 15 16:24:03 1989
--- sendmail.el	Tue Mar  6 13:16:31 1990
***************
*** 295,302 ****
  		    (beg (point-min)) (end (point-max)))
  		(save-excursion
  		  (set-buffer buffer)
! 		  (goto-char (point-max))
! 		  (insert-buffer-substring curbuf beg end)))
  	    ;; Else append to the file directly.
  	    (write-region (point-min) (point-max) (car fcc-list) t)))
  	(setq fcc-list (cdr fcc-list))))
--- 295,306 ----
  		    (beg (point-min)) (end (point-max)))
  		(save-excursion
  		  (set-buffer buffer)
! 		  (let ((b (point-min)) (e (point-max)) n)
! 		    (widen)
! 		    (setq n (and (equal b (point-min)) (equal e (point-max))))
! 		    (goto-char (point-max))
! 		    (insert-buffer-substring curbuf beg end)
! 		    (or n (narrow-to-region b e)))))
  	    ;; Else append to the file directly.
  	    (write-region (point-min) (point-max) (car fcc-list) t)))
  	(setq fcc-list (cdr fcc-list))))
-- 
Piet* van Oostrum, Dept of Computer Science, Utrecht University,
Padualaan 14, P.O. Box 80.089, 3508 TB Utrecht, The Netherlands.
Telephone: +31-30-531806   Uucp:   uunet!mcsun!hp4nl!ruuinf!piet
Telefax:   +31-30-513791   Internet:  piet@cs.ruu.nl   (*`Pete')
Technical Details
Message-ID: <2595@ruuinf.cs.ruu.nl>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!hp4nl!ruuinf!cs.ruu.nl
References: <2593@ruuinf.cs.ruu.nl>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fb2f1,7c7ddbfa7f5a350e
X-Google-Attributes: gidfb2f1,public
X-Google-ArrivalTime: 1990-03-06 04:21:15 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!hp4nl!ruuinf!cs.ruu.nl
From: piet@cs.ruu.nl (Piet van Oostrum)
Newsgroups: gnu.emacs.bug
Subject: Re: Bug in sendmail.el
Message-ID: <2595@ruuinf.cs.ruu.nl>
Date: 6 Mar 90 12:21:15 GMT
References: <2593@ruuinf.cs.ruu.nl>
Sender: news@ruuinf.cs.ruu.nl
Reply-To: piet@cs.ruu.nl (Piet van Oostrum)
Organization: Dept of Computer Science, Utrecht University, The Netherlands
Lines: 41
Posted: Tue Mar  6 13:21:15 1990
In-reply-to: piet@cs.ruu.nl (Piet van Oostrum)