From: Eli Zaretskii <eliz@gnu.org>
To: Richard Copley <rcopley@gmail.com>
Cc: 22436@debbugs.gnu.org
Subject: bug#22436: read-coding-system uses wrong default when called from write-file
Date: Sat, 23 Jan 2016 15:09:39 +0200 [thread overview]
Message-ID: <83a8nw5tnw.fsf@gnu.org> (raw)
In-Reply-To: <CAPM58oiL9mg9eZHs==G7B39sJ3zC6fnBjhaJYrBYSYi0WvhZaw@mail.gmail.com> (message from Richard Copley on Sat, 23 Jan 2016 11:53:13 +0000)
> From: Richard Copley <rcopley@gmail.com>
> Date: Sat, 23 Jan 2016 11:53:13 +0000
> Cc: 22436@debbugs.gnu.org
>
> Thanks for explaining that. I imagined Emacs would use a
> heuristic based on the contents of the file.
There is indeed a heuristic, but it's not very smart, and only works
well when the encoding is blatantly clear. This is an area where
improvements are welcome. In any case, when presented with a buffer
that includes a single non-ASCII character that can be encoded by a
dozen of possible encodings, it's hard to be too smart based on the
contents alone.
> If there were a fallback ordering that preferred utf-8 or some
> other universally applicable coding system it would be easier
> for most users and less confusing for beginners.
Such a fallback does exist, see coding-system-priority-list. What
"M-x prefer-coding-system RET" does is manipulate the priorities so
that the encoding you typed is preferred.
Do we close this report, or is there something else to do about it?
Thanks.
next prev parent reply other threads:[~2016-01-23 13:09 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-22 19:31 bug#22436: read-coding-system uses wrong default when called from write-file Richard Copley
2016-01-22 21:23 ` Eli Zaretskii
2016-01-22 23:23 ` Richard Copley
2016-01-23 5:56 ` Eli Zaretskii
2016-01-23 9:45 ` Richard Copley
2016-01-23 11:31 ` Eli Zaretskii
2016-01-23 11:53 ` Richard Copley
2016-01-23 13:09 ` Eli Zaretskii [this message]
2016-01-23 13:12 ` Lars Magne Ingebrigtsen
2016-01-23 13:46 ` Eli Zaretskii
2016-01-23 13:55 ` Lars Magne Ingebrigtsen
2016-01-23 14:39 ` Eli Zaretskii
2016-01-25 22:38 ` Richard Copley
2016-01-26 15:39 ` Eli Zaretskii
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83a8nw5tnw.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=22436@debbugs.gnu.org \
--cc=rcopley@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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).