[Top][All Lists]

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

Re: Different (buffer-file-)coding-systems for different regions of one

From: Richard Stallman
Subject: Re: Different (buffer-file-)coding-systems for different regions of one buffer? (for Rmail MIME)
Date: Sat, 24 May 2003 19:19:40 -0400

    If you want to preserve the original contents of the buffer, you must
    copy them somewhere, because many of the transformations performed to
    make text displayable are not invertible.  For example, it is
    perfectly legal in ISO 2022 coding systems to have two charset
    designations with no intervening text.  The first one will get lost.

It is important to have a way to edit the text that is displayed.  It
is desirable but not very important to preserve the first charset
designation.  If we can't do both, we should do the former.

        rms> In Rmail currently it is possible to type e and edit a
        rms> message.  Right now we do this through editing the buffer of
        rms> the RMAIL file.  With better MIME support, this may have to
        rms> be implemented differently, but I hope we can keep it working
        rms> somehow.

    I think this will require a lot of work if you wish to preserve file
    text verbatim unless explicitly edited (and this is essential for
    signed messages, for example).

This is easy to do--just don't replace the original text unless the
user has edited the message.

The user must type an explicit command, currently e, to edit the
message.  The edited text would be stored back into the file
only when the user exits edit mode (and not if he aborts the edit).

In addition, it is easy to compare the buffer contents with what is
produced by preparing the original message for display.  If they are
the same, then don't alter the original message text.

        rms> If we copy the message into another buffer for viewing, that
        rms> tends to lead to complications of the situation, because
        rms> there are multiple buffers instead of just one.  We could try
        rms> adding features to hide that, or we could expose it and not
        rms> hide anything.

    I don't see how it gets complicated.

Right now, if I switch to buffer RMAIL, I see the message that is
selected in the buffer RMAIL.  If that message is actually displayed
in another buffer, then switching to RMAIL won't show it, or won't
show it properly.

Perhaps we need a feature of "alias buffers".  If we set up buffer
RMAIL to specify buffer *View RMAIL* as its alias, then when buffer
RMAIL is selected in a window, buffer *View RMAIL* will actually
appear in the window and will actually be the current buffer most of
the time.  (You could still make RMAIL the current buffer by
explicitly calling set-buffer.)

Tar mode could also make use of this.  And Info.

reply via email to

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