From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mirko Newsgroups: gmane.emacs.help Subject: converting numbers to strings in arbitrary base (up to 36) Date: Tue, 15 Mar 2011 11:42:37 -0700 (PDT) Organization: http://groups.google.com Message-ID: <56262053-76f2-494e-b7ed-63a9105229ee@glegroupsg2000goo.googlegroups.com> Reply-To: gnu.emacs.help@googlegroups.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1300221376 21246 80.91.229.12 (15 Mar 2011 20:36:16 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 15 Mar 2011 20:36:16 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Mar 15 21:36:12 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 1PzayP-0008HU-Mg for geh-help-gnu-emacs@m.gmane.org; Tue, 15 Mar 2011 21:36:09 +0100 Original-Received: from localhost ([127.0.0.1]:38517 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PzayP-0005el-6B for geh-help-gnu-emacs@m.gmane.org; Tue, 15 Mar 2011 16:36:09 -0400 Original-Path: usenet.stanford.edu!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 22 Original-NNTP-Posting-Host: 208.218.238.20 Original-X-Trace: posting.google.com 1300214558 10563 127.0.0.1 (15 Mar 2011 18:42:38 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Tue, 15 Mar 2011 18:42:38 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=208.218.238.20; posting-account=yS7ZzQoAAACbDncxMo9UeCyhsLtcDWPM User-Agent: G2/1.0 Original-Xref: usenet.stanford.edu gnu.emacs.help:186000 X-Mailman-Approved-At: Tue, 15 Mar 2011 16:34:22 -0400 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:80149 Archived-At: Hi, This is an elisp question: I can specify integers in base 2-36 using #xyr..., and I can read them from a file. But is there a way to write an integer in arbitrary base (again, 2-36) to a file? I looked at string-to-number, format, and calc In greater detail, I have a file where I want to keep a counter (in base 36). When needed, I want to open the file, read the number. Occasionally, I want to increment the number, and write it back out. I can handle reading and writing :-). It is writing the base 36 that I don't know how to handle. Thank you, Mirko