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

To reply to this bug, email your comments to 24812 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#24812; Package emacs. (Fri, 28 Oct 2016 04:25:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Alex <agrambot <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 28 Oct 2016 04:25:02 GMT) Full text and rfc822 format available.

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

From: Alex <agrambot <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.1; Missing (binary) radix format directive
Date: Thu, 27 Oct 2016 22:24:04 -0600
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"




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24812; Package emacs. (Sat, 29 Oct 2016 19:35:01 GMT) Full text and rfc822 format available.

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 285 days ago.

Previous Next


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