GNU bug report logs - #24812
25.1; Missing (binary) radix format directive

Previous Next

Package: emacs;

Reported by: Alex <agrambot <at> gmail.com>

Date: Fri, 28 Oct 2016 04:25:01 UTC

Severity: wishlist

Found in version 25.1

Full log


Message #8 received at 24812 <at> debbugs.gnu.org (full text, mbox):

From: Alex <agrambot <at> gmail.com>
To: 24812 <at> debbugs.gnu.org
Subject: Re: 25.1; Missing (binary) radix format directive
Date: Sat, 29 Oct 2016 13:34:02 -0600
Alex <agrambot <at> gmail.com> 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?




This bug report was last modified 8 years and 286 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.