From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov 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: Tue, 14 Dec 2021 21:56:16 +0300 Message-ID: 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> <83sfuwl4mf.fsf@gnu.org> <83r1agl3um.fsf@gnu.org> <0491af1e-b57d-c5bd-c17d-b9bc1ef34929@daniel-mendler.de> <83pmq0l2h5.fsf@gnu.org> <83pmpzjaji.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1559"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 Cc: mail@daniel-mendler.de, 52459@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 14 19:58:13 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 1mxD08-0000Bl-PC for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 14 Dec 2021 19:58:12 +0100 Original-Received: from localhost ([::1]:49766 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mxD07-0005nU-MT for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 14 Dec 2021 13:58:11 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:49380) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxCzz-0005nL-B7 for bug-gnu-emacs@gnu.org; Tue, 14 Dec 2021 13:58:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48054) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mxCzy-0001JY-I8 for bug-gnu-emacs@gnu.org; Tue, 14 Dec 2021 13:58:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mxCzy-0004d5-Fo for bug-gnu-emacs@gnu.org; Tue, 14 Dec 2021 13:58:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 14 Dec 2021 18:58: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.163950824217741 (code B ref 52459); Tue, 14 Dec 2021 18:58:02 +0000 Original-Received: (at 52459) by debbugs.gnu.org; 14 Dec 2021 18:57:22 +0000 Original-Received: from localhost ([127.0.0.1]:59600 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mxCzK-0004c5-1S for submit@debbugs.gnu.org; Tue, 14 Dec 2021 13:57:22 -0500 Original-Received: from mail-lf1-f51.google.com ([209.85.167.51]:40542) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mxCzI-0004bp-C0 for 52459@debbugs.gnu.org; Tue, 14 Dec 2021 13:57:21 -0500 Original-Received: by mail-lf1-f51.google.com with SMTP id l22so38626197lfg.7 for <52459@debbugs.gnu.org>; Tue, 14 Dec 2021 10:57:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=3GaGLJzIIfL5MeJW6axnyzOfmDe2JjbQtd8LPJVzYag=; b=I5d/sRnYCKdC+7VA2JVTbfTmsl6L3armio6qI1Uy/qpf06L/Fe8dSTrdg+GqSURxpv mbUkWXJ8akylqbHEaWqUO8Wu2d3nuOhZps+KYCNwj8vpnH0hb+4FoXjn3neSG0+CugCO 7Ca3BRrkEb/Mdzpd1gxKt2KeH02ox2wwwfFjfRN8kmkayBlhX4vm1Q9G8kn4rDTt8ic9 Vx/inPuT9apRVSatdaUT4GgWhQjru5ZuMPLpspvIlff/+e6Uj+NWzj/2f77I3ePzUevs nDiWJrRjuXcYFkRrko0DuBeg9geCqrXjmzgiLjRemN62CAQPmPCySomAdEgywMXByLFI jkFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=3GaGLJzIIfL5MeJW6axnyzOfmDe2JjbQtd8LPJVzYag=; b=CqdD2QioWw0iftxTqxjeA1LlrJY9eHKCFV87kLIQaOmG3971rLyn3ZVf2sdk+NKgsW PgXiD08qrF6kYvZXs/OXTBq2mn+M6tm6YE98o8stUj5OhRtsUVQCJZUPCtjm0yu5dfbi vx8U1dWKVNi+0an2rrVEEum4RHODzNeHNcCRkbtOYYDSwDgmbNeX+EpxTFITJPy0+S+5 qiL8ss/Y7CqNuwORvjpybtvT6Qkfp6zG8r0XKPXmeaaTH7a+WPSMYvOZUGmdgBwO7sif oG9qLFGxIJkVm4zauerIdLVFhesDAv2oLC2eEaIu3yocUiYMX4H19ZkBwjCHNlVa3ccG UMxA== X-Gm-Message-State: AOAM533G70sk2J/4t+UclMq2xWEtuqbVlKxHjr6CRqyfpOwx+yDkhHFT aDHs4rJscCwxRqpx8ZmLKRsZGA9fBIA= X-Google-Smtp-Source: ABdhPJxSMqWuRKySYZTSHvtaNqCcZ9r5tswailDoESHuIxmUpuvSZSq3ekBrFW1YeLvdGDwAtRn4dw== X-Received: by 2002:a19:fc0a:: with SMTP id a10mr6228422lfi.507.1639508234054; Tue, 14 Dec 2021 10:57:14 -0800 (PST) Original-Received: from [192.168.0.103] ([5.18.233.185]) by smtp.googlemail.com with ESMTPSA id d10sm92196lfv.114.2021.12.14.10.57.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 14 Dec 2021 10:57:13 -0800 (PST) In-Reply-To: <83pmpzjaji.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:222386 Archived-At: On 14.12.2021 21:39, Eli Zaretskii wrote: >> Cc:52459@debbugs.gnu.org >> From: Dmitry Gutov >> Date: Tue, 14 Dec 2021 21:23:27 +0300 >> >>> And, to reiterate once more, I'm against partial solutions that affect >>> only some functions that produce strings, and don't affect at all any >>> text displayed from a buffer. It would be a broken solution, because >>> we will never be able to explain why 'prin1' produces escapes whereas >>> 'format' and 'message' don't. >> I just did a little testing, and it seems >> 'print-escape-control-characters' only affects 'prin1-to-string' and >> 'prin1' but not 'message' or 'format'. >> >> Is that a problem? > It could be. I guess the only reason no one complained about it is > that those print functions are used in very specialized cases. But in > this case, the requirement was to use it for displaying human-readable > text in a UI, and I think in that context it would be highly > surprising, to say the least, to have it supported by prin1, but not > by formatted printing APIs. I'm not sure it would be a problem if 'message' and 'format' also honor that new variable. Aside from inconsistency with existing vars, that is. >> If not, adding a new variable which makes the same distinction seems >> consistent with the current design. > The goal is explicitly different, and specifically targets the display > of text to users. And IMO that is not consistent with the current > design, because these variables definitely weren't meant to affect how > text is presented to users. We have other similar features for that, > like nobreak-char-display etc. It seems to me that you misunderstand the use case, or at least the approach that Daniel wants to take: Helpful, or Help buffers used by commands like 'describe-variable', use prin1 to output values which are not known in advance (like the value of the described variable). And the dynamic vars under discussion can make those printed values more predictable and easier to grok (and copy-paste, and etc).