unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: 24759@debbugs.gnu.org
Subject: bug#24759: 25.1.50; electric-quote-mode
Date: Sun, 23 Oct 2016 10:13:20 +0300	[thread overview]
Message-ID: <831sz7pmgf.fsf@gnu.org> (raw)
In-Reply-To: <c549d461-9020-ff85-ccbf-b01ec2d41553@cs.ucla.edu> (message from Paul Eggert on Sat, 22 Oct 2016 21:10:08 -0700)

> Cc: 24759@debbugs.gnu.org
> From: Paul Eggert <eggert@cs.ucla.edu>
> 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.

I tried to explain the logic behind this in another message.

> > 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.

I'm not sure you are right (the original Emacs 20.x m17n was heavily
biased towards ISO-2022 encodings, which are multibyte), but I don't
think it matters.

> > 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.

What kind of indication do you have in mind?

> In a unibyte European locale, UTF-8 should be the first-listed
> multibyte encoding by default.

Why not list it the first always?  That sounds simpler to me, because
it doesn't require any guesswork about the user preferences beyond
what we do already.  The encoding we offer as the first alternative
now has nothing to do with user preferences, so why would we introduce
such preferences?

> > 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.

First, buffers that correspond to files are not the only case where
this encoding prompt can pop up.  Text sent to a subprocess or to the
network (like this email message I'm typing) is another.

And second, I think you underestimate the annoyance that would result
from such prompting.  If the single prompt we now issue already annoys
you, it hardly makes sense to do the same multiple times.  It is
better to try to minimize the prompts by silently doing TRT whenever
we can.

> It's a bit like spelling checking.

It's not.  A mis-spelled buffer can be saved, but we cannot save a
buffer without knowing how to encode it.





  reply	other threads:[~2016-10-23  7:13 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-21 19:38 bug#24759: 25.1.50; electric-quote-mode Dani Moncayo
2016-10-21 19:58 ` Eli Zaretskii
2016-10-21 20:26   ` Dani Moncayo
2016-10-21 21:01     ` Paul Eggert
2016-10-21 21:04   ` Paul Eggert
2016-10-22  6:49     ` Eli Zaretskii
2016-10-22  7:47       ` Eli Zaretskii
2016-10-22  8:16         ` Dani Moncayo
2016-10-22  9:10           ` Eli Zaretskii
2016-10-22 10:36             ` Dani Moncayo
2016-10-22 18:47       ` Paul Eggert
2016-10-22 19:04         ` Eli Zaretskii
2016-10-22 19:34           ` Eli Zaretskii
2016-10-23  4:10             ` Paul Eggert
2016-10-23  7:13               ` Eli Zaretskii [this message]
2016-10-23  8:24                 ` Paul Eggert
2016-10-23  8:51                   ` Eli Zaretskii
2016-10-22 19:20         ` Andreas Schwab
2016-10-23  3:55           ` Paul Eggert
2016-10-23  7:00             ` Eli Zaretskii
2016-10-23  8:15               ` Paul Eggert
2016-10-23  8:55                 ` Eli Zaretskii
2016-10-23  9:15                   ` Dani Moncayo
2016-10-23  9:28                     ` Paul Eggert

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=831sz7pmgf.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=24759@debbugs.gnu.org \
    --cc=eggert@cs.ucla.edu \
    /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).