From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#27270: display-raw-bytes-as-hex generates ambiguous output for Emacs strings Date: Fri, 09 Jun 2017 09:00:26 +0300 Message-ID: <83r2yt7lad.fsf@gnu.org> References: <29d6844f-2f6f-11c1-7877-a9d169e613f8@cs.ucla.edu> <83tw3s8jhr.fsf@gnu.org> <1c05b888-0c4a-05c8-248a-6e550637fff4@cs.ucla.edu> <8737bbxp6a.fsf@users.sourceforge.net> <2d5a8cd8-0884-bc1e-4298-a84dca61acbf@cs.ucla.edu> <831squ8no8.fsf@gnu.org> <93d9c575-4eb2-ea9e-d998-a8f3cff33a1e@cs.ucla.edu> <83y3t271ar.fsf@gnu.org> <83shja6yoq.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1496988078 27616 195.159.176.226 (9 Jun 2017 06:01:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 9 Jun 2017 06:01:18 +0000 (UTC) Cc: 27270@debbugs.gnu.org, v.schneidermann@gmail.com, npostavs@users.sourceforge.net To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jun 09 08:01:12 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJCyt-0006oQ-3r for geb-bug-gnu-emacs@m.gmane.org; Fri, 09 Jun 2017 08:01:11 +0200 Original-Received: from localhost ([::1]:52836 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dJCyy-0006oS-Ie for geb-bug-gnu-emacs@m.gmane.org; Fri, 09 Jun 2017 02:01:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54363) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dJCyo-0006lh-RX for bug-gnu-emacs@gnu.org; Fri, 09 Jun 2017 02:01:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dJCyk-0002BL-LG for bug-gnu-emacs@gnu.org; Fri, 09 Jun 2017 02:01:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:33066) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dJCyk-0002BB-FD for bug-gnu-emacs@gnu.org; Fri, 09 Jun 2017 02:01:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dJCyk-0007xz-3o for bug-gnu-emacs@gnu.org; Fri, 09 Jun 2017 02:01:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 09 Jun 2017 06:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27270 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 27270-submit@debbugs.gnu.org id=B27270.149698804430593 (code B ref 27270); Fri, 09 Jun 2017 06:01:02 +0000 Original-Received: (at 27270) by debbugs.gnu.org; 9 Jun 2017 06:00:44 +0000 Original-Received: from localhost ([127.0.0.1]:35743 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJCyS-0007xN-Bd for submit@debbugs.gnu.org; Fri, 09 Jun 2017 02:00:44 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:35096) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJCyR-0007xB-66 for 27270@debbugs.gnu.org; Fri, 09 Jun 2017 02:00:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dJCyK-00021o-Ry for 27270@debbugs.gnu.org; Fri, 09 Jun 2017 02:00:37 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:34616) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dJCyC-0001vz-B6; Fri, 09 Jun 2017 02:00:28 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1824 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dJCyB-00022H-8t; Fri, 09 Jun 2017 02:00:27 -0400 In-reply-to: (message from Paul Eggert on Thu, 8 Jun 2017 13:35:45 -0700) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:133416 Archived-At: > Cc: npostavs@users.sourceforge.net, 27270@debbugs.gnu.org, > v.schneidermann@gmail.com > From: Paul Eggert > Date: Thu, 8 Jun 2017 13:35:45 -0700 > > On 06/08/2017 12:56 PM, Eli Zaretskii wrote: > > How do you know "\2205" is a two character string > > Because I use Emacs out of the box, with the default printable-chars. That's just sheer luck, then, not a general solution that works for everybody. And it's not unimaginable that we will mark more codepoints printable at some point, given some development in the Unicode standard or in Emacs. > >> The difference is that I don't use display tables and don't want to use > >> them. In contrast, I would like to use hexadecimal display, if it worked > >> as well as octal does (which it does not). > > Then we need to code a separate feature in the Lisp reader, I think. > > What do you think of using capital X for hexadecimal escapes with at > most two digits? That way, "\X905" would be a two-character string, > which is what is wanted here. Or we could use small h for hexadecimal, > and "\h905". I'm okay, but I'm not sure I understand how does this fix your problem. Can you explain? > If we were feeling ambitous and concise, we could use no character at > all and upper-case hex digits for bytes in the range 0x80 through 0xFF; > this would be unambiguous in strings (the example would be "\905"). This > may be a bridge too far, though. Too far, I agree.