From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#4623: 23.1.50; rmail changes encoding of characters on save Date: Fri, 04 Dec 2009 13:42:31 -0500 Message-ID: References: <831vjalmrl.fsf@gnu.org> Reply-To: Stefan Monnier , 4623@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1259953732 20844 80.91.229.12 (4 Dec 2009 19:08:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 4 Dec 2009 19:08:52 +0000 (UTC) Cc: 4623@emacsbugs.donarmstrong.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 04 20:08:45 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NGdWG-0004i8-Cq for geb-bug-gnu-emacs@m.gmane.org; Fri, 04 Dec 2009 20:08:44 +0100 Original-Received: from localhost ([127.0.0.1]:55393 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NGdWG-0006kI-4f for geb-bug-gnu-emacs@m.gmane.org; Fri, 04 Dec 2009 14:08:44 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NGdV7-0006B8-Mm for bug-gnu-emacs@gnu.org; Fri, 04 Dec 2009 14:07:33 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NGdV2-00068v-FP for bug-gnu-emacs@gnu.org; Fri, 04 Dec 2009 14:07:32 -0500 Original-Received: from [199.232.76.173] (port=48509 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NGdV1-00068h-Ny for bug-gnu-emacs@gnu.org; Fri, 04 Dec 2009 14:07:28 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:35240) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NGdV1-0001Ny-66 for bug-gnu-emacs@gnu.org; Fri, 04 Dec 2009 14:07:27 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nB4J7OVJ015653; Fri, 4 Dec 2009 11:07:24 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id nB4Io4fJ013383; Fri, 4 Dec 2009 10:50:04 -0800 Resent-Date: Fri, 4 Dec 2009 10:50:04 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Stefan Monnier Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Fri, 04 Dec 2009 18:50:04 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 4623 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 4623-submit@emacsbugs.donarmstrong.com id=B4623.125995215912871 (code B ref 4623); Fri, 04 Dec 2009 18:50:04 +0000 Original-Received: (at 4623) by emacsbugs.donarmstrong.com; 4 Dec 2009 18:42:39 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from ironport2-out.pppoe.ca (ironport2-out.teksavvy.com [206.248.154.183]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nB4IgbJa012867 for <4623@emacsbugs.donarmstrong.com>; Fri, 4 Dec 2009 10:42:38 -0800 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhgFAFLnGEtFpZ1E/2dsb2JhbACBTtVahDMEihs X-IronPort-AV: E=Sophos;i="4.47,343,1257138000"; d="scan'208";a="50699918" Original-Received: from 69-165-157-68.dsl.teksavvy.com (HELO pastel.home) ([69.165.157.68]) by ironport2-out.pppoe.ca with ESMTP; 04 Dec 2009 13:42:31 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 4A90286C4; Fri, 4 Dec 2009 13:42:31 -0500 (EST) In-Reply-To: <831vjalmrl.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 04 Dec 2009 18:36:14 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Fri, 04 Dec 2009 14:07:32 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:33206 Archived-At: > The cure for this bug, viz. > *** rmail.el 6 Oct 2009 06:40:40 -0000 1.554 > --- rmail.el 13 Oct 2009 01:17:20 -0000 > *************** > *** 4176,4181 **** > --- 4176,4182 ---- > (defun rmail-write-region-annotate (start end) > (when (and (null start) (rmail-buffers-swapped-p)) > (set-buffer rmail-view-buffer) > + (set (make-local-variable 'coding-system-for-write) 'no-conversion) > (widen) > nil)) > is IMO not much better than the disease: now C-x C-s _always_ leaves > the RMAIL buffer in no-conversion state, until you display a message, > e.g., with "M-n". > I think this happens because the above sets the encoding of > rmail-view-buffer, where we display the messages, to no-conversion. In the above code, rmail-view-buffer is (confusingly enough) the raw-data buffer (which is why we switch to it to save the raw data), so setting coding-system-for-write in that buffer is right. The problem is that this setting is then somehow propagated to the other buffer (the one we show to the user). > Perhaps we should special-case RMAIL in save-buffer, or maybe do > something in buffer-swap-text. Most likely we need to do something in the rmail code that calls buffer-swap-text. Some debugging `message's in there showing the coding-systems in use in each buffer before and after the swap should make things more clear. Stefan