unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Kenichi Handa <handa@m17n.org>
Cc: eliz@gnu.org, emacs-devel@gnu.org
Subject: Re: What does `undecided' do for encoding text?
Date: Mon, 16 Feb 2009 08:47:08 -0500	[thread overview]
Message-ID: <jwvtz6u4hu9.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <E1LZ1u0-0004QQ-9M@etlken> (Kenichi Handa's message of "Mon, 16 Feb 2009 20:44:44 +0900")

>>>> It looks like `undecided' works the same as `raw-text' for encoding
>>>> text.  Is that true in general?
>> > Yes.  More exactly, it is the same as `raw-text-unix'.
>> Which I prefer calling `binary'.

> What do you mean by "calling"?

> raw-text-unix and binary are different when
> coding-system-change-text-conversion and
> coding-system-change-eol-conversion are called.

Good point, I tend to forget about this.  But in the context of "how is
`undecided' treated during write", this doesn't make any difference.

>>>> I think this should be reflected in the ELisp manual.
>> > I don't think so because it is just a fallback behavior, and
>> > Elisp programmer should avoid specifying `undecided' on
>> > encoding.

>> Then why do we even allow it?  We should signal an error.

> It seems difficult to find a good point of signaling an
> error.  At least, visiting an ascii only file, inputting
> ascii only, and saving it should be a valid operation.  At
> that time, buffer-file-coding-system is undecided-unix.

Then an error should only be signalled when we end up trying to encode
a non-ASCII char.


        Stefan




      reply	other threads:[~2009-02-16 13:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-07 15:32 What does `undecided' do for encoding text? Eli Zaretskii
2009-02-10  7:01 ` Kenichi Handa
2009-02-10  9:22   ` Eli Zaretskii
2009-02-10 11:16     ` Kenichi Handa
2009-02-10 11:47       ` Eli Zaretskii
2009-02-11  9:20         ` Kenichi Handa
2009-02-10 22:04   ` Stefan Monnier
2009-02-16 11:44     ` Kenichi Handa
2009-02-16 13:47       ` Stefan Monnier [this message]

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=jwvtz6u4hu9.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=handa@m17n.org \
    /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).