From: Eli Zaretskii <eliz@gnu.org>
To: "Juanma Barranquero" <lekktu@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: saveplace: don't ask for coding system
Date: Tue, 04 Dec 2007 23:32:08 +0200 [thread overview]
Message-ID: <u8x4aywmf.fsf@gnu.org> (raw)
In-Reply-To: <f7ccd24b0712040840y5a81cf73i4ff3b5986f934f2b@mail.gmail.com> (lekktu@gmail.com)
> Date: Tue, 4 Dec 2007 17:40:57 +0100
> From: "Juanma Barranquero" <lekktu@gmail.com>
> Cc: "Emacs Devel" <emacs-devel@gnu.org>
>
> 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.
next prev parent reply other threads:[~2007-12-04 21:32 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-28 14:46 saveplace: don't ask for coding system David Reitter
2007-11-28 21:47 ` Eli Zaretskii
2007-11-29 0:25 ` David Reitter
2007-12-03 1:04 ` General variable for verbosity level. (was: saveplace: don't ask for coding system) Karl Fogel
2007-12-03 20:22 ` David Reitter
2007-12-03 21:44 ` General variable for verbosity level Karl Fogel
2007-12-03 22:34 ` Reiner Steib
2007-11-29 9:04 ` saveplace: don't ask for coding system Juanma Barranquero
2007-11-29 21:04 ` Eli Zaretskii
2007-11-30 9:17 ` Juanma Barranquero
2007-11-29 9:05 ` Juanma Barranquero
2007-12-02 16:51 ` David Reitter
2007-12-02 21:26 ` Karl Fogel
2007-12-02 21:31 ` David Reitter
2007-12-02 23:23 ` Karl Fogel
2007-12-03 4:18 ` Eli Zaretskii
2007-12-03 10:59 ` Karl Fogel
2007-12-03 11:06 ` Juanma Barranquero
2007-12-03 21:02 ` Stephen J. Turnbull
2007-12-03 20:48 ` Eli Zaretskii
2007-12-03 21:32 ` Karl Fogel
2007-12-04 4:20 ` Eli Zaretskii
2007-12-04 6:17 ` Karl Fogel
2007-12-04 20:57 ` Eli Zaretskii
2007-12-04 16:40 ` Juanma Barranquero
2007-12-04 21:32 ` Eli Zaretskii [this message]
2007-12-04 22:24 ` Stefan Monnier
2007-12-05 4:52 ` Eli Zaretskii
2007-12-05 8:49 ` Juanma Barranquero
2007-12-05 18:25 ` Eli Zaretskii
2007-12-05 20:05 ` Juanma Barranquero
2007-12-06 4:21 ` Eli Zaretskii
2007-12-06 12:38 ` Juanma Barranquero
2007-12-04 22:51 ` Juanma Barranquero
2007-12-04 16:55 ` Richard Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=u8x4aywmf.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=lekktu@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.