From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Vasilij Schneidermann Newsgroups: gmane.emacs.bugs Subject: bug#27122: 26.0.50; [PATCH] Add customizable to display unprintables as hex Date: Mon, 29 May 2017 08:28:59 +0200 Message-ID: <20170529062859.mwoveygr5oh5iphz@odonien.localdomain> References: <20170528204250.wjbrm2pul6cf6xam@odonien.localdomain> <83o9ucfl37.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-Trace: blaine.gmane.org 1496039410 19871 195.159.176.226 (29 May 2017 06:30:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 29 May 2017 06:30:10 +0000 (UTC) User-Agent: NeoMutt/20170428-45-01e908 (1.8.2) Cc: 27122@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon May 29 08:30:06 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 1dFEBp-00051o-Ii for geb-bug-gnu-emacs@m.gmane.org; Mon, 29 May 2017 08:30:05 +0200 Original-Received: from localhost ([::1]:47099 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dFEBv-0003iJ-4T for geb-bug-gnu-emacs@m.gmane.org; Mon, 29 May 2017 02:30:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59051) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dFEBp-0003h7-Si for bug-gnu-emacs@gnu.org; Mon, 29 May 2017 02:30:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dFEBm-0004c6-QW for bug-gnu-emacs@gnu.org; Mon, 29 May 2017 02:30:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:39746) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dFEBm-0004bx-LE for bug-gnu-emacs@gnu.org; Mon, 29 May 2017 02:30:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dFEBm-0003Rp-Bu for bug-gnu-emacs@gnu.org; Mon, 29 May 2017 02:30:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Vasilij Schneidermann Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 29 May 2017 06:30:02 +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.149603934913162 (code B ref 27122); Mon, 29 May 2017 06:30:02 +0000 Original-Received: (at 27122) by debbugs.gnu.org; 29 May 2017 06:29:09 +0000 Original-Received: from localhost ([127.0.0.1]:42423 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFEAu-0003QD-Su for submit@debbugs.gnu.org; Mon, 29 May 2017 02:29:09 -0400 Original-Received: from mail-wm0-f67.google.com ([74.125.82.67]:36289) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFEAt-0003Ps-JC for 27122@debbugs.gnu.org; Mon, 29 May 2017 02:29:07 -0400 Original-Received: by mail-wm0-f67.google.com with SMTP id k15so15104614wmh.3 for <27122@debbugs.gnu.org>; Sun, 28 May 2017 23:29:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=JBFWwncLLpADW6WLvStBwy54jLGt8ABO9NGVSAUMprg=; b=LF9ukQOIha9MHeYAn6ScNVvFexlWcBq5xjTJlZOj2hAi3PRWjqeq4Yr7LzARTNi9+P 7cyzTF+ftJhlCaxbWFgs8/266qy7aI8Utoz3CgBT4qa6sr163eBFqa8z3aohPmWHDNUu 883Yqtks3pkkjjCgUwNo2WlByc2tFA/xppMhZkT/T/T9LPbykUBsAZ8n5nkM0tKpFldR o7O8yogQweGZNIbF7QreWdQ60huBYAXUPV88AOJB55RhpKCSyIVKXQ3rEhPLUrXve+FN Dt6mLrFNo3nMffHE9jyYa27w1h4wX4hHn8SCXnoV7UB0q0bO7NFpLc0KxVA1yjKnbuiK iNNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=JBFWwncLLpADW6WLvStBwy54jLGt8ABO9NGVSAUMprg=; b=t6lewXp2kTYWHCc1TrPU2zk3RqZAHlFxhjSSCaX97Ma6kIPCyrGp2N5uIpHh/zi1Q3 jdMPfLplelHAm72WBMF+LW+y8tj3OV4JPlQYfhTastPzuy2fO5ERmUlnompoiiTuSNoi WDtm/ugmAg5FZZZrEU1Zdw5Iimsva8B/KLJxocKs0RMmgl40E9nbqa8vZgYkFGXYOT81 wlJ94u5nvJ998EI5RBYke1RZHyQuVZCFU+rATZaJCpKHM3uayiAvP9RiRqLgWYrOrFcI OWOndbggwUu3xX4Yh+MOpipIL3w3DWazl4XoSnEVQqOoL4ZSZkLbs7MQXRavqAVnavDv qwJA== X-Gm-Message-State: AODbwcAPK2LzX18vr2y476sEQtGM2lgBRQzkwMKTtl7Q0GF1Ih9mUL+4 QUCav5GdINIfPg== X-Received: by 10.223.166.129 with SMTP id t1mr10940085wrc.116.1496039341528; Sun, 28 May 2017 23:29:01 -0700 (PDT) Original-Received: from localhost (dslb-088-076-027-064.088.076.pools.vodafone-ip.de. [88.76.27.64]) by smtp.gmail.com with ESMTPSA id m141sm1472091wma.7.2017.05.28.23.29.00 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 28 May 2017 23:29:00 -0700 (PDT) Content-Disposition: inline In-Reply-To: <83o9ucfl37.fsf@gnu.org> 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:132981 Archived-At: > Please describe the use case where this happens. 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? > 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. This allows for the same effect, but is problematic as there are other modes manipulating it, such as whitespace-mode. You'd therefore need to manipulate `standard-display-table' and `buffer-display-table' with an appropriate hook to cover all cases. I consider the patch to be a cleaner solution.