unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#24812: 25.1; Missing (binary) radix format directive
@ 2016-10-28  4:24 Alex
  2016-10-29 19:34 ` Alex
  0 siblings, 1 reply; 2+ messages in thread
From: Alex @ 2016-10-28  4:24 UTC (permalink / raw)
  To: 24812

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"





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#24812: 25.1; Missing (binary) radix format directive
  2016-10-28  4:24 bug#24812: 25.1; Missing (binary) radix format directive Alex
@ 2016-10-29 19:34 ` Alex
  0 siblings, 0 replies; 2+ messages in thread
From: Alex @ 2016-10-29 19:34 UTC (permalink / raw)
  To: 24812

Alex <agrambot@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?





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-10-29 19:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-28  4:24 bug#24812: 25.1; Missing (binary) radix format directive Alex
2016-10-29 19:34 ` Alex

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).