[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: saveplace: don't ask for coding system
From: |
Eli Zaretskii |
Subject: |
Re: saveplace: don't ask for coding system |
Date: |
Tue, 04 Dec 2007 23:32:08 +0200 |
> Date: Tue, 4 Dec 2007 17:40:57 +0100
> From: "Juanma Barranquero" <address@hidden>
> Cc: "Emacs Devel" <address@hidden>
>
> Which brings forth a similar case: the savehist-file (from
> savehist.el) is by default saved in utf-8 (at least on recent XEmacs
> and Emacs). However, the eol-conversion is left for Emacs to decide.
When saving history, there's nothing to decide: savehist uses a
temporary buffer, which is born with the native EOL convention of the
underlying platform: -unix on Posix platforms, -dos on Windows.
> That's Not Good when some of the saved variables contain "^M" or "^J"
> on a non-unix environment.
So you mean when reading the history file, yes?
> For example, I did some "^M^J" -> "^J"
> replacements (to fix a garbled patch) on Windows, and in subsequent
> invocations of Emacs the contents of query-replace-history got sillier
> and sillier: "^M^M^J", "^M^M^M^M^J", etc.
>
> Now, savehist.el is friendly enough to contain a variable
> `savehist-coding-system', so it's easy to fix in your own .emacs. The
> question is, for a file whose intention is to preserve exactly some
> variable's contents, wouldn't be a better default to use utf-8-unix?
I don't think it's better, because a lone ^M can fool Emacs even if we
use -unix. What would help, I think, is have an explicit EOL
conversion stated in the coding: cookie. Then the fragile guesswork
will be bypassed.
- Re: saveplace: don't ask for coding system, (continued)
- Re: saveplace: don't ask for coding system, Eli Zaretskii, 2007/12/03
- Re: saveplace: don't ask for coding system, Karl Fogel, 2007/12/03
- Re: saveplace: don't ask for coding system, Eli Zaretskii, 2007/12/03
- Re: saveplace: don't ask for coding system, Karl Fogel, 2007/12/04
- Re: saveplace: don't ask for coding system, Eli Zaretskii, 2007/12/04
- Re: saveplace: don't ask for coding system, Juanma Barranquero, 2007/12/04
- Re: saveplace: don't ask for coding system,
Eli Zaretskii <=
- Re: saveplace: don't ask for coding system, Stefan Monnier, 2007/12/04
- Re: saveplace: don't ask for coding system, Eli Zaretskii, 2007/12/04
- Re: saveplace: don't ask for coding system, Juanma Barranquero, 2007/12/05
- Re: saveplace: don't ask for coding system, Eli Zaretskii, 2007/12/05
- Re: saveplace: don't ask for coding system, Juanma Barranquero, 2007/12/05
- Re: saveplace: don't ask for coding system, Eli Zaretskii, 2007/12/05
- Re: saveplace: don't ask for coding system, Juanma Barranquero, 2007/12/06
- Re: saveplace: don't ask for coding system, Juanma Barranquero, 2007/12/04
- Re: saveplace: don't ask for coding system, Richard Stallman, 2007/12/04