From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: How switch from escaped octal character code to escaped HEX? Date: Sun, 02 Jan 2011 23:23:38 -0500 Organization: A noiseless patient Spider Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1294029666 19871 80.91.229.12 (3 Jan 2011 04:41:06 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 3 Jan 2011 04:41:06 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jan 03 05:41:03 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PZcE9-0007q0-Oc for geh-help-gnu-emacs@m.gmane.org; Mon, 03 Jan 2011 05:41:01 +0100 Original-Received: from localhost ([127.0.0.1]:54149 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PZcE9-0005JX-6J for geh-help-gnu-emacs@m.gmane.org; Sun, 02 Jan 2011 23:41:01 -0500 Original-Path: usenet.stanford.edu!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 23 Injection-Info: mx02.eternal-september.org; posting-host="7TKp2luQmWSGnmAmeWd+Kg"; logging-data="31792"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/l7n+P4OVQPaKBOeL3/LfS" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:RGmroDX2PQqBCPIWSsGWOK459kA= sha1:oZ9YKeajHpiiy2yHrjKLIi1EOpM= Original-Xref: usenet.stanford.edu gnu.emacs.help:183878 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:78084 Archived-At: >> When Emacs find that byte that does >> not correspond to any specific displayable character it display >> octal codes instead, like: \276 (and with different color). >> >> This is useful, but I prefer HEX base instead octal. There is no direct/easy way to do it. But you can do it by adding the corresponding 128 entries to the standard-display-table. E.g. (setq standard-display-table (make-display-table)) (aset standard-display-table (unibyte-char-to-multibyte 131) [?\\ ?x ?8 ?3]) (aset standard-display-table (unibyte-char-to-multibyte 132) [?\\ ?x ?8 ?4]) Should make the bytes 131 and 132 be displayed as \x83 and \x84 rather than \203 and \204. Stefan