From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: bolega Newsgroups: gmane.emacs.help Subject: Re: How do I convert hex numbers to decimal ? Date: Sun, 6 Sep 2009 22:52:02 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <1bfadfca-66ba-4aec-bb90-eb3a460c660c@l13g2000yqb.googlegroups.com> 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: ger.gmane.org 1252305700 13803 80.91.229.12 (7 Sep 2009 06:41:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 7 Sep 2009 06:41:40 +0000 (UTC) Cc: gnuist006@gmail.com To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Sep 07 08:41:33 2009 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.50) id 1MkXus-0003bk-Sc for geh-help-gnu-emacs@m.gmane.org; Mon, 07 Sep 2009 08:41:31 +0200 Original-Received: from localhost ([127.0.0.1]:54252 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MkXus-0007db-B5 for geh-help-gnu-emacs@m.gmane.org; Mon, 07 Sep 2009 02:41:30 -0400 Original-Path: news.stanford.edu!usenet.stanford.edu!postnews.google.com!o9g2000yqj.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 72 Original-NNTP-Posting-Host: 75.28.153.73 Original-X-Trace: posting.google.com 1252302722 21187 127.0.0.1 (7 Sep 2009 05:52:02 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Mon, 7 Sep 2009 05:52:02 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: o9g2000yqj.googlegroups.com; posting-host=75.28.153.73; posting-account=REkl4woAAABFXaU7nL79XtGpnmNCQ415 User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30),gzip(gfe),gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:172786 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:67923 Archived-At: On Sep 6, 7:56=A0pm, Eli Zaretskii wrote: > > From: bolega > > Date: Sun, 6 Sep 2009 18:03:57 -0700 (PDT) > > Cc: gnuist...@gmail.com Thanks for your reply but my questions remain and I explain better this time. > > > 1) How do I convert hex numbers to decimal ? > > I presume you mean for external representation purposes, in which case > just use the %d format. =A0Otherwise, reading a hex number converts it > automatically, so you don't need to bother about the internal > representation. What I want is a function like this: (function "%1F) and I do C-x C-e and it executes and calculates the decimal value and returns or prints it. > > > 2) How do I convert ascii to the character that it represents, short > > of a table ? Any function or simpler algorithm ? > > Use the %d format again. what I want is a function like this: (function "%3F") and it converts it and returns or prints ? either an existing facility or combination thereof. > > 3) What are the variables > > Type "C-h v read-quoted-char-radix RET" etc. and you will be shown the > documentation of the variable. The documentation did not have an example of usage and contexts. I had used describe-variable before. > > and how to set their values ? > > "M-x set-variable RET read-quoted-char-radix RET RET" Can i use the following ? (set "read-quoted-char-radix" 16) or (setq "read-quoted-char-radix" 16) and which one and why ? > > 4) How do i find the emacs lisp code for C-x =3D to see how it gives th= e > > ascii of the char at the cursor and then use to find the reverse, ie > > ascii to char ? > > "C-k C-x =3D". Thanks. > Sounds like you should read the basic parts of the Emacs manual and > the Elisp manual, before you start coding in Lisp.