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: Mon, 29 May 2017 22:39:54 +0300 Message-ID: <8360gjfo51.fsf@gnu.org> References: <20170528204250.wjbrm2pul6cf6xam@odonien.localdomain> <83o9ucfl37.fsf@gnu.org> <20170529062859.mwoveygr5oh5iphz@odonien.localdomain> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1496087615 15015 195.159.176.226 (29 May 2017 19:53:35 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 29 May 2017 19:53:35 +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 Mon May 29 21:53:31 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 1dFQjK-0003lN-Hh for geb-bug-gnu-emacs@m.gmane.org; Mon, 29 May 2017 21:53:30 +0200 Original-Received: from localhost ([::1]:50312 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dFQjP-00054X-Uu for geb-bug-gnu-emacs@m.gmane.org; Mon, 29 May 2017 15:53:36 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42789) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dFQXJ-0003I6-QK for bug-gnu-emacs@gnu.org; Mon, 29 May 2017 15:41:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dFQXG-0003A8-4M for bug-gnu-emacs@gnu.org; Mon, 29 May 2017 15:41:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:41105) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dFQXF-0003A1-RX for bug-gnu-emacs@gnu.org; Mon, 29 May 2017 15:41:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dFQXF-0003xj-Lp for bug-gnu-emacs@gnu.org; Mon, 29 May 2017 15:41:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 29 May 2017 19:41: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.149608680315147 (code B ref 27122); Mon, 29 May 2017 19:41:01 +0000 Original-Received: (at 27122) by debbugs.gnu.org; 29 May 2017 19:40:03 +0000 Original-Received: from localhost ([127.0.0.1]:43781 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFQWI-0003wB-OD for submit@debbugs.gnu.org; Mon, 29 May 2017 15:40:03 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:51658) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFQWG-0003vi-PV for 27122@debbugs.gnu.org; Mon, 29 May 2017 15:40:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dFQW8-0002wk-IS for 27122@debbugs.gnu.org; Mon, 29 May 2017 15:39:55 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37590) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dFQW8-0002wg-Ej; Mon, 29 May 2017 15:39:52 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1054 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dFQW7-0003s9-Cn; Mon, 29 May 2017 15:39:52 -0400 In-reply-to: <20170529062859.mwoveygr5oh5iphz@odonien.localdomain> (message from Vasilij Schneidermann on Mon, 29 May 2017 08:28:59 +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:133004 Archived-At: > Date: Mon, 29 May 2017 08:28:59 +0200 > From: Vasilij Schneidermann > Cc: 27122@debbugs.gnu.org > > OK, I'll go into a bit more detail on my envisioned use case. Suppose > you open a buffer just to discover that some of the bytes aren't decoded > properly. The culprits are \344, \366 and \374. You suspect it's > latin-1, so you open a Wikipedia page on it and find a table of its > character mapping, however it's using hexadecimal instead of octal > formatting. Generally it seems that the world has moved on and prefers > hexadecimal over octal formatting, except for `chmod` and Emacs. You > sigh and convert the octal to hexadecimal. Your hunch about this being > a latin-1 issue turns out to be true. Why can't Emacs make this easier? 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? IOW, what if instead of Char: \344 (4194276, #o17777744, #x3fffe4, raw-byte) point=... "C-x =" would display this: Char: \344, #xe4 (4194276, #o17777744, #x3fffe4, raw-byte) point=... > > We already have quite a few related features, and I wonder whether > > you could simply use one of them. > > The only one I'm aware of you could use instead is to manipulate the > display table. We also have the glyphless-char-display-control (and the underlying char-table), although it will not help in your case. Which is why I asked for more details. Also, some characters, hard-coded in the display engine, are handled specially. E.g., try "C-x 8 RET a0 RET" or "C-x 8 RET 2011 RET".