From mboxrd@z Thu Jan 1 00:00:00 1970
Path: news.gmane.org!.POSTED!not-for-mail
From: Philipp Stephani
Newsgroups: gmane.emacs.help
Subject: Re: `write-region' writes different bytes than passed to it?
Date: Sun, 23 Dec 2018 00:16:27 +0100
Message-ID:
References:
<83d0q8136v.fsf@gnu.org>
<83a7lc0whm.fsf@gnu.org>
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: blaine.gmane.org 1545520505 17793 195.159.176.226 (22 Dec 2018 23:15:05 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Sat, 22 Dec 2018 23:15:05 +0000 (UTC)
Cc: help-gnu-emacs
To: Stefan Monnier
Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Dec 23 00:15:01 2018
Return-path:
Envelope-to: geh-help-gnu-emacs@m.gmane.org
Original-Received: from lists.gnu.org ([208.118.235.17])
by blaine.gmane.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1gaqU0-0004Vo-H4
for geh-help-gnu-emacs@m.gmane.org; Sun, 23 Dec 2018 00:15:00 +0100
Original-Received: from localhost ([::1]:44271 helo=lists.gnu.org)
by lists.gnu.org with esmtp (Exim 4.71)
(envelope-from )
id 1gaqW7-0000p9-9X
for geh-help-gnu-emacs@m.gmane.org; Sat, 22 Dec 2018 18:17:11 -0500
Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49023)
by lists.gnu.org with esmtp (Exim 4.71)
(envelope-from ) id 1gaqVf-0000op-SZ
for help-gnu-emacs@gnu.org; Sat, 22 Dec 2018 18:16:44 -0500
Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
(envelope-from ) id 1gaqVd-0004HM-TD
for help-gnu-emacs@gnu.org; Sat, 22 Dec 2018 18:16:43 -0500
Original-Received: from mail-ot1-x334.google.com ([2607:f8b0:4864:20::334]:37779)
by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
(Exim 4.71) (envelope-from )
id 1gaqVb-0004G7-W5
for help-gnu-emacs@gnu.org; Sat, 22 Dec 2018 18:16:41 -0500
Original-Received: by mail-ot1-x334.google.com with SMTP id 40so8343179oth.4
for ; Sat, 22 Dec 2018 15:16:39 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to
:cc; bh=dmFZUpI17wstvNk5aWyUAqT75cxGyLIn4azEVNrm/n8=;
b=FXtkMPSLrC2jSp7akR5EYg3EpMCU6JlkYj/cKV0qLMu85xHjaRD9hQeLCDwKjRzIcK
1/dXQmnzi1YWfgbHLU7yR3M3MkHOypmkX21nU1zlYN7pmXwZgrKR54BxijVm8pTKsyCr
8BWT4TZibeAnFcJZlxDKl5byd86AuwymzQalWW7sYYu9Q6VVIMaNyhAHjADUJ2UzH8Gv
+EuTmuEK1Uv7C4OGUitUnNzoqa1Mq4AC2bo3QiR6WaqX9bzXqFinnEnkmcnEmy5CCRRc
DNoAj+0Z5gefuCNyPIKz0ZSXMViM5WXY66XvTtbbVYdiB3DF6h6GbKrIhVHSN5G/kDQb
QQAA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to:cc;
bh=dmFZUpI17wstvNk5aWyUAqT75cxGyLIn4azEVNrm/n8=;
b=WAUkoxaaGvfflkFhTzdJSkBl+0UTbyi+h/JTerZLP4E71aSl9oIqjvOAWwUnKYHF4d
DPpWxlp4mdrN6CYEoYQ39yn7Qbo6VMlBKdWHG864FVYPiwA21SmtbHsFXn7k9nJx26/P
XPoICr40u6rTDdAwUSOPSB5x9AII7RIgRQBP8MM/UecZejMNWvRtR/13DTuwoP6cSMQ7
SZAbBR8lKfCHql0Fo9UBoU/twjzWBqaO7bcchxm2AExD3F4zGdm7GhuYfsehmjwVCAYv
JwDdLZJgj3kJgBK/r3VhOVocU43eaWPUi0XPVWZzm11JRWiPa+f+XdiTa2/MWXJkS6V6
pJbg==
X-Gm-Message-State: AJcUukcVBbbGgPP8Y9xEcQZJjnzIUIoRttpYm1Espm50fHGHEbx8ES+f
yKXSb8/b4WUt3ZECBPDlTQRoK+jk8NKkZU6WAEVr7g==
X-Google-Smtp-Source: ALg8bN5DCbRmHdxdHI/4JrCrtjhEV1cT8ybnUQmi1hVk3X4K9p6xEeUkeih5HtaZH+o1tqN7VGlsjRxdlgx5981cdMc=
X-Received: by 2002:a9d:4687:: with SMTP id z7mr5564894ote.350.1545520598735;
Sat, 22 Dec 2018 15:16:38 -0800 (PST)
In-Reply-To:
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
recognized.
X-Received-From: 2607:f8b0:4864:20::334
X-BeenThere: help-gnu-emacs@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: Users list for the GNU Emacs text editor
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org
Original-Sender: "help-gnu-emacs"
Xref: news.gmane.org gmane.emacs.help:119029
Archived-At:
Am Di., 11. Dez. 2018 um 20:53 Uhr schrieb Stefan Monnier
:
>
> > I'm not sure that single use case is important enough to change
> > something that was working like that since Emacs 23. Who knows how
> > many more important use cases this will break?
>
> Oh, indeed, especially since it sounds to me like the problem is in the
> original code (if you don't want to change bytes, the use a `binary`
> encoding rather than utf-8).
That wouldn't work with multibyte strings, right? Because they need to
be encoded.
>
> > This whole area is crawling with heuristics, whose only justification
> > is that it does TRT in the vast majority of use cases.
>
> Exactly: I think we should try and get rid of those heuristics
> (progressively). Actually, it's already what we've been doing since
> Emacs-20, tho "lately" the progression in this respect has slowed
> down I think.
>
I'd definitely welcome any simplification in this area. There seems to
be a lot of incidental complexity and undocumented corner cases here.