[squeak-dev] support of various line ends in trunk

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Tue Nov 17 18:16:48 UTC 2009


2009/11/17 Igor Stasenko <siguctua at gmail.com>:
> 2009/11/17 Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com>:
>> 2009/11/17 Jimmie Houchin <j.squeak at cyberhaus.us>:
>>> On 11/17/2009 8:47 AM, Juan Vuletich wrote:
>>>>
>>>> I never talked about control chars. We were talking about line ending
>>>> conversions. A typical scenario is needing to edit ini files for real users
>>>> that are stored in a server. I need to support users with Windows and Mac.
>>>> And I want to leave the files as they need them. The best way to do that is
>>>> with the Cuis editor. Then, I'm in control.
>>>
>>> You are doing this from Squeak?
>>>
>>> It would seem to me to be more natural for the editing in Squeak to be of a
>>> single consistent line ending and then the export to your server into the
>>> line ending type required there.
>>>
>>> Neither Mac nor Windows or anyone to my knowledge desire/require any line
>>> ending outside of their native default line ending. So I fail to see why
>>> this would be important in the editor and done better in the editor than in
>>> the export mechanism saving the edited text to a file whether local or
>>> network?
>>>
>>
>> You simply never worked with cygwin under windows, nor transfered
>> files edited in windows to QNX et vice et versa.
>>
>>> And in a previous email you wrote:
>>> On 11/16/2009 4:10 PM, Juan Vuletich wrote:
>>>>
>>>> I think you got this one wrong. In Cuis, in a workspace you can tell the
>>>> line ending of each line (cr, lf or crlf) and you can actually type all
>>>> three. Please try it! Use <Enter>, <Shift-Enter> and <Cmd/Alt-Enter>.
>>>> This way you can edit a text file, and keep it consistent. Otherwise, if
>>>> you edit an existing file that was edited with a Unix or Windows editor
>>>> and add CRs to it it will use more than one convention, without you
>>>> realizing. Showing all in the same way is misleading. Different Strings
>>>> should look different in the editor!
>>>
>>> I still fail to see a purpose in having more than one line ending type in a
>>> single document or file. It isn't natural.
>>>
>>> And if only one type of line ending in a document/file/string.
>>> Editing (internal) line endings does not necessarily equal export or
>>> external line endings.
>>>
>>> If you have a purpose for multiple line endings in a single
>>> file/document/object/... I would like to know what that is.
>>>
>>> If not, then it would seem that simply having the ability to export to a
>>> platform explicit version (regardless of the platform of current use) is a
>>> valuable thing. But should be an explicit decision not a default one.
>>>
>>> Jimmie
>>>
>>
>> It's not the desire of any one, it is just reallity. Simple modern
>> code editors (string editors) can deal with mixed line endings and
>> most tools won't care, this is just transparent, and we can have that
>> in Squeak to, it's easy and cheap.
>>
>> For example, plenty of squeak code did contain line feeds, and that
>> did not hurt... (except when the ugly boxes were displayed).
>> If we have applications with strict requirements, then no problem, we
>> will continue to do the convert from/edit/convert to cycle.
>>
>
> Nicolas, i'm also not a first year playing these games, and know by
> myself the pain of line endings
> when transferring the text files between platforms. And from my
> experience, the less magic we have there - the better.
> Give me the means to explicitly tell, what line endings a saved text
> should have, and this is all i want.
> Preserving an original line-endings is cool thing, but not necessary,
> since again, if your file going to be used on multiple platforms,
> you may need to convert it with some tool.
>
> But see, i don't care where text came from , as soon as it displayed
> well (not as a single line and no boxes instead of chars), i presume
> text import works well.
> Saving an edited text (modified by user), while preserving original
> byte-to-byte contents is much less important.
>
>
>> Qui peut le plus peut le moins.
>>
>> Nicoals
>>
>>
>

Igor,
To make it clear, I did not changed any conversion layer neither in nor out.
All I did was to:
- extend support for splitting a String (or Text) lines according to
any line end conventions
  if all have been correctly converted to cr, like due in most
application then my changes are 100% neutral
  if someone has specific needs, then he gained some support
- changed rendering of lf and cr-lf to remove ugly boxes

I did not change any conversion policy in place in Squeak, so I think
the discussion is going much further the limited horizon of those
changes.

Nicolas

>
>
> --
> Best regards,
> Igor Stasenko AKA sig.
>
>



More information about the Squeak-dev mailing list