[Top][All Lists]

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

Re: Emacs-diffs Digest, Vol 2, Issue 28

From: Richard Stallman
Subject: Re: Emacs-diffs Digest, Vol 2, Issue 28
Date: Mon, 03 Mar 2003 13:59:42 -0500

    It is fairly clear for the case that a process has a fileter
    and coding system is no-conversion or raw-text.  But what to
    do with the other coding systems (e.g. Latin-1,
    iso-2022-jp).  If a process is unibyte, what kind of string,
    the filter should get?  Should we suppress a text decoding
    like the case of inserting a file into a unibyte buffer?

I don't see any other meaningful thing to do in that case.  Decoding
produces, in general, data that cannot go in a unibyte string.

    And if the process has no filter but has a buffer, what to
    do for a unibyte process that has a multibyte buffer, or for
    a multibyte process that has a unibyte buffer?

These are unreasonable cases, so there is no need to strain to hard to
make them do useful things.  For the unibyte process with a multibyte
buffer, just turn off decoding, and let the data get converted to
multibyte when inserted in the buffer.  For the multibyte process with
unibyte buffer, it can convert the multibyte decoded text to unibyte.
If people feel that isn't useful, they shouldn't use it.

    And what to do with process-send-string/region.

If the process is multibyte, encode the text (after converting it
first to multibyte if necessary).  If the process is unibyte, just
convert the text to unibyte.

    A string given to a process filter must be the same as the
    result of that code, which means that
    default-enable-multibyte-characters decides the
    multibyteness, and if it is nil, character conversion except
    for end-of-line conversion is suppressed.

default-enable-multibyte-characters should not directly control
the multibyteness of the string.  The process's multibyte flag
should control that.

But it is a good idea to let default-enable-multibyte-characters
play a role in initializing the process's multibyte flag.

    Or, was the intention of set-process-multibyte actually

You could think of it that way, because the case where
set-process-multibyte is useful is when the process has a filter.

reply via email to

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