From: Eli Zaretskii <eliz@gnu.org>
To: mark.lillibridge@hp.com
Cc: emacs-devel@gnu.org
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 [thread overview]
Message-ID: <E1Pbs5s-0000qc-62@fencepost.gnu.org> (raw)
In-Reply-To: <E1PbqaN-0000GZ-Au@fencepost.gnu.org> (message from Eli Zaretskii on Sun, 09 Jan 2011 03:25:11 -0500)
> From: Eli Zaretskii <eliz@gnu.org>
> Date: Sun, 09 Jan 2011 03:25:11 -0500
> Cc: emacs-devel@gnu.org
> Reply-To: Eli Zaretskii <eliz@gnu.org>
>
> > 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.
next prev parent reply other threads:[~2011-01-09 10:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <qmhd3o780jy.fsf@hp.com>
2011-01-09 5:52 ` why unrmail fails with raw-text on version 22 [WAS: Re: help needed with coding systems (unrmail problems)] Mark Lillibridge
2011-01-09 8:25 ` Eli Zaretskii
2011-01-09 10:01 ` Eli Zaretskii [this message]
2011-01-09 18:41 ` Mark Lillibridge
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1Pbs5s-0000qc-62@fencepost.gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=mark.lillibridge@hp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.