unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Stephen J. Turnbull" <stephen@xemacs.org>
Cc: emacs-devel@gnu.org
Subject: Re: Different (buffer-file-)coding-systems for different regions of one buffer? (for Rmail MIME)
Date: Thu, 22 May 2003 12:41:20 +0900	[thread overview]
Message-ID: <878yszvean.fsf@tleepslib.sk.tsukuba.ac.jp> (raw)
In-Reply-To: <i56u1bnn567.fsf@mao.acc.umu.se> (stktrc@yahoo.com's message of "Thu, 22 May 2003 03:25:36 +0200")

>>>>> "stktrc" == stktrc  <stktrc@yahoo.com> writes:

    stktrc> Because modifying the buffer means modifying the
    stktrc> underlying file (because Rmail writes the buffer back to
    stktrc> the file on exit for various reasons, message flags are
    stktrc> one I suppose).

This is why I originally switched to VM.  Rmail was unable to read,
and sometimes trashing[1], my mail files, which contained mixed
Japanese/ASCII/European encodings, and all of Unix/DOS/Macintosh
newline conventions.  We're not in Kansas anymore, Toto, and the Rmail
"narrow-to-message" model simply increases complexity dramatically
because of the underlying Mule model of coding-per-file.  (Which is
hard to see how you can avoid it.)

    stktrc> I'm not totally opposed to that approach.  It is an
    stktrc> alternative, but as stated before, I like the one folder -
    stktrc> one buffer concept for it's simplicity.

Fine.  This will go gangbusters if you set your spamassassin to throw
away all mail with "Content-Type" headers.  Now the world is simple
enough to fit into that concept well.

Otherwise, there are at least two radically different views of many
files, and there must be a buffer (in the generic sense of a separate
region of memory) for presentation, and one for the much more
restricted changes you wish propagated back to the file (setting
flags).  I see no good reason why the region of memory used for
presentation shouldn't "waste" a few score bytes and be promoted to an
Emacs buffer.

    stktrc> I thought there was a layer between the file system and
    stktrc> the Emacs buffer that decoded the bytes from the file into
    stktrc> characters that were inserted into the buffer (and the
    stktrc> other way when writing).  That is, the buffer would never
    stktrc> see the encoded data, it would just receive already
    stktrc> decoded characters in an Emacs internal representation.
    stktrc> If it had been like this,

It is like that in practice, most of the time.  But it's only
practical for simple cases, eg, where the whole file is encoded in one
encoding, or the whole file conforms to a fixed standard such as ISO
2022.  Multimedia (in the MIME sense) files can't work that way.  The
meta-information used to create the presentation is often a hint, or a
user option.

    stktrc> with the addition of the possibility of different
    stktrc> decodings for different parts, it could have been used for
    stktrc> the purposes described earlier (to display MIME messages
    stktrc> as if they had been decoded inline *without modifying* the
    stktrc> buffer).

But then how do you save the buffer (eg, if you have set flags)?  It
differs from the file, and the decoding process is not an isomorphism
(multimedia).


Footnotes: 
[1]  Many years ago.  And the trashed cases required a very special
configuration of very non-RFC-conformant messages.  Unfortunately,
these were quite common in Japan ca. 1994.  The Internet can be a very
hostile place!

-- 
Institute of Policy and Planning Sciences     http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba                    Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
               Ask not how you can "do" free software business;
              ask what your business can "do for" free software

  parent reply	other threads:[~2003-05-22  3:41 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <i56wugl13qq.fsf@mao.acc.umu.se>
2003-05-21  2:43 ` Different (buffer-file-)coding-systems for different regions of one buffer? (for Rmail MIME) Kenichi Handa
2003-05-22  8:33   ` Richard Stallman
     [not found] ` <i563cj8kz7e.fsf@mao.acc.umu.se>
2003-05-21 19:53   ` Stefan Monnier
     [not found]     ` <i56smr8j8lk.fsf@mao.acc.umu.se>
2003-05-21 22:29       ` Stefan Monnier
     [not found]         ` <i56u1bnn567.fsf@mao.acc.umu.se>
2003-05-22  3:41           ` Stephen J. Turnbull [this message]
     [not found]             ` <i56ptmateuj.fsf@mao.acc.umu.se>
2003-05-23 10:56               ` Stephen J. Turnbull
2003-05-23 12:03             ` Richard Stallman
2003-05-23 15:03               ` Stephen J. Turnbull
2003-05-24 23:19                 ` Richard Stallman
2003-05-25 18:28                   ` Kai Großjohann
2003-05-27 12:44                     ` Richard Stallman
2003-05-26  5:20                   ` Stephen J. Turnbull
2003-05-26 17:30                     ` Eli Zaretskii
2003-05-27 10:03                       ` Stephen J. Turnbull
2003-05-27 12:44                     ` Richard Stallman
2003-05-27 15:12                       ` Stephen J. Turnbull
2003-05-28 23:57                         ` Richard Stallman
2003-05-29  8:20                           ` Stephen J. Turnbull
2003-05-22  1:32       ` Kenichi Handa
2003-05-22 13:16     ` Kai Großjohann

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878yszvean.fsf@tleepslib.sk.tsukuba.ac.jp \
    --to=stephen@xemacs.org \
    --cc=emacs-devel@gnu.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).