emacs-devel
[Top][All Lists]
Advanced

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

Re: why unrmail fails with raw-text on version 22 [WAS: Re: help needed


From: Eli Zaretskii
Subject: Re: why unrmail fails with raw-text on version 22 [WAS: Re: help needed with coding systems (unrmail problems)]
Date: Sun, 09 Jan 2011 05:01:48 -0500

> From: Eli Zaretskii <address@hidden>
> Date: Sun, 09 Jan 2011 03:25:11 -0500
> Cc: address@hidden
> Reply-To: Eli Zaretskii <address@hidden>
> 
> > Not obvious, but important: with-temp-buffer creates a multibyte buffer
> > so that insert-file-contents is decoding from raw-text to a multibyte
> > buffer, producing raw 8-bit bytes for x80-xff.
> 
> But doesn't insert-file-contents make the buffer unibyte due to the
> fact that raw-text is being used for decoding?

Answering my own question here: yes, it does.  Here's the relevant
portion of insert-file-contents from the current development sources:

  if (!NILP (visit))
    {
      /* When we visit a file by raw-text, we change the buffer to
         unibyte.  */
      if (CODING_FOR_UNIBYTE (&coding)
          /* Can't do this if part of the buffer might be preserved.  */
          && NILP (replace))
        /* Visiting a file with these coding system makes the buffer
           unibyte. */
        current_buffer->enable_multibyte_characters = Qnil;
    }

The current sources of the Emacs 23.3 release branch have the same
code.

So I would expect this problem not to exist in Emacs 23 and later.  If
it does exist, then probably there's some other factor at work here.



reply via email to

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