help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How switch from escaped octal character code to escaped HEX?


From: Deniz Dogan
Subject: Re: How switch from escaped octal character code to escaped HEX?
Date: Mon, 3 Jan 2011 08:14:19 +0100

2011/1/3 Stefan Monnier <monnier@iro.umontreal.ca>:
>>> 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.
>
>

What is the reasoning behind displaying it in octal rather than
decimal or hexadecimal in the first place? I didn't know people cared
about octals anymore.

-- 
Deniz Dogan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]