From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Deniz Dogan Newsgroups: gmane.emacs.help Subject: Re: How switch from escaped octal character code to escaped HEX? Date: Mon, 3 Jan 2011 08:14:19 +0100 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1294038925 14805 80.91.229.12 (3 Jan 2011 07:15:25 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 3 Jan 2011 07:15:25 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Stefan Monnier Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jan 03 08:15:21 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 1PZedV-0003e2-3K for geh-help-gnu-emacs@m.gmane.org; Mon, 03 Jan 2011 08:15:21 +0100 Original-Received: from localhost ([127.0.0.1]:40798 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PZedU-0003K5-6u for geh-help-gnu-emacs@m.gmane.org; Mon, 03 Jan 2011 02:15:20 -0500 Original-Received: from [140.186.70.92] (port=42467 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PZed2-0003Jz-Pj for help-gnu-emacs@gnu.org; Mon, 03 Jan 2011 02:14:53 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PZed1-0005QB-4R for help-gnu-emacs@gnu.org; Mon, 03 Jan 2011 02:14:52 -0500 Original-Received: from mail-iy0-f169.google.com ([209.85.210.169]:58524) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PZed1-0005Q7-1c for help-gnu-emacs@gnu.org; Mon, 03 Jan 2011 02:14:51 -0500 Original-Received: by iyj17 with SMTP id 17so13461450iyj.0 for ; Sun, 02 Jan 2011 23:14:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=aZSrvMH/CAm7Y/2dThSfAUyR0DufNCZ9NT6pegQhM4A=; b=IUxrFwrB3BURLOekKc0EPcGibWZTNJy+iLtjlgb7pUgdzW58UlJhaDmoBnux755n7M JyIkbKnjamKs1twP41pYMWbi1jNs24Gr9INbjKCfyby6uvtGm/F+YCiW+1foitX2+8TN gntuVBQKAOj+HlIO3duCb53vjkoALZMMNM1+M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=S/JtHwoyXgSp/4o0wxX4vm69UjdOpim9kHk0d0zFGdIN2jvFaCT0vwdNzGx3Q59ISc mX7RbsiDyfWdokP5juxCyUL6yCv6LHpcyY+0HrOWAK6XJsqCJ1+Gmjh+DXEn/J95Oxeu ud8WTFKwyxh2tj6CsrQRzEE3+gIZ6sJiqVGUY= Original-Received: by 10.231.10.141 with SMTP id p13mr20177700ibp.131.1294038889957; Sun, 02 Jan 2011 23:14:49 -0800 (PST) Original-Received: by 10.231.39.132 with HTTP; Sun, 2 Jan 2011 23:14:19 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:78094 Archived-At: 2011/1/3 Stefan Monnier : >>> 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. > > =A0 (setq standard-display-table (make-display-table)) > =A0 (aset standard-display-table (unibyte-char-to-multibyte 131) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0[?\\ ?x ?8= ?3]) > =A0 (aset standard-display-table (unibyte-char-to-multibyte 132) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0[?\\ ?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. --=20 Deniz Dogan