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#27122: 26.0.50; [PATCH] Add customizable to display unprintables as hex Date: Tue, 30 May 2017 09:24:49 +0300 Message-ID: <83tw42eua6.fsf@gnu.org> References: <20170528204250.wjbrm2pul6cf6xam@odonien.localdomain> <83o9ucfl37.fsf@gnu.org> <20170529062859.mwoveygr5oh5iphz@odonien.localdomain> <8360gjfo51.fsf@gnu.org> <20170529201558.yogm76php5fbpz35@odonien.localdomain> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1496125516 1303 195.159.176.226 (30 May 2017 06:25:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 30 May 2017 06:25:16 +0000 (UTC) Cc: 27122@debbugs.gnu.org To: Vasilij Schneidermann Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue May 30 08:25: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 1dFaaa-000059-04 for geb-bug-gnu-emacs@m.gmane.org; Tue, 30 May 2017 08:25:08 +0200 Original-Received: from localhost ([::1]:51704 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dFaaf-00014N-Dp for geb-bug-gnu-emacs@m.gmane.org; Tue, 30 May 2017 02:25:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54259) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dFaaX-000145-Cx for bug-gnu-emacs@gnu.org; Tue, 30 May 2017 02:25:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dFaaU-0002TO-AH for bug-gnu-emacs@gnu.org; Tue, 30 May 2017 02:25:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:41402) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dFaaU-0002TK-71 for bug-gnu-emacs@gnu.org; Tue, 30 May 2017 02:25:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dFaaT-0007V3-Nd for bug-gnu-emacs@gnu.org; Tue, 30 May 2017 02:25: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: Tue, 30 May 2017 06:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27122 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 27122-submit@debbugs.gnu.org id=B27122.149612549328811 (code B ref 27122); Tue, 30 May 2017 06:25:01 +0000 Original-Received: (at 27122) by debbugs.gnu.org; 30 May 2017 06:24:53 +0000 Original-Received: from localhost ([127.0.0.1]:44079 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFaaK-0007Ud-Ut for submit@debbugs.gnu.org; Tue, 30 May 2017 02:24:53 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:34992) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFaaJ-0007UP-5F for 27122@debbugs.gnu.org; Tue, 30 May 2017 02:24:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dFaaA-0002JO-Vh for 27122@debbugs.gnu.org; Tue, 30 May 2017 02:24:46 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43561) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dFaaA-0002JF-SV; Tue, 30 May 2017 02:24:42 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1739 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dFaaA-0005PO-6b; Tue, 30 May 2017 02:24:42 -0400 In-reply-to: <20170529201558.yogm76php5fbpz35@odonien.localdomain> (message from Vasilij Schneidermann on Mon, 29 May 2017 22:15:58 +0200) 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:133041 Archived-At: > Date: Mon, 29 May 2017 22:15:58 +0200 > From: Vasilij Schneidermann > Cc: 27122@debbugs.gnu.org > > > Does "C-x =" or "C-u C-x =" fit the bill in this case? If the former > > doesn't, how about adding the hex byte translation to what it shows? > > This is the crutch I'm currently using. It isn't practical for more > than a few characters. If I considered it sufficient, I wouldn't be > handing in a patch. Well, you didn't mention this at all, so I couldn't know. OK, please submit the patch with the necessary documentation, and please add a test for the original and the new behavior. Also, I think the option should be called display-raw-bytes-as-hex, since "unprintables", though more accurate, is IMO too technical for most users, and the default behavior limits this display to raw bytes. Finally, I think it would be good to make this option a defcustom, so please add the necessary glue to cus-start.el. Btw, is \xNN what people are used to in this kind of display? Emacs generally uses #xNN elsewhere, but if \xNN is more familiar, I don't mind. Thanks. P.S. A minor nit: we use tabs and spaces to indent C code, not just spaces.