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: Sun, 12 Dec 2021 22:42:06 +0200 Message-ID: <83v8ztmu75.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12977"; 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 Sun Dec 12 21:43:21 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 1mwVgm-0003Bx-L1 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 12 Dec 2021 21:43:20 +0100 Original-Received: from localhost ([::1]:32882 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mwVgk-0005Jj-Vi for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 12 Dec 2021 15:43:19 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:49034) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mwVgW-0005Ja-6i for bug-gnu-emacs@gnu.org; Sun, 12 Dec 2021 15:43:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41732) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mwVgU-0006M9-AC for bug-gnu-emacs@gnu.org; Sun, 12 Dec 2021 15:43:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mwVgU-0002wk-7J for bug-gnu-emacs@gnu.org; Sun, 12 Dec 2021 15:43: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: Sun, 12 Dec 2021 20:43: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.163934174211278 (code B ref 52459); Sun, 12 Dec 2021 20:43:02 +0000 Original-Received: (at 52459) by debbugs.gnu.org; 12 Dec 2021 20:42:22 +0000 Original-Received: from localhost ([127.0.0.1]:53278 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mwVfp-0002vq-P5 for submit@debbugs.gnu.org; Sun, 12 Dec 2021 15:42:21 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:48152) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mwVfn-0002vc-II for 52459@debbugs.gnu.org; Sun, 12 Dec 2021 15:42:19 -0500 Original-Received: from [2001:470:142:3::e] (port=39626 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 1mwVfh-0006I9-7C; Sun, 12 Dec 2021 15:42: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=2uGuzVBShhJdin1cMzh25aFFqqXBSdb342zpqBM7qVE=; b=Xg0YOtyzPU05 Y6u+yfE8wXiyAnbE9D4i1iW8IgxcrDz0hrJY443IhbRVziulvqI3wiTeIZtXSzCN/PMjBy3cpFUTM u46eT7XxBe75MK1wo7+Xzsh558NS66xtbnUppgGC0Hrcwvw93mmL00Mivu89O0hGtWZFrb/l98mRV bMVbW8do4vjDm6rbmo5G4jQO7kIr0oasjsuulZ5r/I+/J2oBfDFLjtYZ6LzgacHO7SOMb403LzFZi 3mW2zyJYwUAO/FEeFmd81bW81lhmNZxmAxxdKaolxJvpjxMXxk1Et9Qzig6e/DWPOaHzwjtk2BHeQ Pke39C8VGnAScVo5dAqfog==; Original-Received: from [87.69.77.57] (port=2781 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 1mwVfh-0002MV-1U; Sun, 12 Dec 2021 15:42:13 -0500 In-Reply-To: (message from Daniel Mendler on Sun, 12 Dec 2021 21:13:12 +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:222269 Archived-At: > From: Daniel Mendler > Date: Sun, 12 Dec 2021 21:13:12 +0100 > > 1. Start emacs -Q > 2. Enter the following in the scratch buffer: > (let ((print-escape-control-characters t)) > (prin1-to-string bidi-directional-controls-chars)) > 3. Evaluate. The bidi control characters are not escaped despite > print-escape-control-characters=t. > > The bidi characters should probably be treated as control characters > since they have the Bidi_Control property according to the Unicode > standard. print-escape-control-characters is about ASCII control characters, not about Unicode fomatting controls. > If it is undesirable to treat bidi control characters like other control > characters it may make sense to introduce another print configuration > variable, print-escape-all-control-characters or > print-escape-bidi-control-characters? I don't think it's desirable. Those formatting controls have starkly different roles that ASCII control characters, and we already have features to make them stand out on display. Moreover, escape sequences are not well-defined for codepoints beyond a single byte. So I don't think we should do anything here, and we should close the bug.