On 4/23/07 Michael Wiik wrote:

>I can see where this might make it easier for those long used to  
>macs, and using \r's works, but as someone who didn't use a mac till  
>OS X it seems counterintuitive to call a \n a \r.

I agree that it's something to get used to. Just keep in mind that
BBEdit always uses \r for line endings when it presents a file, and
likewise always saves line endings to the file using the line ending
construct of the original.

Because line endings are not, strictly speaking, unique characters,
there has to be some fiction adopted for a program to seamlessly present
files from all systems. 

I work in files from UNIX ("\n"), Mac OS X/Darwin/UNIX ("\n"), Windows
("\r\n"), and Mac OS 9/Classic ("\r"). To add to the fun, many Mac OS X
applications still use "\r" (MS Excel, for example, which you'll see if
you save a spreadsheet as text).

I now see this less as a Mac-centric thing than as just a matter of
consistency. So in BBEdit search boxes, text factories, etc., where I
need to specify a line ending, I've learned to use "\r". 

This is actually much like Perl, which uses "\n" to stand for whatever
line ending construct is native to the operating system it's executing
in. (In Perl, if I really want to specify a certain character, I use
octal notation, so line endings are: UNIX - "\012", DOS/Win -
"\015\012", Mac Classic - "\015", VMS - "\012", etc.)

BBEdit's behavior in this regard also prevents mixing line endings from
different systems in the same file -- a favorite ;-) topic of Doug
McNutt, another denizen of this list.

HTH,





- Bruce

__bruce__van_allen__santa_cruz__ca__

--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to:  <[EMAIL PROTECTED]>

Reply via email to