[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: address@hidden: Saving safe local variables garbles 8-bit characters
From: |
Chong Yidong |
Subject: |
Re: address@hidden: Saving safe local variables garbles 8-bit characters in .emacs file] |
Date: |
Tue, 07 Mar 2006 21:25:25 -0500 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
Richard Stallman <address@hidden> writes:
> Would someone please DTRT, then ack this message?
Fixed.
> From: Ralf Angeli <address@hidden>
> Subject: Saving safe local variables garbles 8-bit characters in .emacs file
> To: address@hidden
>
> - --=-=-=
>
> Under certain circumstances saving safe local variables permanently,
> i.e. answering with `!' to the respective question may garble 8-bit
> characters in a .emacs file. For this to happen the .emacs file has
> to contain UTF-8 characters and has to be saved as UTF-8. In addition
> Emacs has to be started in a directory with a .emacs.desktop file
> which has to load a LaTeX file containing 8-bit characters like
> umlauts, i.e. a file with a Latin-1 coding system. In addition the
> LaTeX file has to contain a Local Variables section with an unknown
> variable. As soon as Emacs is started this should pop up the question
> about how to deal with the variable and once you answer with `!' the
> .emacs file will be written. If you open the .emacs file after that
> 8-bit characters will be garbled (it looks like the UTF-8 characters
> got decomposed into their two separate bytes).
>
> Attached you can find the files I used for testing (".emacs.orig" is
> the original .emacs file and ".emacs.result" the one after the safe
> variables stuff was written to it):
>
>
> - --=-=-=
> Content-Type: text/plain; charset=utf-8
> Content-Disposition: attachment; filename=.emacs.orig
> Content-Transfer-Encoding: quoted-printable
>
> (custom-set-variables
> ;; custom-set-variables was added by Custom.
> ;; If you edit it by hand, you could mess it up, so be careful.
> ;; Your init file should contain only one such instance.
> ;; If there is more than one, they won't work right.
> '(desktop-save (quote ask-if-exists))
> '(desktop-save-mode t))
>
> ;; =E2=86=92 =C3=B6=C3=A4=C3=BC=C3=9F
>
> ;; Local Variables:
> ;; coding: utf-8
> ;; End:
>
> - --=-=-=
> Content-Type: text/plain; charset=utf-8
> Content-Disposition: attachment; filename=.emacs.result
> Content-Transfer-Encoding: quoted-printable
>
> (custom-set-variables
> ;; custom-set-variables was added by Custom.
> ;; If you edit it by hand, you could mess it up, so be careful.
> ;; Your init file should contain only one such instance.
> ;; If there is more than one, they won't work right.
> '(desktop-save (quote ask-if-exists))
> '(desktop-save-mode t)
> '(safe-local-variable-values (quote ((foo)))))
>
> ;; =C3=A2=C2=86=C2=92 =C3=83=C2=B6=C3=83=C2=A4=C3=83=C2=BC=C3=83=C2=9F
>
> (custom-set-faces
> ;; custom-set-faces was added by Custom.
> ;; If you edit it by hand, you could mess it up, so be careful.
> ;; Your init file should contain only one such instance.
> ;; If there is more than one, they won't work right.
> )
> ;; Local Variables:
> ;; coding: utf-8
> ;; End:
>
> - --=-=-=
> Content-Disposition: attachment; filename=.emacs.desktop
>
> ;; -*- mode: emacs-lisp; coding: emacs-mule; -*-
> ;; --------------------------------------------------------------------------
> ;; Desktop File for Emacs
> ;; --------------------------------------------------------------------------
> ;; Created Mon Mar 6 17:20:28 2006
> ;; Desktop file format version 206
> ;; Emacs version 22.0.50.1
>
> ;; Global section:
> (setq desktop-missing-file-warning nil)
> (setq tags-file-name nil)
> (setq tags-table-list nil)
> (setq search-ring nil)
> (setq regexp-search-ring nil)
> (setq register-alist nil)
>
> ;; Buffer section -- buffers listed in same order as in buffer list:
> (desktop-create-buffer 206
> "/home/angeli/scratch/desktop-test/test.tex"
> "test.tex"
> 'latex-mode
> nil
> 1
> '(nil nil)
> nil
> nil
> '((indent-tabs-mode) (buffer-file-coding-system . iso-latin-1-unix)))
>
>
> - --=-=-=
> Content-Type: text/plain; charset=iso-8859-1
> Content-Disposition: attachment; filename=test.tex
> Content-Transfer-Encoding: quoted-printable
> X-MIME-Autoconverted: from 8bit to quoted-printable by
> justus.rz.uni-saarland.de id k26GchrZ21992447
>
> =F6=E4=FC=DF
>
> %%% Local Variables:
> %%% foo: nil
> %%% End: