From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: buffer-swap-text and multibyteness Date: Tue, 10 Feb 2009 17:17:12 +0900 Message-ID: References: NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1234253868 771 80.91.229.12 (10 Feb 2009 08:17:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 10 Feb 2009 08:17:48 +0000 (UTC) Cc: monnier@iro.umontreal.ca, rms@gnu.org, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 10 09:18:59 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LWnpb-0002iu-4Q for ged-emacs-devel@m.gmane.org; Tue, 10 Feb 2009 09:18:59 +0100 Original-Received: from localhost ([127.0.0.1]:48148 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LWnoE-0002Dr-Qr for ged-emacs-devel@m.gmane.org; Tue, 10 Feb 2009 03:17:34 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LWno9-0002CU-RQ for emacs-devel@gnu.org; Tue, 10 Feb 2009 03:17:29 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LWno6-00029T-Gw for emacs-devel@gnu.org; Tue, 10 Feb 2009 03:17:28 -0500 Original-Received: from [199.232.76.173] (port=51641 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LWno6-00029Q-73 for emacs-devel@gnu.org; Tue, 10 Feb 2009 03:17:26 -0500 Original-Received: from mx20.gnu.org ([199.232.41.8]:26863) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LWnnz-0003UJ-CV; Tue, 10 Feb 2009 03:17:19 -0500 Original-Received: from mx1.aist.go.jp ([150.29.246.133]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LWnny-0008Uy-18; Tue, 10 Feb 2009 03:17:18 -0500 Original-Received: from rqsmtp1.aist.go.jp (rqsmtp1.aist.go.jp [150.29.254.115]) by mx1.aist.go.jp with ESMTP id n1A8HAZK004499; Tue, 10 Feb 2009 17:17:10 +0900 (JST) env-from (handa@m17n.org) Original-Received: from smtp1.aist.go.jp by rqsmtp1.aist.go.jp with ESMTP id n1A8HALx003965; Tue, 10 Feb 2009 17:17:10 +0900 (JST) env-from (handa@m17n.org) Original-Received: by smtp1.aist.go.jp with ESMTP id n1A8HAok008290; Tue, 10 Feb 2009 17:17:10 +0900 (JST) env-from (handa@m17n.org) Original-Received: from handa by etlken with local (Exim 4.69) (envelope-from ) id 1LWnns-0005zk-3k; Tue, 10 Feb 2009 17:17:12 +0900 In-reply-to: (message from Eli Zaretskii on Mon, 09 Feb 2009 22:29:43 +0200) X-detected-kernel: by mx20.gnu.org: Solaris 9 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:108934 Archived-At: In article , Eli Zaretskii writes: > > From: Kenichi Handa > > CC: eliz@gnu.org, rms@gnu.org, emacs-devel@gnu.org > > Date: Mon, 09 Feb 2009 20:31:00 +0900 > > > > But, for instance, one edits a mail of: > > Content-type: text/plain; charset=iso-8859-1 > > and inserts a non-latin-1 character, we must use the > > different encoding (utf-8 or the one selected by > > select-message-coding-system), and modify content-type: > > header. > Did you try rmail-redecode-body after editing? No, but it won't help because when I type C-c C-c after editing, the unencodable characters disappear from the buffer " *message-viewer RMAIL*". > Anyway, I don't think the Babyl Rmail handled such a use case > correctly, either. No, it used to work because rmail-cease-edit didn't have to encode the message. > Why would one wish to insert a character into a > message that cannot be encoded in the message's charset? What would > be the reason for such strange editing? I got a Japanese mail with attachment file containing many non-Japanese characters encoded by emacs-mule. I editted the mail, decoded the attached file by hand by the combination of base64-decode-region and decode-coding-region, and typed C-c C-c. > All the use cases I can think of should be covered by > rmail-redecode-body, which is The Right Way of changing > the encoding of a message. It works only if the unencodable characters is not lost in the rmail file buffer. --- Kenichi Handa handa@m17n.org