Fw: ACL 8.1 XP/Emacs 22.3.1/format/fi:compile-buffer strange behavior

Andrew Wolven <[email protected]> Mon, 13 Apr 2009 17:57:50 -0700 (PDT)
Newsgroups gmane.lisp.allegro
Message-ID <[email protected]>
--0-2076924307-1239670670=:88267
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

It does it on my machine too.=0A=0AI haven't really investigated it much, b=
ut when you compile emacs is sending the code over lep::*connection*=A0 whi=
ch has an external format of #<external-format :emacs-mule-base [(crlf-base=
-ef :emacs-mule)] @=A0 #x...>, while the stream you are doing the write-lin=
e to probably has an external format of #<external-format :|1252| ['(:e-crl=
f :1252-base)] @ #x...>.=A0 Maybe there is some difference there.=A0 Just g=
uessing though.=0A=0A-Andrew Wolven=0A=0A=0A=0A----- Forwarded Message ----=
=0AFrom: "Watton, John D." <[email protected]>=0ATo: [email protected]=
om=0ASent: Monday, April 13, 2009 1:33:15 PM=0ASubject: ACL 8.1 XP/Emacs 22=
.3.1/format/fi:compile-buffer strange behavior=0A=0A=0AI have the following=
 function below which in my mind should write two identical files, eol1.txt=
 and eol2.txt. For me the files are not identical when the function is comp=
