[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: I'm sorry that I tried to insert a DOS file

From: Eli Zaretskii
Subject: Re: I'm sorry that I tried to insert a DOS file
Date: Wed, 13 Feb 2002 12:08:07 +0200

On 13 Feb 2002, Kim F. Storm wrote:

> > > A more pleasant situation would be: I insert the file and I get asked
> > > if I want s) strip the DOS jazz; p) poison the whole original buffer
> > > with DOS jazz; r) treat me rawly, with ^M before my eyes; etc.
> > 
> > I think this would be hard to implement, since detection of the EOL 
> > format is done at the same time as the file is read and inserted into the 
> > buffer.
> But maybe it could delay the actual change in the coding system until
> it has finished inserting the text, display the buffer using the
> current coding system (which may of course look really messy) - and
> then ask the user whether he wants to change the coding system of the
> buffer or keep what he sees.

That would be too late for the r) option above.

Note that similar situations occur when the buffer's file encoding is 
different from the encoding of the inserted text.  E.g., imagine a buffer 
visiting a Latin-1 file into which you insert an ISO-2022 file.  In those 
situations, too, asking the question after C-x i already inserted the 
text is too late.  (I assume that any feature that asks the user should 
handle the latter case as well, not be limited to the EOL format alone.)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]