all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* X-coding-system incompatibility, and workaround
@ 2007-11-09 19:07 Tim Hesterberg
  2007-11-10  3:00 ` Richard Stallman
  0 siblings, 1 reply; 7+ messages in thread
From: Tim Hesterberg @ 2007-11-09 19:07 UTC (permalink / raw)
  To: bug-gnu-emacs

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




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-11-13 20:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-09 19:07 X-coding-system incompatibility, and workaround Tim Hesterberg
2007-11-10  3:00 ` Richard Stallman
2007-11-10 11:25   ` Eli Zaretskii
2007-11-11  5:21     ` Richard Stallman
2007-11-12 23:00     ` Tim Hesterberg
2007-11-13 20:02       ` Richard Stallman
2007-11-12 22:43   ` Tim Hesterberg

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.