From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Wang Lei Newsgroups: gmane.emacs.help Subject: Re: How do I convert hex numbers to decimal ? Date: Mon, 7 Sep 2009 22:44:33 +0800 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=UTF-8 X-Trace: ger.gmane.org 1252345198 11108 80.91.229.12 (7 Sep 2009 17:39:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 7 Sep 2009 17:39:58 +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 Sep 07 16:46:34 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 1MkfUH-0005co-5Q for geh-help-gnu-emacs@m.gmane.org; Mon, 07 Sep 2009 16:46:33 +0200 Original-Received: from localhost ([127.0.0.1]:60720 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MkfUG-00077J-Bf for geh-help-gnu-emacs@m.gmane.org; Mon, 07 Sep 2009 10:46:32 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MkfST-0006WF-QF for help-gnu-emacs@gnu.org; Mon, 07 Sep 2009 10:44:41 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MkfSO-0006Tu-Bu for help-gnu-emacs@gnu.org; Mon, 07 Sep 2009 10:44:40 -0400 Original-Received: from [199.232.76.173] (port=45518 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MkfSN-0006Tn-Tm for help-gnu-emacs@gnu.org; Mon, 07 Sep 2009 10:44:35 -0400 Original-Received: from mail-vw0-f178.google.com ([209.85.212.178]:46930) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MkfSN-0001Z8-GB for help-gnu-emacs@gnu.org; Mon, 07 Sep 2009 10:44:35 -0400 Original-Received: by vws8 with SMTP id 8so1815861vws.14 for ; Mon, 07 Sep 2009 07:44:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=vdfa45VN7dTlSVSJZdqEZdwcPb7XfRCMwNCWCEt2/7U=; b=r1IZs8tuofz4OOCIjYz08Q89H/X/0XWDCiGMa65AxLxC78+9sftWpfujjXjY4wm/ZY OsUtCjNRE6hIQ6HucweO3M/xErRtGV06bbPPOpFcTsSIBXH9BAP+DeQx1VY6xRuoHkMr 6kGLkxiQgU28eKH7Iy3gGZMuQv+SZ+R1sLYOo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=C0w+8I98JnCywEC1P6A91qEaDufhM8WgQsIzG/TiREd1U5mRGAVEqoKll0XHOkk+aF srYEmvmV7TkUp4te2a33dc1TMDofGVco5b+5icxnAhfRIug9/zQ9+2kwYAUGmLpdhiBn sH3qXrDwPTk22/QUO2SkxcdURDbKjxEtI5xgg= Original-Received: by 10.220.69.69 with SMTP id y5mr20175894vci.118.1252334673617; Mon, 07 Sep 2009 07:44:33 -0700 (PDT) In-Reply-To: X-detected-operating-system: by monty-python.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:67937 You could have a look at format function. On 9/7/09, Janis Papanagnou wrote: > bolega wrote: >> I have a bunch of related questions, but the solution is desired in >> emacs lisp and to work inside emacs only. > > So why post to comp.unix.shell then? > > (Using printf is a shell way of doing what you want.) > >> >> 1) How do I convert hex numbers to decimal ? >> 2) How do I convert ascii to the character that it represents, short >> of a table ? Any function or simpler algorithm ? >> 3) What are the variables and how to set their values ? >> >> read-quoted-char-radix >> quoted-char-radix >> >> 4) How do i find the emacs lisp code for C-x = to see how it gives the >> ascii of the char at the cursor and then use to find the reverse, ie >> ascii to char ? >> >> Thanks a lot to the star who can explain. > -- Regards Lei