From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: [angeli@iwi.uni-sb.de: Saving safe local variables garbles 8-bit characters in .emacs file] Date: Tue, 07 Mar 2006 21:25:25 -0500 Message-ID: <874q297jvu.fsf@stupidchicken.com> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1141784750 2906 80.91.229.2 (8 Mar 2006 02:25:50 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 8 Mar 2006 02:25:50 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 08 03:25:48 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FGoMv-0002XO-JD for ged-emacs-devel@m.gmane.org; Wed, 08 Mar 2006 03:25:41 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FGoMu-0003FQ-W9 for ged-emacs-devel@m.gmane.org; Tue, 07 Mar 2006 21:25:41 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FGoMj-00035M-D9 for emacs-devel@gnu.org; Tue, 07 Mar 2006 21:25:29 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FGoMi-00034W-RO for emacs-devel@gnu.org; Tue, 07 Mar 2006 21:25:29 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FGoMi-00034T-Lb for emacs-devel@gnu.org; Tue, 07 Mar 2006 21:25:28 -0500 Original-Received: from [18.95.6.38] (helo=outgoing.mit.edu) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FGoPP-0002YO-6N; Tue, 07 Mar 2006 21:28:15 -0500 Original-Received: by outgoing.mit.edu (Postfix, from userid 1000) id 6D0491E4142; Tue, 7 Mar 2006 21:25:25 -0500 (EST) Original-To: rms@gnu.org In-Reply-To: (Richard Stallman's message of "Tue, 07 Mar 2006 14:35:02 -0500") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:51345 Archived-At: Richard Stallman writes: > Would someone please DTRT, then ack this message? Fixed. > From: Ralf Angeli > Subject: Saving safe local variables garbles 8-bit characters in .emacs file > To: emacs-pretest-bug@gnu.org > > - --=-=-= > > 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: