all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
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 03:25:11 -0500	[thread overview]
Message-ID: <E1PbqaN-0000GZ-Au@fencepost.gnu.org> (raw)
In-Reply-To: <qmh7hee8vz8.fsf@hp.com> (message from Mark Lillibridge on Sat, 08 Jan 2011 21:52:27 -0800)

> Date: Sat, 08 Jan 2011 21:52:27 -0800
> From: Mark Lillibridge <mark.lillibridge@hp.com>
> Reply-To: mark.lillibridge@hp.com
> 
>   (with-temp-buffer
>     ;; Read in the old Rmail file with no decoding.
>     (let ((coding-system-for-read 'raw-text))
>       (insert-file-contents file))
>     ;; But make it multibyte.
>     (set-buffer-multibyte t)
>     (setq buffer-file-coding-system 'raw-text-unix)
> 
> 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?

>     My testing so far shows that this problem can be fixed for version
> 22 by switching to the Rmail way of doing things (e.g., read unibyte and
> only convert to multibyte at the end).  A more complicated solution will
> be needed for version 23.  Should I produce a patch for version 22 given
> that it will not work for version 23?

Version 22 is no longer maintained, so providing patches for it would
be pointless, especially as Emacs 23 has fundamentally changed the way
raw bytes are represented and handled.

Emacs 23.3 is in pretest, so if you hurry, you could get the fix into
it (and into all the later versions).

Thanks.



  reply	other threads:[~2011-01-09  8:25 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 [this message]
2011-01-09 10:01     ` Eli Zaretskii
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=E1PbqaN-0000GZ-Au@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.