From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim Hesterberg Newsgroups: gmane.emacs.bugs Subject: X-coding-system incompatibility, and workaround Date: Fri, 09 Nov 2007 11:07:21 -0800 Message-ID: NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1194635295 25242 80.91.229.12 (9 Nov 2007 19:08:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 9 Nov 2007 19:08:15 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 09 20:08:19 2007 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 1IqZD2-0005IK-8p for geb-bug-gnu-emacs@m.gmane.org; Fri, 09 Nov 2007 20:08:04 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IqZCq-0005rK-HV for geb-bug-gnu-emacs@m.gmane.org; Fri, 09 Nov 2007 14:07:52 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IqZCl-0005pr-4c for bug-gnu-emacs@gnu.org; Fri, 09 Nov 2007 14:07:47 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IqZCg-0005nf-0a for bug-gnu-emacs@gnu.org; Fri, 09 Nov 2007 14:07:46 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IqZCf-0005nO-Ns for bug-gnu-emacs@gnu.org; Fri, 09 Nov 2007 14:07:41 -0500 Original-Received: from sewinexch00.insightful.com ([70.98.76.55]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IqZCf-0006vw-7r for bug-gnu-emacs@gnu.org; Fri, 09 Nov 2007 14:07:41 -0500 Original-Received: from THESTERBERG-XP.insightful.com ([172.16.100.43]) by sewinexch00.insightful.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 9 Nov 2007 11:07:23 -0800 X-OriginalArrivalTime: 09 Nov 2007 19:07:23.0223 (UTC) FILETIME=[C2542E70:01C82303] X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. 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:16950 Archived-At: This report is primarily for your information. I've found a problem, and have a couple of workarounds, one of which can go in my .emacs. However, at the end I have some thoughts on how new versions of emacs might change to prevent other people from having the problem. -------------------------------------------------- When I create an rmail file using emacs 22.1.1, then read the file using emacs 21.3.1 (on another system), it generally works, but occasionally I'll run into a message causes a problem. There is an error message Invalid coding system: us-ascii-unix After that rmail doesn't work correctly on that file. For some messages, what is visible in my buffer is the raw rmail file, including all headers and the message separator (which appears as ^_^L). Other messages appear fine (sometimes; other times I can't use the rmail file until I close and reopen it). If I have an RMAIL Summary window open, and I scroll through messages in either window (using "n"), the cursor doesn't move in the summary window when the new message shows the headers, but does jump to the correct spot when a "good" message appears. (At least, that is the behavior I'm getting now - other times I've run into the problem it seems that after a problem occurs then typing "n" in the summary window does nothing.) This occurs when a message has a header such as: X-Coding-System: us-ascii-unix On rare occasions other coding systems cause the same problem, e.g. X-Coding-System: windows-1252-unix -------------------------------------------------- I have two workarounds: (1) Edit the rmail file (as an ordinary text file) and change every instance of us-ascii-unix to iso-safe-unix. Then I can read the file using rmail and everything works. This is motivated by (list-coding-systems), which on 22.1.1 has: - -- iso-safe (alias: us-ascii) Encode ASCII asis and encode non-ASCII characters to `?'. but on 21.3.1 has the iso-safe entry but with no alias. Curiously, the rmail file has many instances of us-ascii; it does not appear necessary to change these, only the small number of us-ascii-unix entries. (2) In 21.3.1, run: (define-coding-system-alias 'us-ascii 'iso-safe) After that I can read the unedited rmail file. -------------------------------------------------- Suggestion: Could you modify future versions of emacs to try to avoid using coding systems that are not defined on earlier versions? In this case, if 22.1.1 would use iso-safe-unix instead of us-ascii-unix when creating rmail files, then I wouldn't have the problem reading the files using 23.1.1. -------------------------------------------------- In GNU Emacs 22.1.1 (i386-mingw-nt5.1.2600) of 2007-06-02 on RELEASE Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (3.4) --cflags -Ic:/gnuwin32/include' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: ENU locale-coding-system: cp1252 default-enable-multibyte-characters: t Major mode: RMAIL Minor modes in effect: display-time-mode: t shell-dirtrack-mode: t show-paren-mode: t encoded-kbd-mode: t tooltip-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t unify-8859-on-encoding-mode: t utf-translate-cjk-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t