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

From: Paul Eggert <[email-masked]>
Date: Sat, 22 Oct 2016 21:10:08 -0700

Eli Zaretskii wrote:
> Once we have tried all those defaults, and found they cannot do the
> job, we've exhausted our potential of guessing "what the user wants"
> reliably, so we must now ask the user to tell us that.

It is odd that Emacs uses UTF-8 without questions in the C locale, but prompts 
and suggest a Chinese encoding in a unibyte French locale.

> It was like that since Emacs 20.1.  I don't see what changed now that
> it's suddenly a problem.

Emacs is now more likely to have non-unibyte text, partly due to its fancier 
quoting and partly because Unicode is more ubiquitous than it was in 1997 when 
Emacs 20.1 was released. So the problem is more likely to occur now.

> If you are hinting that UTF-8 should come up first

UTF-8 should be the most-preferred multibyte encoding nowadays, unless there is 
a reasonable indication that the user prefers something else. In a unibyte 
European locale, UTF-8 should be the first-listed multibyte encoding by default.

> Most buffers will never be saved.

For buffers that don't correspond to files, we needn't bother with any of this 
checking. But for buffers that correspond to files with restrictive encodings, 
it would be helpful to warn users earlier rather than later about this sort of 
problem.

It's a bit like spelling checking. Many users prefer checking spelling on the 
fly, rather than checking only when you save the file.