[Issue 1349] ^M pollution

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jul 25 01:23:47 PDT 2007


http://d.puremagic.com/issues/show_bug.cgi?id=1349





------- Comment #8 from felipe.contreras at gmail.com  2007-07-25 03:23 -------
(In reply to comment #7)
> If vim isn't handling mixed line endings, then it doesn't work properly.

That's debatable.

> Whatever advantages LF might have simply do not matter, as there are systems in
> wide use that use other conventions, and people ARE going to mix them up, and
> they SHOULD work. Line ending parochialism, and the debate about which one
> should prevail, ended about 15 years ago. Programmers simply decided to write
> their software to accept all three conventions and moved on to argue about more
> important things like { } style.

Did it?

Just search for "^m character" on Google, and you'll find that the solution is
remove all the CR's.

> Gnu has fixed gnumake, gcc, and other text processing software to work right.
> There's little reason to indulge obsolete software that doesn't. Submit bug
> reports for them.

Work "right" is something you are defining. Surely Firefox does some things to
work better for sites that use bad standards but work fine on IE, that is not
exactly "right". BTW, your bugzilla doesn't render correctly on Firefox.

> BTW, microEmacs (what I use) reads all three conventions agnostically, as do
> all DM products. It emits CRLF when on Windows, and LF when on Linux, for all
> lines. It does not mix the conventions on output - so if on the GDC tarball
> there are mixed conventions in the same file, it is not due to my edits.
> Someone probably used vim on it :-)

Vim emits CRLF when you tell it to, LF when you tell it to. It will add CRLF
when the rest of the file has CRLFs, it will add LFs when the rest of the file
has LFs, and it will "properly" (according to me and a whole lot of people)
show where there's a mixing issue.

Mix line endings, mix shifts with tabs and spaces, do whatever you want and
ignore how it will look on other people's editors, it's your choice.

Vim _is_ operating system _and_ file format agnostic.

You attack Vim---one of the most important text editors out there, if not the
most---, saying that Vim not working properly. You use DOS file format. You
don't provide a debugger to use under any OS except Win32. On the menu, right
after Overview you have "D for Win32" and "Win32 DLLs in D". You provide your
files in Zip format available either for "Win32 and Linux" or "Win32".

Your D implementation is _not_ operating system agnostic, it's really biased to
one.

And finally, CR is not the default in mac as you say, it was, until version 9.
According to Wikipedia [1], Windows is the only operating system today that
uses anything else than LF.

[1] http://en.wikipedia.org/wiki/Newline


-- 



More information about the Digitalmars-d-bugs mailing list