Subject: Re: EOL conversion in call-process-region

From: Eli Zaretskii <[email-masked]>
Date: Sun, 14 Sep 1997 17:12:07 +0300 (IDT)

On Thu, 11 Sep 1997, Richard Stallman wrote:

> Suppose you read a DOS file and then use M-| to do something to the
> text.  Chances are you don't want that to be affected by what the
> file's EOL conversion was.

That is exactly what I am not sure about.  Won't people in such cases
expect to get the same behavior as if the region was cut out of the
original file, e.g. by a sed script?  At least when the region is the
entire buffer, they probably would.  Passing the region without the
original EOLs breaks this.

It is true that in many cases, particularly when the buffer contains
text in the native format, things will generally work both ways (DOS
programs that work on text usually drop the CR characters when they
read the file).  But reading non-text files, or reading DOS-style text
files on Unix, causes M-| to behave differently than if the file were
submitted to the invoked program outside Emacs.

---

From: Richard Stallman <[email-masked]>
Date: Sun, 14 Sep 1997 13:05:54 -0400

That is exactly what I am not sure about.  Won't people in such cases
    expect to get the same behavior as if the region was cut out of the
    original file, e.g. by a sed script?

If you are using M-| to do something to the text as you see it,
you won't care what it looked like in the file.

If you are using M-| as a substitute for doing something with the file
itself, then you would care.

Basically it seems that neither choice is perfect, so I might as
well not change the one we have.