From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: Towards a cleaner build Date: Fri, 17 May 2019 12:24:40 +0200 Message-ID: References: <83tvdtbimw.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="227024"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 17 12:30:08 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hRa7s-000wwd-7E for ged-emacs-devel@m.gmane.org; Fri, 17 May 2019 12:30:08 +0200 Original-Received: from localhost ([127.0.0.1]:45860 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRa7r-0006cp-3c for ged-emacs-devel@m.gmane.org; Fri, 17 May 2019 06:30:07 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:49256) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRa6E-0006HC-5s for emacs-devel@gnu.org; Fri, 17 May 2019 06:28:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hRa2e-0005qi-HR for emacs-devel@gnu.org; Fri, 17 May 2019 06:24:45 -0400 Original-Received: from quimby.gnus.org ([80.91.231.51]:60846) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hRa2e-0005pw-Ah; Fri, 17 May 2019 06:24:44 -0400 Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hRa2a-0001nq-GQ; Fri, 17 May 2019 12:24:43 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAFVBMVEWpm356Wj16Lh58RS0D AgIOCQlXGRRYnXIxAAACVElEQVQ4jXWUwY6kIBCGizbdZ0oyngXSnIFKfAKd88z24nnUyPs/whai k01mt6KR8PEXxQ8I6T8B47+jgGne2tVqzC6XSPzuFdhwswrAKEOGQ8fYVbAEoZUHE00NK06wIXiE G/fY0r96qGBcAlAPjbFVEgAuhefR0JQJmEUP2I0Tg/fFNwxEBbbnVgULqtb0AMTYktGsHU6AGBDA N2QjGQBU3TfACrhiW8Awlck3RCqAOCxpCW3sDsAKKqmi8dFw3YDtBRQDCexItAxEOFNxVwUWW8tf gdgdtqOogCvQir83BkUxnQoeiJaL8DcKw2HJFyguzBeF0gikVKheLVJl/E7FCgziAJ+oNna0pOIF SX9TJ+Bys6ygtcorQVakv0BJRRRpFVlUwBbOUEFAkiosF1DbpWh1DCp8nSCleQ5FIiV21P2K/Qk+ cQvY8ezQmWGNkQ/DBXAvkvuLFA1lKbKCF257UMcCW9dZbjUVzOVczgy4RxN1H/JM9cq5mAsoMITg spTn5DOnPqpCiC5pKy/FnJfiIcAD8QWyzPGolpB/BH+ADiWqTxBvDKZRZmhyMeUtdZjc/qFvFfgd 7qmA+7inxI9u3WXJPmcGrXuOk9nTuuYTpJkbfLAY5H1Kq/kGv/mscjQp3VwejKnlTnx3tqHUm1eX Vu1WAxeYclc2d89unY1rz63lbr0naNkQfFs3o9v+BLOhVwMtb4N/5N64tW9OxUjzEwUBBE/HDXke QLvd7kk1RLyJwLdOiLrAORnzfOdb4wVnYwzKnal4JeOPv0/6+eeZysg/xgfLfevm13MAAAAASUVO RK5CYII= In-Reply-To: <83tvdtbimw.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 17 May 2019 11:16:39 +0300") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 80.91.231.51 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:236642 Archived-At: Eli Zaretskii writes: >> ((eq type 'C_STRING) >> (setq str (string-make-unibyte str))) >>=20 >> (string-make-unibyte "=C3=A1=E2=98=AAfoo") >> =3D> "\341*foo" > > This example is not relevant, because C_STRING is for strings that are > actually binary blobs, i.e. sequences of raw bytes. If you use > examples of human-readable text, you get the wrong impression of what > is intended. Yeah, I was looking at the doc string for that function, which begins --- Multibyte character codes are converted to unibyte according to =E2=80=98nonascii-translation-table=E2=80=99 or, if that is nil, =E2=80=98n= onascii-insert-offset=E2=80=99. --- which makes it sound like it's made for doing human-readable translation somehow. And I was fooled by =E2=98=AA happening to have * as the lower by= te, so it looked that way, too. :-) But I see that you've now removed that bit from the doc string, so now it makes more sense. >> Do we have a library function (or a coding system) that does the >> same thing? > > Yes, it's called string-make-unibyte ;-) > > I'm not sure we have anything else, but let me dwell on this for a > while. Ok. :-) > Btw, your other change in select.el was incorrect, and I reverted it. > For starters, when we need to _decode_ text (which is what > gui-get-selection does, since it imports text into Emacs), it can > never be TRT to _encode_ it. Oh, sorry; thinko. > In general (with the possible exception of Gnus ;-), the places where > we left those string-make/to/as-uni/multibyte thingies are there not > because we were lazy, but because the replacements are either not > trivial or don't exist. Right. Should we slap a with-no-warnings around this call, then? Warning about a usage where we have verified that it's what we really, really want to do seems counter productive... ;; We want to convert each non-ASCII byte to the ;; corresponding eight-bit character, which has ;; a codepoint >=3D #x3FFF00. (string-to-multibyte data)))) > The deprecation message's advice in most of > these cases is simply misleading. So I welcome work on these places, > but my advice is to discuss each one of them before making changes, > lest we break the code in some more or less subtle use cases. Will do. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no