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: Tue, 14 Dec 2021 19:51:50 +0100 Message-ID: <4c33ab33-6d07-3522-680a-4fbc7133d56e@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> <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> <86f4ea53-1f83-eb14-2f24-b50e9de6a80a@daniel-mendler.de> <83mtl3ja62.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="16706"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 52459@debbugs.gnu.org, dgutov@yandex.ru To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 14 19:53: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 1mxCvI-0004BO-3O for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 14 Dec 2021 19:53:12 +0100 Original-Received: from localhost ([::1]:45576 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mxCvG-0002gh-Tx for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 14 Dec 2021 13:53:10 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:48630) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxCv8-0002gZ-6o for bug-gnu-emacs@gnu.org; Tue, 14 Dec 2021 13:53:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48050) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mxCv7-0000k2-Ud for bug-gnu-emacs@gnu.org; Tue, 14 Dec 2021 13:53:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mxCv7-0004Vz-Rs for bug-gnu-emacs@gnu.org; Tue, 14 Dec 2021 13:53: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: Tue, 14 Dec 2021 18:53: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.163950793617299 (code B ref 52459); Tue, 14 Dec 2021 18:53:01 +0000 Original-Received: (at 52459) by debbugs.gnu.org; 14 Dec 2021 18:52:16 +0000 Original-Received: from localhost ([127.0.0.1]:59596 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mxCuO-0004Ux-6T for submit@debbugs.gnu.org; Tue, 14 Dec 2021 13:52:16 -0500 Original-Received: from server.qxqx.de ([178.63.65.180]:50291 helo=mail.qxqx.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mxCu7-0004UE-PR for 52459@debbugs.gnu.org; Tue, 14 Dec 2021 13:52:14 -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=w7nudVINTnj9bJCT4+a/Oyp06yJIqFY9YMRYh7iYVng=; b=g+LMRElxd8bfzxCdPgrc12oBdP skc/Tf4U+mkBXVphWdVixvLxDBtI8SHR/zZz3t8jfvdrntjxI3tAa+v3L3bXYPf4PYcKcXNnHOywr yaFhvHxMSHgh8fLLCpGgbncgXPYYI6IYORl4nMyxqCFk3/GBYJwFUbGzPrHHaL7yTecA=; In-Reply-To: <83mtl3ja62.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:222385 Archived-At: On 12/14/21 7:47 PM, Eli Zaretskii wrote: >> Cc: 52459@debbugs.gnu.org >> From: Daniel Mendler >> Date: Tue, 14 Dec 2021 19:32:47 +0100 >> >> On 12/14/21 7:23 PM, Dmitry Gutov wrote: >>> 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'. >> >> No, `print-escape-multibyte` also applies to `format and `message`. Try >> the following: >> >> (let ((print-escape-multibyte t)) >> (format "%S" bidi-directional-controls-chars) >> (message "%S" bidi-directional-controls-chars)) > > Strings are not usually formatted using %S, they are formatted using > %s. It would be unreasonable to expect Lisp programs to use %S for > formatting strings. I am talking about creating string representations of Elisp values. I did not exclusively talk about strings. Strings are of course also Elisp values, but for a debugger UI it is useful to produce string representations of general Elisp values.