iled in Emacs 22.3.1 (the one for download on the Franz website), using fi:=
compile-buffer or C-c C-x. The file eol2.txt which uses format has extra ca=
rriage-returns. On the other hand if I use compile-file/load-file, or an ol=
der version of Emacs the written files are identical as expected without ex=
tra carriage-returns.=0A=A0=0AI have submitted this problem to support@fran=
z.com and it has been assigned spr35666, but they were not able to reproduc=
e it. Hopefully, someone else has a suggestion as to a solution. Or can at =
least reproduce it. It is driving me nuts.=0A=A0=0A(defun test-eol ()=0A=A0=
 (let* ((file1 "~/eol1.txt")=0A=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0 =A0(file2 "~/eol2.txt")=A0=A0=A0=A0=A0=A0=A0=A0=A0 )=0A=A0=A0=A0 (with-=
open-file (stream file1 :direction :output :if-exists :supersede)=0A=A0=A0=
=A0=A0=A0 (write-line "Line One" stream)=0A=A0=A0=A0=A0=A0 (write-line "Lin=
e Two" stream)=0A=A0=A0=A0=A0=A0 (write-line "Line Three" stream))=0A=A0=A0=
=A0 =0A=A0=A0=A0 (with-open-file (stream file2 :direction :output :if-exist=
s :supersede)=0A=A0=A0=A0=A0=A0 (format stream "Line One=0ALine Two=0ALine =
Three~%"))))=0A=A0=0A=A0=0A______________________________________=0AJohn Wa=
tton, PhD=0AComputational and Simulation Modeling Section=0AAlcoa Technical=
 Center=0A724-337-2165=0A=0A=0A      
--0-2076924307-1239670670=:88267
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

<html><head><style type=3D"text/css"><!-- DIV {margin:0px;} --></style></he=
ad><body><div style=3D"font-family:arial, helvetica, sans-serif;font-size:1=
2pt"><DIV>It does it on my machine too.</DIV>=0A<DIV>&nbsp;</DIV>=0A<DIV>I =
haven't really investigated it much, but when you compile emacs is sending =
the code over lep::*connection*&nbsp; which has an external format of #&lt;=
external-format :emacs-mule-base [(crlf-base-ef :emacs-mule)] @&nbsp; #x...=
&gt;, while the stream you are doing the write-line to probably has an exte=
rnal format of #&lt;external-format :|1252| ['(:e-crlf :1252-base)] @ #x...=
&gt;.&nbsp; Maybe there is some difference there.&nbsp; Just guessing thoug=
h.</DIV>=0A<DIV>&nbsp;</DIV>=0A<DIV>-Andrew Wolven<BR></DIV>=0A<DIV style=
=3D"FONT-SIZE: 12pt; FONT-FAMILY: arial, helvetica, sans-serif"><BR>=0A<DIV=
 style=3D"FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, s=
erif"><FONT face=3DTahoma size=3D2>----- Forwarded Message ----<BR><B><SPAN=
 style=3D"FONT-WEIGHT: bold">From:</SPAN></B> "Watton, John D." &lt;John.Wa=
[email protected]&gt;<BR><B><SPAN style=3D"FONT-WEIGHT: bold">To:</SPAN></B> a=
[email protected]<BR><B><SPAN style=3D"FONT-WEIGHT: bold">Sent:</SPAN></B=
> Monday, April 13, 2009 1:33:15 PM<BR><B><SPAN style=3D"FONT-WEIGHT: bold"=
>Subject:</SPAN></B> ACL 8.1 XP/Emacs 22.3.1/format/fi:compile-buffer stran=
ge behavior<BR></FONT><BR>=0A<STYLE>=0A<!--=0A =0A _filtered {font-family:C=
alibri;panose-1:2 15 5 2 2 2 4 3 2 4;}=0A =0Ap.MsoNormal, li.MsoNormal, div=
.MsoNormal=0A=09{margin:0in;margin-bottom:.0001pt;font-size:11.0pt;font-fam=
ily:"Calibri", "sans-serif";}=0Aa:link, span.MsoHyperlink=0A=09{color:blue;=
text-decoration:underline;}=0Aa:visited, span.MsoHyperlinkFollowed=0A=09{co=
lor:purple;text-decoration:underline;}=0Aspan.EmailStyle17=0A=09{font-famil=
y:"Calibri", "sans-serif";color:black;}=0A.MsoChpDefault=0A=09{}=0A _filter=
ed {margin:1.0in 1.0in 1.0in 1.0in;}=0Adiv.Section1=0A=09{}=0A-->=0A</STYLE=
>=0A=0A<DIV class=3DSection1>=0A<P class=3DMsoNormal><SPAN style=3D"COLOR: =
black">I have the following function below which in my mind should write tw=
o identical files, eol1.txt and eol2.txt. For me the files are not identica=
l when the function is compiled in Emacs 22.3.1 (the one for download on th=
e Franz website), using fi:compile-buffer or C-c C-x. The file eol2.txt whi=
ch uses format has extra carriage-returns. On the other hand if I use compi=
le-file/load-file, or an older version of Emacs the written files are ident=
ical as expected without extra carriage-returns.</SPAN></P>=0A<P class=3DMs=
oNormal><SPAN style=3D"COLOR: black">&nbsp;</SPAN></P>=0A<P class=3DMsoNorm=
al><SPAN style=3D"COLOR: black">I have submitted this problem to <A href=3D=
"mailto:[email protected]" target=3D_blank rel=3Dnofollow ymailto=3D"mailto=
:[email protected]">[email protected]</A> and it has been assigned spr35666=
, but they were not able to reproduce it. Hopefully, someone else has a sug=
gestion as to a solution. Or can at least reproduce it. It is driving me nu=
ts.</SPAN></P>=0A<P class=3DMsoNormal><SPAN style=3D"COLOR: black">&nbsp;</=
SPAN></P>=0A<P class=3DMsoNormal><SPAN style=3D"COLOR: black">(defun test-e=
ol ()</SPAN></P>=0A<P class=3DMsoNormal><SPAN style=3D"COLOR: black">&nbsp;=
 (let* ((file1 "~/eol1.txt")</SPAN></P>=0A<P class=3DMsoNormal><SPAN style=
=3D"COLOR: black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;(file2 "~/eol2.txt")&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )</SPAN></P>=0A<P class=3DMsoNormal=
><SPAN style=3D"COLOR: black">&nbsp;&nbsp;&nbsp; (with-open-file (stream fi=
le1 :direction :output :if-exists :supersede)</SPAN></P>=0A<P class=3DMsoNo=
rmal><SPAN style=3D"COLOR: black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (write-lin=
e "Line One" stream)</SPAN></P>=0A<P class=3DMsoNormal><SPAN style=3D"COLOR=
: black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (write-line "Line Two" stream)</SPA=
N></P>=0A<P class=3DMsoNormal><SPAN style=3D"COLOR: black">&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp; (write-line "Line Three" stream))</SPAN></P>=0A<P class=3DMs=
oNormal><SPAN style=3D"COLOR: black">&nbsp;&nbsp;&nbsp; </SPAN></P>=0A<P cl=
ass=3DMsoNormal><SPAN style=3D"COLOR: black">&nbsp;&nbsp;&nbsp; (with-open-=
file (stream file2 :direction :output :if-exists :supersede)</SPAN></P>=0A<=
P class=3DMsoNormal><SPAN style=3D"COLOR: black">&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp; (format stream "Line One</SPAN></P>=0A<P class=3DMsoNormal><SPAN style=
=3D"COLOR: black">Line Two</SPAN></P>=0A<P class=3DMsoNormal><SPAN style=3D=
"COLOR: black">Line Three~%"))))</SPAN></P>=0A<P class=3DMsoNormal><SPAN st=
yle=3D"COLOR: black">&nbsp;</SPAN></P>=0A<P class=3DMsoNormal><SPAN style=
=3D"COLOR: black">&nbsp;</SPAN></P>=0A<P class=3DMsoNormal><I><SPAN style=
=3D"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Arial', 'sans-serif'">____=
__________________________________</SPAN></I><SPAN style=3D"COLOR: black"><=
/SPAN></P>=0A<P class=3DMsoNormal><I><SPAN style=3D"FONT-SIZE: 10pt; COLOR:=
 black; FONT-FAMILY: 'Arial', 'sans-serif'">John Watton, PhD</SPAN></I><SPA=
N style=3D"COLOR: black"></SPAN></P>=0A<P class=3DMsoNormal><SPAN style=3D"=
FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Arial', 'sans-serif'">Computat=
ional and Simulation Modeling Section</SPAN><SPAN style=3D"COLOR: black"></=
SPAN></P>=0A<P class=3DMsoNormal><SPAN style=3D"FONT-SIZE: 10pt; COLOR: bla=
ck; FONT-FAMILY: 'Arial', 'sans-serif'">Alcoa Technical Center</SPAN><SPAN =
style=3D"COLOR: black"></SPAN></P>=0A<P class=3DMsoNormal><SPAN style=3D"FO=
NT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Arial', 'sans-serif'">724-337-21=
65</SPAN></P>=0A<P class=3DMsoNormal>&nbsp;</P></DIV></DIV></DIV></div><br>=
=0A=0A      </body></html>
--0-2076924307-1239670670=:88267--