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

Jimmie Houchin j.squeak at cyberhaus.us
Tue Nov 17 18:06:06 UTC 2009


On 11/17/2009 11:38 AM, Juan Vuletich wrote:
> Jimmie Houchin wrote:
>> 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?
>
> From Cuis, actually.
>
>> 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?
>
> Possible uses for that have been said by me and others. Besides, I 
> hate automatic conversions. I want to be in control of what is done 
> with a file I'm editing.
>
>> 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.
>
> I don't see a need for that either, but that is not a reason for 
> forbidding it!

Consistency has value. I would think the default treatment should be 
toward consistency and cleanness.
One of the nice things about Smalltalk is consistency. I just don't 
think that simply because the ugliness of the world intrudes that we 
must leave it ugly.

Forbidding it, no. But make it a specific decision by someone with the 
capacity and understanding of the purpose of their explicit decision.

I can see potential purposes for application specific uses of mixed line 
endings. But not general text purposes.

>> 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.
>
> In Squeak, so far, yes. What you have in the file goes into the 
> string, and what's in the string goes to the file.
>
>> 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.
>
> In Cuis it is as explicit as it can be. <Enter>, <Shift-Enter> and 
> <Alt-Enter> inserts one of the 3 usual line endings. And you can 
> always tell them by looking at the screen.

And do you normally use more than one when editing a file. Or do you 
generally have a specific one with a purpose for that file/string?
If not it would seem that a setting in your editor for the desired line 
ending for that string would be nicer. And generally this would be for 
export purposes, because internally in Squeak what purpose does it have?
I have never seen a situation where I wanted to introduce inconsistency 
into a file. If inconsistency already existed I preferred to correct it.
Do you have situations where you encounter a file in an inconsistent 
state that it is actually required to stay that way? Or merely to have a 
desired line ending for its specified environment and purpose?

Thanks.

Jimmie




More information about the Squeak-dev mailing list