From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#27270: display-raw-bytes-as-hex generates ambiguous output for Emacs strings Date: Wed, 7 Jun 2017 17:49:41 -0700 Organization: UCLA Computer Science Department Message-ID: <1c05b888-0c4a-05c8-248a-6e550637fff4@cs.ucla.edu> References: <29d6844f-2f6f-11c1-7877-a9d169e613f8@cs.ucla.edu> <83tw3s8jhr.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1496883013 18900 195.159.176.226 (8 Jun 2017 00:50:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 8 Jun 2017 00:50:13 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 Cc: 27270@debbugs.gnu.org, v.schneidermann@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jun 08 02:50:09 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 1dIleK-0004hJ-VZ for geb-bug-gnu-emacs@m.gmane.org; Thu, 08 Jun 2017 02:50:09 +0200 Original-Received: from localhost ([::1]:46757 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dIleQ-00052r-B7 for geb-bug-gnu-emacs@m.gmane.org; Wed, 07 Jun 2017 20:50:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56274) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dIleI-000513-B8 for bug-gnu-emacs@gnu.org; Wed, 07 Jun 2017 20:50:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dIleF-0007sD-B8 for bug-gnu-emacs@gnu.org; Wed, 07 Jun 2017 20:50:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59409) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dIleF-0007rw-7a for bug-gnu-emacs@gnu.org; Wed, 07 Jun 2017 20:50:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dIleF-0001cI-0Y for bug-gnu-emacs@gnu.org; Wed, 07 Jun 2017 20:50:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 08 Jun 2017 00:50: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.14968829906183 (code B ref 27270); Thu, 08 Jun 2017 00:50:02 +0000 Original-Received: (at 27270) by debbugs.gnu.org; 8 Jun 2017 00:49:50 +0000 Original-Received: from localhost ([127.0.0.1]:33852 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dIle2-0001bf-DU for submit@debbugs.gnu.org; Wed, 07 Jun 2017 20:49:50 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:45460) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dIle1-0001bP-DD for 27270@debbugs.gnu.org; Wed, 07 Jun 2017 20:49:49 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 7C6C51600A1; Wed, 7 Jun 2017 17:49:42 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id TdMY0ALQDtNy; Wed, 7 Jun 2017 17:49:41 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id BD9201600A6; Wed, 7 Jun 2017 17:49:41 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Ja5WHfx6EsKY; Wed, 7 Jun 2017 17:49:41 -0700 (PDT) Original-Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 6C48E1600A1; Wed, 7 Jun 2017 17:49:41 -0700 (PDT) In-Reply-To: <83tw3s8jhr.fsf@gnu.org> Content-Language: en-US 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:133389 Archived-At: On 06/06/2017 10:17 PM, Eli Zaretskii wrote: > What do you mean by "Emacs strings"? I meant that if I prefer hex to octal for buffer escapes, then when I type this into *scratch*: (format "J%cK" ?\u0080) C-j I almost surely would prefer to see the result displayed as hexadecimal than as "J\200K" (the current behavior). People who prefer hex in one place are quite likely to prefer it in the other. Here's another suggestion for the buffer problem: separate problematic character pairs by "\ " in the buffer display. That way, my test case would be displayed this way in a buffer; x\x90\ 5y and this will work as expected when cut and pasted into a string, due to the backslash-space syntax already supported for strings. This buffer syntax would be less confusing than the "x\x905y" syntax that is currently used. Under this approach character pair XY is considered to be problematic if X is displayed with a hexadecimal escape and Y is a hexadecimal digit.