From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!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: Sun, 24 Apr 2022 15:46:55 -0700 Organization: UCLA Computer Science Department Message-ID: <038f65e7-2030-eb3d-cd3a-678a325b0ddb@cs.ucla.edu> 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> <83r2yt7lad.fsf@gnu.org> <2202b54b-606f-0a10-abf7-5cb1a9164897@cs.ucla.edu> <87k0bfsxvk.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3178"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Cc: Lars Ingebrigtsen , 27270@debbugs.gnu.org, npostavs@users.sourceforge.net To: Vasilij Schneidermann Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Apr 25 00:48:12 2022 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 1nil1Y-0000gy-B8 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 25 Apr 2022 00:48:12 +0200 Original-Received: from localhost ([::1]:54374 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nil1W-0004FA-Ug for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 24 Apr 2022 18:48:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54646) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nil1O-0004El-9L for bug-gnu-emacs@gnu.org; Sun, 24 Apr 2022 18:48:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38183) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nil1O-0007eY-0Q for bug-gnu-emacs@gnu.org; Sun, 24 Apr 2022 18:48:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nil1N-0006Dn-Tq for bug-gnu-emacs@gnu.org; Sun, 24 Apr 2022 18:48:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 24 Apr 2022 22:48:01 +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: moreinfo Original-Received: via spool by 27270-submit@debbugs.gnu.org id=B27270.165084042423702 (code B ref 27270); Sun, 24 Apr 2022 22:48:01 +0000 Original-Received: (at 27270) by debbugs.gnu.org; 24 Apr 2022 22:47:04 +0000 Original-Received: from localhost ([127.0.0.1]:60313 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nil0R-0006AE-TE for submit@debbugs.gnu.org; Sun, 24 Apr 2022 18:47:04 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:53070) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nil0Q-00069c-Kp for 27270@debbugs.gnu.org; Sun, 24 Apr 2022 18:47:02 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 1C2DC16009A; Sun, 24 Apr 2022 15:46:57 -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 JVM-WlatSGUg; Sun, 24 Apr 2022 15:46:56 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 4278F1600C5; Sun, 24 Apr 2022 15:46:56 -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 Ypb0M2B3Uzf6; Sun, 24 Apr 2022 15:46:56 -0700 (PDT) Original-Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com [172.91.119.151]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 0795816009A; Sun, 24 Apr 2022 15:46:56 -0700 (PDT) Content-Language: en-US In-Reply-To: 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:230596 Archived-At: On 4/24/22 02:56, Vasilij Schneidermann wrote: > Under which conditions exactly does the bug happen? I run into it with emacs -nw or equivalent, which I often use when I have a high-latency network connection so GUI Emacs is too slow. A few people even run Emacs from text consoles, with no graphics or windowing system at all, though I'm usually not that hard-core. > trying to work around terminals being bad doesn't > seem worth the extra effort. Please bear with us poor users who don't always use GUIs... > what exactly should the logic be here? > Detect if there's a preceding hex escaped byte and if yes, display > adjacent bytes that are formatted using hex characters using escaping, > too? Simpler than that. When hex-escaping a character, Emacs would look at the next character and if it's hexadecimal would print "\ " (or some similar escaping approach). This is a simple test and won't hurt printing performance much in the usual case.