From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Karl Fogel Newsgroups: gmane.emacs.devel Subject: Re: saveplace: don't ask for coding system Date: Mon, 03 Dec 2007 13:32:14 -0800 Message-ID: <87hcizihwh.fsf@red-bean.com> References: <198E2B70-D060-41D8-8BC2-A9614C2729CC@inf.ed.ac.uk> <06675819-C4A8-4D78-AD59-0A2AF296AC7E@inf.ed.ac.uk> <87ve7gn5zc.fsf@red-bean.com> <0CD94276-1D9F-42BB-A6F7-A90ED9E06817@inf.ed.ac.uk> <87bq98n0ka.fsf@red-bean.com> <87fxykjb6y.fsf@red-bean.com> Reply-To: Karl Fogel NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1196717568 16397 80.91.229.12 (3 Dec 2007 21:32:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 3 Dec 2007 21:32:48 +0000 (UTC) Cc: lekktu@gmail.com, dreitter@inf.ed.ac.uk, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 03 22:32:50 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IzIuA-0006EN-99 for ged-emacs-devel@m.gmane.org; Mon, 03 Dec 2007 22:32:42 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IzItt-000705-Sb for ged-emacs-devel@m.gmane.org; Mon, 03 Dec 2007 16:32:25 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IzItp-0006yb-M7 for emacs-devel@gnu.org; Mon, 03 Dec 2007 16:32:21 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IzIto-0006xA-Qu for emacs-devel@gnu.org; Mon, 03 Dec 2007 16:32:21 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IzIto-0006wt-LM for emacs-devel@gnu.org; Mon, 03 Dec 2007 16:32:20 -0500 Original-Received: from sanpietro.red-bean.com ([66.146.193.61]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IzItk-00019e-KT; Mon, 03 Dec 2007 16:32:16 -0500 Original-Received: from localhost ([127.0.0.1]:50867) by sanpietro.red-bean.com with esmtp (Exim 4.68) (envelope-from ) id 1IzIti-0006zK-KB; Mon, 03 Dec 2007 15:32:14 -0600 In-Reply-To: (Eli Zaretskii's message of "Mon\, 03 Dec 2007 22\:48\:58 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) 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:84604 Archived-At: Eli Zaretskii writes: >> It would be more helpful if, instead of saying what encoding *not* to >> use, you (or someone) would say what encoding *to* use > > I thought that was obvious: emacs-mule. > >> and why :-). > > I thought that was obvious: because it supports all the characters > Emacs can handle. The disadvantage is that emacs-mule is Emacs-specific. It would be better if the file were readable by other editors and viewers -- although it's only parsed by Emacs (as far as I know), it *is* human-readable, and we should take that into account when choosing an encoding. I've always thought of emacs-mule as a purely internal encoding system. If we're starting to push it out to files, that feels a bit like mission creep to me; it's not a step I'm very comfortable with. > That discussion was about Emacs 23, which will be Unicode based and > where UTF-8 will be able to support all characters (or so I think). > EMACS_22_BASE is a stable branch, so we are not supposed to install > there changes that _might_ work, only changes we know _for_sure_ they > _will_ work. So a good solution might be: 1. write it out using utf-8 on the trunk (Emacs 23) line 2. write it out using emacs-mule on the Emacs 22 line 3. make sure that saveplace.el reads the coding system from the first line of the file and uses that to interpret the rest of the file Manual testing just now indicates that ";;; -*- coding: utf-8 -*-" will look the same (i.e., be the same sequence of bytes) in both coding systems, and that therefore step (3) above would work. Does this seem reasonable to you? (I'm not volunteering for (2) or (3), unfortunately. I've done (1), by installing what seems to be the right change for Emacs 23. I wish I could do more, but time is limited. It is still useful to describe what's needed for Emacs 22, though, so someone else knows what to do if they want. I admit that it's partly that I'm not enthusiastic about mule as an external storage encoding anyway.) -Karl