From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#52459: 28.0.90; prin1-to-string does not escape bidi control characters despite print-escape-control-characters=t Date: Mon, 13 Dec 2021 20:52:08 +0200 Message-ID: <83sfuwl4mf.fsf@gnu.org> References: <83v8ztmu75.fsf@gnu.org> <93d63756-f75d-c53e-de02-2e8270d07311@daniel-mendler.de> <83r1agn184.fsf@gnu.org> <0eabc668-ecb2-8f77-17cf-f9cb6dcf0626@daniel-mendler.de> <0504d4a8-1a4b-a451-d7d3-fea1c116b96d@daniel-mendler.de> <8335mwmssm.fsf@gnu.org> <7027aad4-d156-12ae-7356-4d55be5716b1@daniel-mendler.de> <83wnk8l9ha.fsf@gnu.org> <2511c498-1e36-07b2-b9b8-5849902cd416@daniel-mendler.de> <83tufcl5qd.fsf@gnu.org> <4ac4a4ce-2bb4-4120-d52d-665a029cab4e@daniel-mendler.de> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12549"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 52459@debbugs.gnu.org To: Daniel Mendler Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 13 19:53:11 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mwqRi-00033R-Ra for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 13 Dec 2021 19:53:11 +0100 Original-Received: from localhost ([::1]:59708 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mwqRg-00028w-VX for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 13 Dec 2021 13:53:08 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:57212) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mwqRa-00028P-PE for bug-gnu-emacs@gnu.org; Mon, 13 Dec 2021 13:53:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45266) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mwqRa-0001Wa-EB for bug-gnu-emacs@gnu.org; Mon, 13 Dec 2021 13:53:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mwqRa-0001r7-28 for bug-gnu-emacs@gnu.org; Mon, 13 Dec 2021 13:53:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 13 Dec 2021 18:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52459 X-GNU-PR-Package: emacs Original-Received: via spool by 52459-submit@debbugs.gnu.org id=B52459.16394215437085 (code B ref 52459); Mon, 13 Dec 2021 18:53:02 +0000 Original-Received: (at 52459) by debbugs.gnu.org; 13 Dec 2021 18:52:23 +0000 Original-Received: from localhost ([127.0.0.1]:56812 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mwqQx-0001qD-6E for submit@debbugs.gnu.org; Mon, 13 Dec 2021 13:52:23 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:56268) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mwqQt-0001py-9a for 52459@debbugs.gnu.org; Mon, 13 Dec 2021 13:52:21 -0500 Original-Received: from [2001:470:142:3::e] (port=40224 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mwqQn-0001I7-Kl; Mon, 13 Dec 2021 13:52:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=3YyFb/a41JwiMgEXeqL1jnPFxb/al8XMmniO20TDmuE=; b=ZamVwh0t4mkb HIdGSFEbV6a2T6raohrQbVtW4kMl9v1cOY/Kmi2NF2tbrHXSh+U1WN3IwJZTcJsRGQgVk5Um2lukq BMczwYjatKOuNn5Ze7KwzBNVdO4bzD5U/PW5sHXZv5z6eU3YSEPYYDIb3eI3LU8rmq5kiNV2BDYCF UDhopUAeFHHkymckZ+HUDRxFZgrHExBEYlfAuapa/Y3Xv1KYXCn8kmTIQWTcXR6tzhRZtJO+g2Sax 0k2Ryu7SAZnKYfMzgc+GUi3h2dsTBN7tKtJhmBznHJ1ELO/COxsw1tfvMV7JxDjm1kM874c9VCVaJ j00YJaoMBjqzIrJFmU95LA==; Original-Received: from [87.69.77.57] (port=4925 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mwqQn-0003Ki-Bh; Mon, 13 Dec 2021 13:52:13 -0500 In-Reply-To: <4ac4a4ce-2bb4-4120-d52d-665a029cab4e@daniel-mendler.de> (message from Daniel Mendler on Mon, 13 Dec 2021 19:35:37 +0100) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:222337 Archived-At: > Cc: 52459@debbugs.gnu.org > From: Daniel Mendler > Date: Mon, 13 Dec 2021 19:35:37 +0100 > > > What I'm suggesting is to use print-escape-multibyte when producing > > strings for inclusion in the source code, and only for that purpose. > > You, OTOH, are talking about case 2), where these strings are > > presented in a UI. Then of course print-escape-multibyte is > > inappropriate for that. > > This is not good enough, I want to produce strings which can be copied > to the source and presented in the UI in the same form. I argue that > this is not an unreasonable requirement. Not only is it unreasonable, it is simply impossible. Representing characters _on_display_ and writing such a representation into a file, as in simple.el, are two different and incompatible goals. The solutions for them must be separate. I already explained why, and if my explanations still don't convince you, then I'm sorry, but I cannot help you more than that, because it means we don't have a common language and understanding to discuss this stuff. > >> Once again - I propose the addition of configuration variables which > >> configure `prin1-string` to produce output where all control characters > >> are escaped. > > > > That could help in case 1), but not in case 2), because there prin1 is > > not used, or not necessarily used. > > I am only taking about prin1. The issue is about prin1. My goal is to > produce safely escaped string representations of Elisp values, including > strings and other values. Once again: prin1 will not help with displaying these characters. Emacs doesn't use prin1 to display text. > > But I already said that, and so it sounds like we have some grave > > misunderstanding that I'm unable to resolve. So maybe it's time for > > someone else to try. Sorry I couldn't be of more help. > > Yes. Maybe someone else can chime in with their opinion. Yes, please.