From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Leake Newsgroups: gmane.emacs.devel Subject: Re: C-x C-e on numbers Date: Thu, 04 Dec 2014 10:47:14 -0600 Message-ID: <85oarjnyzx.fsf@stephe-leake.org> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1417711658 16426 80.91.229.3 (4 Dec 2014 16:47:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 4 Dec 2014 16:47:38 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 04 17:47:31 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XwZYx-0004zT-Lx for ged-emacs-devel@m.gmane.org; Thu, 04 Dec 2014 17:47:31 +0100 Original-Received: from localhost ([::1]:46632 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XwZYx-00063G-BM for ged-emacs-devel@m.gmane.org; Thu, 04 Dec 2014 11:47:31 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39064) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XwZYp-00062I-Fn for emacs-devel@gnu.org; Thu, 04 Dec 2014 11:47:29 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XwZYj-00005u-KD for emacs-devel@gnu.org; Thu, 04 Dec 2014 11:47:23 -0500 Original-Received: from dnvrco-outbound-snat.email.rr.com ([107.14.73.232]:36274 helo=dnvrco-oedge-vip.email.rr.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XwZYj-00005o-FJ for emacs-devel@gnu.org; Thu, 04 Dec 2014 11:47:17 -0500 Original-Received: from [70.94.38.149] ([70.94.38.149:49792] helo=TAKVER) by dnvrco-oedge01 (envelope-from ) (ecelerity 3.5.0.35861 r(Momo-dev:tip)) with ESMTP id 8D/85-08610-41090845; Thu, 04 Dec 2014 16:47:16 +0000 In-Reply-To: (Alfred M. Szmidt's message of "Thu, 04 Dec 2014 10:56:10 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.94 (windows-nt) X-RR-Connecting-IP: 107.14.64.118:25 X-Authority-Analysis: v=2.1 cv=F7jZd8RN c=1 sm=1 tr=0 a=AppmJ/7ZOOFWL/q6u6u93g==:117 a=AppmJ/7ZOOFWL/q6u6u93g==:17 a=ayC55rCoAAAA:8 a=fNEgcOh0sVsA:10 a=9i_RQKNPAAAA:8 a=mDV3o1hIAAAA:8 a=PfZM-76qgt8SKqTKnF4A:9 a=HGsqIyeMnvKqnKnB:21 a=6rzYiP9CytYoCWnr:21 X-Cloudmark-Score: 0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 107.14.73.232 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:178836 Archived-At: ams@gnu.org (Alfred M. Szmidt) writes: > Currently, when evaluating a number, emacs will print the decimal, > octal, hexadecimal, and charachter of said number. > > 42 C-x C-e ==> 42 (#o52, #x2a, ?*) > > It would be useful, if the output would also include the binary > representation of the number. Or at least somehow enable such > behaviour. I.e., > > 42 C-x C-e ==> 42 (#b101010, #o52, #x2a, ?*) I often need to examine binary; currently, I shell out to an Ada executable that does it for me. But I'm already annoyed at how many representations are shown, so I'd rather just make it available; I can always do M-: (show-binary 42) or something similar. gdb uses the format letter "t" for binary; ideally, I'd like to see that in elisp format; then I could do: (format "%t" 42) ==> #b101010 That covers all the possible combinations of input and output format. But I suspect that means adding it to the underlying standard C library, which isn't going to happen. -- -- Stephe