From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Romain FRANCOISE Newsgroups: gmane.emacs.help Subject: Re: how to show ascii number of a character Date: Sun, 12 Jan 2003 20:19:50 +0100 Organization: orebokech dot com Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <87of6mmazt.fsf@orebokech.com> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1042399504 17617 80.91.224.249 (12 Jan 2003 19:25:04 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 12 Jan 2003 19:25:04 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18XnjB-0004Za-00 for ; Sun, 12 Jan 2003 20:25:01 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18XnjZ-0001A4-01 for gnu-help-gnu-emacs@m.gmane.org; Sun, 12 Jan 2003 14:25:25 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!opentransit.net!fr.clara.net!heighliner.fr.clara.net!lirmm.fr!cines.fr!univ-lyon1.fr!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 22 Original-NNTP-Posting-Host: j446-b.resj.insa-lyon.fr Original-X-Trace: demo2.univ-lyon1.fr 1042399219 14173 134.214.166.176 (12 Jan 2003 19:20:19 GMT) Original-X-Complaints-To: abuse@univ-lyon1.fr Original-NNTP-Posting-Date: 12 Jan 2003 19:20:19 GMT Mail-Copies-To: nobody User-Agent: Gnus/5.090012 (Oort Gnus v0.12) Emacs/21.3.50 (i686-pc-linux-gnu) Cancel-Lock: sha1:vBcEzALC7rifTXYmuALqSFzF83o= Original-Xref: shelby.stanford.edu gnu.emacs.help:108874 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:5403 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:5403 Zimmen Gnauh writes: > Is there any emacs function that can show a the ascii number of a > character? i.e. you enter a character, and it shows a number. For > example, enter character D, it will show 68, or in octal, binary or > other forms. Add this to your ~/.emacs: (defun zg-char-to-ascii () "Show the ASCII number of a character." (interactive) (message (number-to-string (aref (read-from-minibuffer "Type a character: ") 0)))) ... and do M-x zg-char-to-ascii. Cheers, -- Romain FRANCOISE | I know, you love the song but it's a miracle -- http://orebokech.com/ | not the singer.