From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel 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) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200305220132.KAA06993@etlken.m17n.org> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: main.gmane.org 1053568064 24843 80.91.224.249 (22 May 2003 01:47:44 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 22 May 2003 01:47:44 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Thu May 22 03:47:43 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19IfBH-0006SS-00 for ; Thu, 22 May 2003 03:47:43 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19IfMJ-0006Jf-00 for ; Thu, 22 May 2003 03:59:07 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19IfBw-0003jI-Gg for emacs-devel@quimby.gnus.org; Wed, 21 May 2003 21:48:24 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19Iexp-0007GC-3Q for emacs-devel@gnu.org; Wed, 21 May 2003 21:33:49 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19Iewd-0006es-0m for emacs-devel@gnu.org; Wed, 21 May 2003 21:33:06 -0400 Original-Received: from tsukuba.m17n.org ([192.47.44.130]) by monty-python.gnu.org with esmtp (Exim 4.20) id 19Iewc-0006eL-DK for emacs-devel@gnu.org; Wed, 21 May 2003 21:32:34 -0400 Original-Received: from fs.m17n.org (fs.m17n.org [192.47.44.2])h4M1WVu12032; Thu, 22 May 2003 10:32:31 +0900 (JST) (envelope-from handa@m17n.org) Original-Received: from etlken.m17n.org (etlken.m17n.org [192.47.44.125]) h4M1WU918662; Thu, 22 May 2003 10:32:30 +0900 (JST) Original-Received: (from handa@localhost) by etlken.m17n.org (8.8.8+Sun/3.7W-2001040620) id KAA06993; Thu, 22 May 2003 10:32:30 +0900 (JST) Original-To: stktrc@yahoo.com In-reply-to: (message from stktrc on Wed, 21 May 2003 23:25:11 +0200) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.2.92 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:14073 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:14073 In article , stktrc writ= es: > 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 =C5 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