Re: cr, lf, and reading in terminals/vim

2019-10-31 Thread Richard Gaskin via use-livecode
Brian Milby wrote: > https://github.com/livecode/livecode/pull/7214 > > We'll see where it goes this time... Thank you, Brian. This is a good step forward for the usability of the language. -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and

Re: cr, lf, and reading in terminals/vim

2019-10-31 Thread Brian Milby via use-livecode
https://github.com/livecode/livecode/pull/7214 We'll see where it goes this time... On Thu, Oct 31, 2019 at 12:27 PM Brian Milby wrote: > I’ll submit a PR tonight. > > Thanks, > Brian > On Oct 31, 2019, 12:26 PM -0400, Richard Gaskin via use-livecode < > use-livecode@lists.runrev.com>, wrote: >

Re: cr, lf, and reading in terminals/vim

2019-10-31 Thread Bob Sneidar via use-livecode
Possibly, but then where is the original file? And why make a new file when closed without saving? Bob S > On Oct 31, 2019, at 09:54 , J. Landman Gay via use-livecode > wrote: > > Or could this be a result of OS Xs decision to save iterative versions of a > file whether you want it to or n

Re: cr, lf, and reading in terminals/vim

2019-10-31 Thread J. Landman Gay via use-livecode
Or could this be a result of OS Xs decision to save iterative versions of a file whether you want it to or not? -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On October 31, 2019 11:46:29 AM Richard Gaskin via use-livecode wrote: Bob

Re: cr, lf, and reading in terminals/vim

2019-10-31 Thread Richard Gaskin via use-livecode
Bob Sneidar wrote: > I would expect I could open a file to look at it, close it without > saving, and absolutely nothing would change. But it does. > > I know this because I tested it with one of the aforementioned Address > Book Export files. I exported the file, then imported it without > openi

Re: cr, lf, and reading in terminals/vim

2019-10-31 Thread Bob Sneidar via use-livecode
I gave the wrong impression. I was saying that other apps and it perhaps the OS X system itself takes liberties with conversion of line endings. For instance, Mocrosoft Word and Excel. I would expect I could open a file to look at it, close it without saving, and absolutely nothing would change.

Re: cr, lf, and reading in terminals/vim

2019-10-31 Thread Brian Milby via use-livecode
I’ll submit a PR tonight. Thanks, Brian On Oct 31, 2019, 12:26 PM -0400, Richard Gaskin via use-livecode , wrote: > Ben Rubinstein wrote: > > > Brian Milby wrote: > > > My suggestion is to just bite the bullet and build LC where 'file' > > > exports using LF on Mac > > > > Oh please yes! > > Seco

Re: cr, lf, and reading in terminals/vim

2019-10-31 Thread Richard Gaskin via use-livecode
Ben Rubinstein wrote: > Brian Milby wrote: >> My suggestion is to just bite the bullet and build LC where 'file' >> exports using LF on Mac > > Oh please yes! Seconded. Containing the scope of the remedy to text writes should affect very few, and those affected will probably welcome the change

Re: cr, lf, and reading in terminals/vim

2019-10-31 Thread Klaus major-k via use-livecode
Hi Ben, > Am 31.10.2019 um 16:16 schrieb Ben Rubinstein via use-livecode > : > >> My suggestion is to just bite the bullet and build LC where 'file' exports >> using LF on Mac > Oh please yes! > It's been 18 years since the Mac standardised on LF. (And AFAIK Metacard only > started supporting t

Re: cr, lf, and reading in terminals/vim

2019-10-31 Thread Ben Rubinstein via use-livecode
My suggestion is to just bite the bullet and build LC where 'file' exports using LF on Mac Oh please yes! It's been 18 years since the Mac standardised on LF. (And AFAIK Metacard only started supporting the Mac eight years before that, so Metacard/Revolution/LiveCode has already been writing

Re: cr, lf, and reading in terminals/vim

2019-10-31 Thread Bob Sneidar via use-livecode
Not to disagree, but just to mention this is not exclusive to LC. If I download the address book of a Toshiba copier, then just OPEN it with Microsoft Office ot TextEdit, then close without saving, I can no longer import that file into the copier again. Upon examining the ascii value of every

