From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alex Newsgroups: gmane.emacs.bugs Subject: bug#24812: 25.1; Missing (binary) radix format directive Date: Sat, 29 Oct 2016 13:34:02 -0600 Message-ID: <87h97v9cgl.fsf@gmail.com> References: <87zilpqexn.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1477769726 11185 195.159.176.226 (29 Oct 2016 19:35:26 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 29 Oct 2016 19:35:26 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) To: 24812@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 29 21:35:22 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c0ZPL-00012W-3Q for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 Oct 2016 21:35:11 +0200 Original-Received: from localhost ([::1]:55794 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c0ZPN-00076X-Jg for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 Oct 2016 15:35:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48909) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c0ZPF-00075U-9P for bug-gnu-emacs@gnu.org; Sat, 29 Oct 2016 15:35:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c0ZPC-0000OL-6o for bug-gnu-emacs@gnu.org; Sat, 29 Oct 2016 15:35:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:49656) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c0ZPC-0000O0-2x for bug-gnu-emacs@gnu.org; Sat, 29 Oct 2016 15:35:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1c0ZPB-0001cM-Mm for bug-gnu-emacs@gnu.org; Sat, 29 Oct 2016 15:35:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alex Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 29 Oct 2016 19:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24812 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24812-submit@debbugs.gnu.org id=B24812.14777696546158 (code B ref 24812); Sat, 29 Oct 2016 19:35:01 +0000 Original-Received: (at 24812) by debbugs.gnu.org; 29 Oct 2016 19:34:14 +0000 Original-Received: from localhost ([127.0.0.1]:36822 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c0ZOQ-0001bG-IA for submit@debbugs.gnu.org; Sat, 29 Oct 2016 15:34:14 -0400 Original-Received: from mail-it0-f45.google.com ([209.85.214.45]:36883) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c0ZOP-0001az-MT for 24812@debbugs.gnu.org; Sat, 29 Oct 2016 15:34:13 -0400 Original-Received: by mail-it0-f45.google.com with SMTP id u205so35931361itc.0 for <24812@debbugs.gnu.org>; Sat, 29 Oct 2016 12:34:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version; bh=59YMc0n0MbZiQWuFiEYsVjOC8sIyI5C8ispDqVi9m4M=; b=netsmoSDpb/zJ8uC8HSjNbgwE4Quhv45uKQ+uPVhTGVLJ+5ENbXhOtwTxtbXmcCym9 7+CehVLfgK9HV+29JKIGvaUcKzZkV+fpi0y7GwyaSwnqBrsQa3bHfCPvaaI7awOxsLJ9 5adZZOm3RpNjTPJN29ha7e9iMzqLA51OSXmaL1+i0RSdcI7v6lTljj2567geIPVbS7Sv FXJRj2djWZOd7FFFyVWK3kwp+pa97F4nwggm/CSjfJFGqwCQJda97l/WwwmW3yAPgPRF UKIFKVqkp2u9OMocxj5oloDuxFXdNvkZjQ+dPJCZI0JVY0lFA4bti/9guWS5htnbQpQV HtzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=59YMc0n0MbZiQWuFiEYsVjOC8sIyI5C8ispDqVi9m4M=; b=ia9lUb4tjqxIeBkM8ddVS3sD0e28r5Bl5GGosKo1Hnk1xtLFx7+MtcEnMd3Yv/904Q pg3nkuVDFNLGUbAIFTwhUZQT3ttXS8zKSFZfBphyWfyf7Zmr0nLA6Th/uEi0Pkx4VYcD VlbssE3bJ/6qiBapL6xA5n0kviCmUJvy6bPtgASQCZ1ca5Wb6BGiaZ3WSQyGnrchJ9dC JvB97SqamrC9dt9qX7OsFFAdei2IvMZMq3UqOAFAMQOJIqeHRScPQqp3v4YZ3rSUBCpt nOXsaK+kU3FSeqU+EhwcJlyWoIxynX1WD1WpYClx6UfqCaG9WgMRhMIhivsw1K4SJU91 +0ew== X-Gm-Message-State: ABUngveFQk28/c39HkpFZSMUB25TIE3mqXJXHeEgIeU91AEaKmuvY5iktfEyWa/vHwam/Q== X-Received: by 10.36.60.80 with SMTP id m77mr3702081ita.13.1477769647803; Sat, 29 Oct 2016 12:34:07 -0700 (PDT) Original-Received: from lylat (S01061859339e9903.ss.shawcable.net. [174.2.107.88]) by smtp.gmail.com with ESMTPSA id y130sm5489618itc.16.2016.10.29.12.34.07 for <24812@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 29 Oct 2016 12:34:07 -0700 (PDT) In-Reply-To: <87zilpqexn.fsf@gmail.com> (Alex's message of "Thu, 27 Oct 2016 22:24:04 -0600") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:125120 Archived-At: Alex writes: > Emacs' `format' has %o, %x, and %d, but it's missing both the ~r and ~b > radix directives from Common Lisp's `format'. > > I can understand leaving out ~r, but I think ~b is worth adding to > Emacs' `format'. > > CL example: > (format nil "~b" 5) => "101" > > Requested: > (format "%b" 5) => "101" I noticed that while string_to_number supports an arbitrary base, number_to_string doesn't. If number_to_string was symmetric in this aspect, then ~b and ~r should be straightforward to implement, right?