Subject: Re: bug#24759: 25.1.50; electric-quote-mode

From: Eli Zaretskii <[email-masked]>
Date: Sat, 22 Oct 2016 22:04:28 +0300

> Cc: [email-masked], [email-masked]
> From: Paul Eggert <[email-masked]>
> Date: Sat, 22 Oct 2016 11:47:58 -0700
> 
> Eli Zaretskii wrote:
> >> when I
> >> > later save the file Emacs will say "Select coding system (default
> >> > chinese-iso-8bit): ". This is hardly user-friendly, even if we improve
> >> > Emacs to guess UTF-8, as there may be a long interval between typing `
> >> > and saving the buffer.
> > This is standard Emacs behavior.
> 
> If it is, then the standard behavior is wrong.

It was like that since Emacs 20.1.  I don't see what changed now that
it's suddenly a problem.  I guess you are simply unused to see these
prompts due to your locale, that's all.

> For starters, Emacs should not default to chinese-iso-8bit in a
> unibyte French-language environment merely because the buffer has a
> curved quote.

Emacs collects all the encodings that can handle all of the
characters, then sorts them; chinese-iso-8bit is just the one that
comes up first in the sorted order.  If you are hinting that UTF-8
should come up first, we should just change the sorting order, that's
all.

> That can't be what a typical French user wants.

We have no idea what the user might want.  We can guess at best, and
offer the list of the alternatives from which to choose.  Which is
what we do.

> More generally, if I type any character that won't be saved, I should be 
> notified when I type it, not ages later when I save the buffer.

I disagree.  Most buffers will never be saved.  And even if they will
be, the user could delete the character by the time she saves it.

I don't see how we can do better here than we already do, except by
making the first alternative more suitable for today's world.