Re: cr, lf, and reading in terminals/vim

2019-10-31 Thread Bob Sneidar via use-livecode
Interesting. This may be why when I copy code from the SE and paste it into an email I get double line spacing. Bob S > On Oct 30, 2019, at 19:08 , Brian Milby via use-livecode > wrote: > > The reason for the difficulty is that internally LC uses LF as the line > ending. The cr, lf, and re

Re: cr, lf, and reading in terminals/vim

2019-10-30 Thread Brian Milby via use-livecode
My suggestion is to just bite the bullet and build LC where 'file' exports using LF on Mac. The change required is literally a couple of characters in one file (maybe two files to include the server default, but you can already change it there on demand). Leave the constants as they are (LF). It

Re: cr, lf, and reading in terminals/vim

2019-10-30 Thread Richard Gaskin via use-livecode
Brian Milby wrote: > The reason for the difficulty is that internally LC uses LF as the > line ending. The cr, lf, and return constants all actually map to LF. > When you write a text file, LC will convert line endings to the native > format. So for Windows you get CRLF, Linux gets LF, and Mac

Re: cr, lf, and reading in terminals/vim

2019-10-30 Thread Brian Milby via use-livecode
The reason for the difficulty is that internally LC uses LF as the line ending. The cr, lf, and return constants all actually map to LF. When you write a text file, LC will convert line endings to the native format. So for Windows you get CRLF, Linux gets LF, and Mac gets CR. I take issue with

Re: cr, lf, and reading in terminals/vim

2019-10-30 Thread hh via use-livecode
In case your python file becomes a bit more complicated, you shouldn't use workarounds as using backspace to come to a binary format, because you then need exact indents (could be tabs). Better use (without replacing anything in mrgCmds) Matthias' answer to use binary write. Or the usual variant

Re: cr, lf, and reading in terminals/vim

2019-10-30 Thread Dr. Hawkins via use-livecode
On Oct 30, 2019, at 2:57 PM, Klaus major-k via use-livecode wrote: > > no idea, but it worked for me years ago. :-) which is the ultimate test . . . and, now that you mention it, *far* for the oddest fix . . . — Richard E. Hawkins, Esq. The Hawkins Law Firm 3430 E. Flamingo Rd. Suite 232 La

Re: cr, lf, and reading in terminals/vim

2019-10-30 Thread Klaus major-k via use-livecode
Hi Richard, > Am 30.10.2019 um 22:55 schrieb Dr. Hawkins via use-livecode > : > > On Oct 30, 2019, at 2:42 PM, Matthias mentioned >> I am not sure, if this will help with your task, but if i want to avoid >> that the os replaces the line breaks with it´s default i am writing a binary >> file

Re: cr, lf, and reading in terminals/vim

2019-10-30 Thread Dr. Hawkins via use-livecode
On Oct 30, 2019, at 2:42 PM, Matthias mentioned > I am not sure, if this will help with your task, but if i want to avoid that > the os replaces the line breaks with it´s default i am writing a binary file > instead of a text file. So in your case you would open the file for "binary > write"

Re: cr, lf, and reading in terminals/vim

2019-10-30 Thread Klaus major-k via use-livecode
Hi Richard, > Am 30.10.2019 um 22:28 schrieb Dr. Hawkins via use-livecode > : > > I’ve tried every combination of cr, lf, and crlf, but whenever I assemble > into a file, I get something that neither the OSX terminal or vim recognizes > as having lf in it > > I build a set of commands in mrgC

Re: cr, lf, and reading in terminals/vim

2019-10-30 Thread Matthias Rebbe via use-livecode
I am not sure, if this will help with your task, but if i want to avoid that the os replaces the line breaks with it´s default i am writing a binary file instead of a text file. So in your case you would open the file for "binary write". Regards, Matthias Matthias Rebbe free tools for Livec

cr, lf, and reading in terminals/vim

2019-10-30 Thread Dr. Hawkins via use-livecode
I’ve tried every combination of cr, lf, and crlf, but whenever I assemble into a file, I get something that neither the OSX terminal or vim recognizes as having lf in it I build a set of commands in mrgCmds, appending cr as I go, but I get a bunch of ^M in the otherwise uninterrupted stream wi