* Typo in buff-ini.lua
@ 2011-04-16 17:19 Aditya Mahajan
2011-04-16 18:24 ` Aditya Mahajan
0 siblings, 1 reply; 3+ messages in thread
From: Aditya Mahajan @ 2011-04-16 17:19 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hi Hans,
In buff-ini.lua, line 73 should be
return concat(t,separator or "\n") -- AM: was \r
Otherwise, the following gives a wrong output:
\startbuffer[one]
This is one
\stopbuffer
\startbuffer[two]
This is two
\stopbuffer
\ctxcommand{savebuffer({"one", "two"}, "test.tmp")}
\end
Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Typo in buff-ini.lua
2011-04-16 17:19 Typo in buff-ini.lua Aditya Mahajan
@ 2011-04-16 18:24 ` Aditya Mahajan
2011-04-16 20:43 ` Hans Hagen
0 siblings, 1 reply; 3+ messages in thread
From: Aditya Mahajan @ 2011-04-16 18:24 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Sat, 16 Apr 2011, Aditya Mahajan wrote:
> Hi Hans,
>
> In buff-ini.lua, line 73 should be
>
> return concat(t,separator or "\n") -- AM: was \r
Actually, I am not sure if this is a bug or not. I was testing by "cat
filename" and was only seeing the last line. Opening the file on editor
shows that the file contains
This is one^MThis is two
So, it is just a matter of how the OS handles line breaks.
Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Typo in buff-ini.lua
2011-04-16 18:24 ` Aditya Mahajan
@ 2011-04-16 20:43 ` Hans Hagen
0 siblings, 0 replies; 3+ messages in thread
From: Hans Hagen @ 2011-04-16 20:43 UTC (permalink / raw)
To: mailing list for ConTeXt users
On 16-4-2011 8:24, Aditya Mahajan wrote:
> On Sat, 16 Apr 2011, Aditya Mahajan wrote:
>
>> Hi Hans,
>>
>> In buff-ini.lua, line 73 should be
>>
>> return concat(t,separator or "\n") -- AM: was \r
>
> Actually, I am not sure if this is a bug or not. I was testing by "cat
> filename" and was only seeing the last line. Opening the file on editor
> shows that the file contains
>
> This is one^MThis is two
>
> So, it is just a matter of how the OS handles line breaks.
it's more tricky ... tex normalizes crlf into its own line ending (^^M)
newlinechar -> used when writing (ascii 10 by default)
endofline -> ^^M (13)
and all over the mkiv/lua code you will find traces of this
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-04-16 20:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-16 17:19 Typo in buff-ini.lua Aditya Mahajan
2011-04-16 18:24 ` Aditya Mahajan
2011-04-16 20:43 ` Hans Hagen
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).