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: Tue, 14 Dec 2021 21:20:51 +0200 Message-ID: <83ilvrj8mk.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> <83sfuwl4mf.fsf@gnu.org> <83r1agl3um.fsf@gnu.org> <0491af1e-b57d-c5bd-c17d-b9bc1ef34929@daniel-mendler.de> <83pmq0l2h5.fsf@gnu.org> <83pmpzjaji.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1159"; mail-complaints-to="usenet@ciao.gmane.io" Cc: mail@daniel-mendler.de, 52459@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 14 20:22:12 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 1mxDNK-000AVr-1z for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 14 Dec 2021 20:22:10 +0100 Original-Received: from localhost ([::1]:59906 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mxDNI-0005em-Ly for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 14 Dec 2021 14:22:08 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:60724) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxDNC-0005ed-KI for bug-gnu-emacs@gnu.org; Tue, 14 Dec 2021 14:22:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48090) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mxDNC-0005R7-Bt for bug-gnu-emacs@gnu.org; Tue, 14 Dec 2021 14:22:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mxDNC-0005Ef-7v for bug-gnu-emacs@gnu.org; Tue, 14 Dec 2021 14:22: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: Tue, 14 Dec 2021 19:22: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.163950966820062 (code B ref 52459); Tue, 14 Dec 2021 19:22:02 +0000 Original-Received: (at 52459) by debbugs.gnu.org; 14 Dec 2021 19:21:08 +0000 Original-Received: from localhost ([127.0.0.1]:59636 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mxDMJ-0005DW-J9 for submit@debbugs.gnu.org; Tue, 14 Dec 2021 14:21:08 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:59900) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mxDME-0005Ce-DY for 52459@debbugs.gnu.org; Tue, 14 Dec 2021 14:21:05 -0500 Original-Received: from [2001:470:142:3::e] (port=51596 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 1mxDM8-0005H7-0T; Tue, 14 Dec 2021 14:20:56 -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=A7U05M3H5X9xDOMhiTsHezQANU4CygKFIBEkdGGh5dg=; b=cmFeMLnAnFtq ucmDGCQdZh7axGDul6aiwPpNepE8mLKs9ml/rshbOVS65wMIAr8i46XsLlI+1UidKmcKqQHcvtkR4 BsPTB3LF+hCk1K3jbAPUnlEpI5tFfEdEs1JoVJ74VEthqw9P62IR+VVIHGhuzvWvgzxEhRXDXsjdO TDGptaHNGB9sFnHARGGHgTIfsFYYQVq465Xn38qa70XUs5f830ucd7LeUiPN6Hf/O8mAC3Ed5egpm Xw9X6ntNOLvFrAThcjOalUPfTid7WsAgN2kjBr+/19l2hW/rAZ7e6ugZaBK+j3Tbz20iXwd+ghQaV U811IdPk0bn9q/jIg2CT+w==; Original-Received: from [87.69.77.57] (port=3404 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 1mxDM7-0004lW-Rj; Tue, 14 Dec 2021 14:20:56 -0500 In-Reply-To: (message from Dmitry Gutov on Tue, 14 Dec 2021 21:56:16 +0300) 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:222389 Archived-At: > Cc: mail@daniel-mendler.de, 52459@debbugs.gnu.org > From: Dmitry Gutov > Date: Tue, 14 Dec 2021 21:56:16 +0300 > > > 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. We agree. But that is not what is being requested by Daniel. > 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). The set of use cases that was described included more than just Helpful. It explicitly included displaying text not known in advance, such as in debugging UI, where one needs to display strings that come from the program being debugged. Hoever, you may be right that I have no good understanding of the use cases. I did try to understand them, but found it to be impossible, because every question I tried to ask, every concept of a solution I tried to propose was inevitably met with the equivalent of "why won't you give me my variable". I actually think that there are two distinct classes of use cases involved, but Daniel rejected that, insisting, AFAIU, that all the use cases are the same and need a single solution. Which I think is based on the wrong mental model of how the related stuff works in Emacs. So I'm sorry, but I cannot be of help in this discussion under those terms. That is not the way I'm used to approach a problem.