[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

desktop and coding systems

From: Alex Schroeder
Subject: desktop and coding systems
Date: Mon, 23 Jul 2001 15:28:06 +0200
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/20.7

In GNU Emacs 20.7.3 (i686-pc-linux-gnu, X toolkit)
 of Tue Jun 26 2001 on snail
configured using `configure  --with-x-toolkit=yes'

When I quit Emacs, desktop.el will save some stuff to a file.
Recently one of the variables saved contains some Japanese text.  This
is a problem because Emacs will try to save the file in latin-1
instead of emacs-mule encoding.  What can I do?  

Here's the symptom.  I hit C-x C-c and I get a buffer starting with:

The target text contains the following non ASCII character(s):
        japanese-jisx0208: (some Japanese characters)
These can't be encoded safely by the coding system iso-latin-1.

The backtrace at that point:

Signaling: (quit)
  completing-read("Select coding system (default iso-2022-jp): " ... nil t nil 
nil "iso-2022-jp")
  select-safe-coding-system(1 5760 iso-latin-1)
  write-region(1 5760 "/home/alex/.emacs.desktop" nil nomessage)
  (let ((filename ...) (info ...) (buf ...)) (set-buffer buf) (erase-buffer) 
  (save-excursion (let (... ... ...) ...))

A package with a similar problem is w3m.el and I like their solution
-- there is a coding system option that will be used for things such
as bookmark files.  This is important because the bookmark file can
and will be read by other applications.  For desktop.el, however, one
could argue that this is not necessary -- the save file will only be
read by emacs and therefore we should always encode it using

Coffee should be black as hell, strong as death and sweet as love.
        -- Turkish proverb

reply via email to

[Prev in Thread] Current Thread [Next in Thread]