From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Daniel Mendler 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 19:35:37 +0100 Message-ID: <4ac4a4ce-2bb4-4120-d52d-665a029cab4e@daniel-mendler.de> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32875"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 52459@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 13 19:36:16 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 1mwqBM-0008I9-5N for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 13 Dec 2021 19:36:16 +0100 Original-Received: from localhost ([::1]:45380 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mwqBK-0008WL-MC for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 13 Dec 2021 13:36:14 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:52830) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mwqB8-0008TS-H1 for bug-gnu-emacs@gnu.org; Mon, 13 Dec 2021 13:36:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45209) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mwqB8-0006cP-7e for bug-gnu-emacs@gnu.org; Mon, 13 Dec 2021 13:36:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mwqB7-0001OL-OB for bug-gnu-emacs@gnu.org; Mon, 13 Dec 2021 13:36:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Daniel Mendler Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 13 Dec 2021 18:36:01 +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.16394205495332 (code B ref 52459); Mon, 13 Dec 2021 18:36:01 +0000 Original-Received: (at 52459) by debbugs.gnu.org; 13 Dec 2021 18:35:49 +0000 Original-Received: from localhost ([127.0.0.1]:56755 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mwqAv-0001Nw-JP for submit@debbugs.gnu.org; Mon, 13 Dec 2021 13:35:49 -0500 Original-Received: from server.qxqx.de ([178.63.65.180]:39345 helo=mail.qxqx.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mwqAs-0001Ng-1h for 52459@debbugs.gnu.org; Mon, 13 Dec 2021 13:35:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=qxqx.de; s=mail1392553390; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=6EZL9iQdAZyF0QbeA0uEoCMvjBtKPnbbBH0K9ILmMhI=; b=VYvhkwxIo8ZWTVOIg45L/ncodo tQXFrdMxlFboTFwOilnJBrUEOnD+fY1/uITLNARb+eFJk8ZskwqHaLd01xeqQs+JR4RH6/mrmX2s0 kk9CvZAFXR8Tz5KzwMRwgsaaZzr9GbL2y6Xubx90Uj2nV8Ae1lzgJm0/ayze/VelIBcY=; In-Reply-To: <83tufcl5qd.fsf@gnu.org> Content-Language: en-US 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:222336 Archived-At: On 12/13/21 7:28 PM, Eli Zaretskii wrote: > But in the debug UI use-case, you do want to see the text and be able > to read it, don't you? Which is why you said you don't want to have > escapes there, you want to see characters. Which means that use-case > is about _displaying_ these characters, not _replacing_ them with > something else. And you _cannot_ copy anything that only exists on > display, because that copies the actual codepoints, not their visual > representation. I want to escape *only control characters* not all multi byte characters. > The use case you describe with Marginalia is of a different kind -- > why do they use print-escape-multibyte in that case? Cyrillic text > doesn't use bidi controls, so what does that use case have to do with > your request? Of course Cyrillic text is not using bidi but it is still affected by print-escape-multibyte. If I have a debugging UI I want it to work with all kinds of languages, rtl and ltr. Multi-byte and single-byte. > 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. >> 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. > 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.