emacs-devel
[Top][All Lists]
Advanced

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

Re: saveplace: don't ask for coding system


From: Karl Fogel
Subject: Re: saveplace: don't ask for coding system
Date: Mon, 03 Dec 2007 13:32:14 -0800
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

Eli Zaretskii <address@hidden> 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




reply via email to

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