unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Kenichi Handa <handa@m17n.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 10:32:30 +0900 (JST)	[thread overview]
Message-ID: <200305220132.KAA06993@etlken.m17n.org> (raw)
In-Reply-To: <i56smr8j8lk.fsf@mao.acc.umu.se> (message from stktrc on Wed, 21 May 2003 23:25:11 +0200)

In article <i56smr8j8lk.fsf@mao.acc.umu.se>, stktrc <stktrc@yahoo.com> writes:
> Yes, but decode-coding-region modifies the character content of the
> buffer (which is undesirable).  I want the decoding to happen before
> the characters hit the buffer.

??? I'm confused.  You wrote you want to have unmodified
encoded message in a buffer, but here you wrote decoding is
ok.

What's the difference in decodings that happen before and
after the characters being inserted the buffer?

> When Emacs loads a file (that is supposed to be encoded in for example
> ISO 2022, a 7 bit based encoding), does it first load the file
> contents into a buffer as ASCII text and then applies
> decode-coding-region to the entire buffer (conceptually)?

> I wouldn't think so (but I don't know).

Actually yes (conceptually), why not?

> Using decode-coding-region modifies the buffer contents because the
> actual characters present in the buffer change (the two characters AA
> might become the character Å or whatever, and hence the buffer
> contents has been modified).

If what you concern is the buffer modified flag, you can
reset that by set-buffer-modified-p.  If what you concern is
the undo list, you can also set buffer-undo-list to nil.
That is what insert-file-contents does when called with
VISIT arg as t.

---
Ken'ichi HANDA
handa@m17n.org

  parent reply	other threads:[~2003-05-22  1:32 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
     [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 [this message]
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=200305220132.KAA06993@etlken.m17n.org \
    --to=handa@m17n.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).