From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#4623: 23.1.50; rmail changes encoding of characters on save Date: Mon, 07 Dec 2009 20:59:12 +0200 Message-ID: <83ws0yipa7.fsf@gnu.org> References: <831vjalmrl.fsf@gnu.org> <83y6lik0ug.fsf@gnu.org> <83hbs5k4q6.fsf@gnu.org> Reply-To: Eli Zaretskii , 4623@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1260216164 15249 80.91.229.12 (7 Dec 2009 20:02:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 7 Dec 2009 20:02:44 +0000 (UTC) Cc: 4623@emacsbugs.donarmstrong.com To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Dec 07 21:02:37 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 1NHjn1-00052S-0U for geb-bug-gnu-emacs@m.gmane.org; Mon, 07 Dec 2009 21:02:36 +0100 Original-Received: from localhost ([127.0.0.1]:41229 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NHjn0-00028D-Oa for geb-bug-gnu-emacs@m.gmane.org; Mon, 07 Dec 2009 15:02:34 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NHjFA-0002T0-OF for bug-gnu-emacs@gnu.org; Mon, 07 Dec 2009 14:27:36 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NHjF5-0002Lg-Qw for bug-gnu-emacs@gnu.org; Mon, 07 Dec 2009 14:27:35 -0500 Original-Received: from [199.232.76.173] (port=59597 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NHjF5-0002LT-E3 for bug-gnu-emacs@gnu.org; Mon, 07 Dec 2009 14:27:31 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:41413) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NHjF5-0001rb-4D for bug-gnu-emacs@gnu.org; Mon, 07 Dec 2009 14:27:31 -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 nB7JRPQJ001881; Mon, 7 Dec 2009 11:27:28 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id nB7JA6o1032690; Mon, 7 Dec 2009 11:10:06 -0800 Resent-Date: Mon, 7 Dec 2009 11:10:06 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Eli Zaretskii Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Mon, 07 Dec 2009 19:10:06 +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.126021248130854 (code B ref 4623); Mon, 07 Dec 2009 19:10:06 +0000 Original-Received: (at 4623) by emacsbugs.donarmstrong.com; 7 Dec 2009 19:01:21 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from mtaout20.012.net.il (mtaout20.012.net.il [80.179.55.166]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nB7J1JRJ030850 for <4623@emacsbugs.donarmstrong.com>; Mon, 7 Dec 2009 11:01:20 -0800 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0KUA00F00PZ9QB00@a-mtaout20.012.net.il> for 4623@emacsbugs.donarmstrong.com; Mon, 07 Dec 2009 21:01:13 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([77.126.213.252]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0KUA009JEQ5Z2BH0@a-mtaout20.012.net.il>; Mon, 07 Dec 2009 21:01:12 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Mon, 07 Dec 2009 14:27:35 -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:33372 Archived-At: > From: Stefan Monnier > Cc: 4623@emacsbugs.donarmstrong.com > Date: Sun, 06 Dec 2009 23:34:55 -0500 > > > . When replying to a message, rmail-reply uses it to set the > > encoding of the *mail* buffer where you compose the reply, which > > takes care of 99.99% of situations where the response needs to > > have some non-trivial encoding that is not your system's native > > one. > > rmail-replay doesn't need to use buffer-file-coding-system for that, but > could just as well use some other variable for it, right? If that variable is set correctly, sure. However, buffer-file-coding-system has the advantage that it is already prominently shown in the mode line. > > Maybe we need to set up an after-save-hook to restore the original > > encoding after saving the message collection? > > That would be fine, yes. I'd suggest to use an rmail-coding-system > variable as the canonical place to store the coding system used for the > currently shown message, use it in rmail-reply in preference to > buffer-file-coding-system, and simply copy rmail-coding-system to > buffer-file-coding-system whenever necessary, such as in > after-save-hook. Well, I did precisely that, as you could see, but then Markus pointed out that a single global variable will not work when there are more than one Rmail buffer. I will post a slightly improved patch soon that hopefully will take care of that as well.