From unknown Thu Aug 14 21:22:03 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#6891 <6891@debbugs.gnu.org> To: bug#6891 <6891@debbugs.gnu.org> Subject: Status: `string-to-number' doesn't recognize `#'' read syntax Reply-To: bug#6891 <6891@debbugs.gnu.org> Date: Fri, 15 Aug 2025 04:22:03 +0000 retitle 6891 `string-to-number' doesn't recognize `#'' read syntax reassign 6891 emacs submitter 6891 MON KEY severity 6891 wishlist tag 6891 wontfix thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 20 20:00:02 2010 Received: (at submit) by debbugs.gnu.org; 21 Aug 2010 00:00:02 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OmbVC-000083-EX for submit@debbugs.gnu.org; Fri, 20 Aug 2010 20:00:02 -0400 Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OmbVA-00007g-Pp for submit@debbugs.gnu.org; Fri, 20 Aug 2010 20:00:01 -0400 Received: from lists.gnu.org ([199.232.76.165]:34470) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OmbWJ-0005Zr-Jw for submit@debbugs.gnu.org; Fri, 20 Aug 2010 20:01:11 -0400 Received: from [140.186.70.92] (port=40428 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OmbWI-0001KB-1f for bug-gnu-emacs@gnu.org; Fri, 20 Aug 2010 20:01:11 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OmbWG-0003i3-OU for bug-gnu-emacs@gnu.org; Fri, 20 Aug 2010 20:01:09 -0400 Received: from mail-ww0-f49.google.com ([74.125.82.49]:48045) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OmbWG-0003hu-J6 for bug-gnu-emacs@gnu.org; Fri, 20 Aug 2010 20:01:08 -0400 Received: by wwb31 with SMTP id 31so431684wwb.30 for ; Fri, 20 Aug 2010 17:01:06 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.11.131 with SMTP id 3mr5345wex.92.1282348866787; Fri, 20 Aug 2010 17:01:06 -0700 (PDT) Received: by 10.216.65.140 with HTTP; Fri, 20 Aug 2010 17:01:06 -0700 (PDT) Date: Fri, 20 Aug 2010 20:01:06 -0400 X-Google-Sender-Auth: 9jxQVYPNXed6N3aeGPIFrKotgQ4 Message-ID: Subject: `string-to-number' doesn't recognize `#'' read syntax From: MON KEY To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset=UTF-8 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -3.8 (---) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.1 (-----) `string-to-number' takes an optional arg BASE but doesn't recognize lisp `#' read syntax for binary, octal, hex, and radix, e.g. `#o', `#b', `#x', and `#r'. It should, these _are_ the respective read syntax for BASE. For good measure it should also recognize the string output from `format's `#' flag for octal and hex e.g `0x' for hex and `0' for octal. The proposed behaviour should not pose a lisp dialect compatiblility problem as Emacs lisp does not attempt to follow the Common Lisp spec, does not maintain a duplicate for CL's `parse-integer' procedure and does not take a bounding START END arg, but _does_ parse floats so it shouldn't be restricted by that specs constraints w/re the `#' radix read syntax e.g: ,---- | `parse-integer' does not recognize the syntactic radix-specifier | prefixes `#O', `#B', `#X', and `#nR', nor does it recognize a trailing | decimal point. `---- Besides, `string-to-number' already has a BASE argument, the C code already strips whitespace, discards "junk", and exhibits a willingness to interpolate sign in sometimes odd ways, so a little more DWIM can't hurt. Current `string-to-number' DWIMness: string-to-number " -3777777777" 8) ;=> 536870911 (string-to-number " -3777777777.007" 8) ;=> 536870911 (string-to-number " -3777777777mmm#" 8) ;=> 536870911 (string-to-number "+ -3777777777mmm#" 8) ;=> 0 Following illustrates the additioanl DWIMing desired: #o (string-to-number "#o3777777777" 8) ;=> 536870911 #b (string-to-number "#b11111111111111111111111111111" 2) ;=> 536870911 #x (string-to-number "#x1fffffff" 16) ;=> 536870911 #r (string-to-number "#12r12B969227" 12) ;=> 536870911 0x (string-to-number "0x1fffffff" 16) ;=> 536870911 0 (string-to-number "03777777777" 8) ;=> 536870911 -- /s_P\ From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 22 17:19:55 2010 Received: (at control) by debbugs.gnu.org; 22 Aug 2010 21:19:55 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OnHxK-0005sP-Qq for submit@debbugs.gnu.org; Sun, 22 Aug 2010 17:19:55 -0400 Received: from pantheon-po18.its.yale.edu ([130.132.50.74]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OnHxJ-0005sK-46 for control@debbugs.gnu.org; Sun, 22 Aug 2010 17:19:53 -0400 Received: from furry (173-9-75-145-NewEngland.hfc.comcastbusiness.net [173.9.75.145]) (authenticated bits=0) by pantheon-po18.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id o7MLL8mo026858 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Sun, 22 Aug 2010 17:21:09 -0400 Received: by furry (Postfix, from userid 1000) id D31CBC057; Sun, 22 Aug 2010 17:21:08 -0400 (EDT) From: Chong Yidong To: control@debbugs.gnu.org Subject: severity 6891 wishlist Date: Sun, 22 Aug 2010 17:21:08 -0400 Message-ID: <87y6by7397.fsf@stupidchicken.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) severity 6891 wishlist thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 04 10:35:12 2016 Received: (at control) by debbugs.gnu.org; 4 Mar 2016 15:35:12 +0000 Received: from localhost ([127.0.0.1]:33814 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1abrl2-0000Mo-0T for submit@debbugs.gnu.org; Fri, 04 Mar 2016 10:35:12 -0500 Received: from hermes.netfonds.no ([80.91.224.195]:47471) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1abrkz-0000LZ-Ot for control@debbugs.gnu.org; Fri, 04 Mar 2016 10:35:10 -0500 Received: from 2.150.35.31.tmi.telenormobil.no ([2.150.35.31] helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1abrjt-0004T3-29 for control@debbugs.gnu.org; Fri, 04 Mar 2016 16:34:01 +0100 From: Lars Ingebrigtsen To: control@debbugs.gnu.org Subject: control message for bug #6891 Message-ID: <87k2liia0g.fsf@totally-fudged-out-message-id> Date: Fri, 04 Mar 2016 15:34:00 +0000 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-MailScanner-ID: 1abrjt-0004T3-29 X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1457710444.96113@+1wpzolbrh0pC29qgasfkw X-Spam-Status: No X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) tags 6891 wontfix From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 26 07:37:51 2019 Received: (at 6891) by debbugs.gnu.org; 26 Jun 2019 11:37:51 +0000 Received: from localhost ([127.0.0.1]:34396 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hg6FL-00020w-Eq for submit@debbugs.gnu.org; Wed, 26 Jun 2019 07:37:51 -0400 Received: from mail-wm1-f54.google.com ([209.85.128.54]:53869) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hg6FJ-00020j-Jy for 6891@debbugs.gnu.org; Wed, 26 Jun 2019 07:37:49 -0400 Received: by mail-wm1-f54.google.com with SMTP id x15so1738661wmj.3 for <6891@debbugs.gnu.org>; Wed, 26 Jun 2019 04:37:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=1kq1klJjBhXUL4rWiKm0p0jvP6WkcRVbwquEY2L8jd8=; b=pxe3j4nT9li2PLk1Pk3/2zIXkUlu3ziZiNs8ZcGkM+r2L9XMNRGxWR/gQEY1hTNZ8E JTfcQKP277kZTKU7rgr3/LJghvfNtSGtsnWYh6P4/ONiMvSaiGgSqm+XbDOAooYXDNf0 H6aYLGOYlz5prBn5fyHI/rEVfTxorP1NKQuUSGjhoBGtEMRy+DFXHFg3EQgHiaMr01cL DzsIEPBzrYBEI/mVAwNMJnvTpu//JKvVs4h2w/In2497Po8zoZG5BvNv0sKuVurqMdDF TwOW7o/C9pG9MKkRR/bMa/l0AOiwqZmCj1++pag1X1SzgifeUMmSyg8UVjXMr7o9D1rt ynHA== X-Gm-Message-State: APjAAAWrO/+hWPGU0tT/qXsHngXx6YYSbpdRpi1XnxpKbXstJ5s3MHlI 7viq7I10UkKcqZjJETykLFeon2fZy5VdDLoi1lI56dHr X-Google-Smtp-Source: APXvYqxhahYwIqA7FrGBcYjg0YDdQkIVSdyAa3dnn92gNFw3I6WjyHH6otB7iriRstThuU0aXKlcSfFgyLcg1KHO6jM= X-Received: by 2002:a1c:cb0c:: with SMTP id b12mr2492175wmg.93.1561549063574; Wed, 26 Jun 2019 04:37:43 -0700 (PDT) MIME-Version: 1.0 From: Stefan Kangas Date: Wed, 26 Jun 2019 13:37:32 +0200 Message-ID: Subject: Re: bug#6891: `string-to-number' doesn't recognize `#'' read syntax To: 6891@debbugs.gnu.org, Lars Ingebrigtsen Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 6891 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) This bug was tagged as wontfix three years ago. Is it desirable to close it too? Thanks, Stefan Kangas From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 26 07:44:50 2019 Received: (at 6891) by debbugs.gnu.org; 26 Jun 2019 11:44:50 +0000 Received: from localhost ([127.0.0.1]:34404 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hg6M6-0002B3-Iz for submit@debbugs.gnu.org; Wed, 26 Jun 2019 07:44:50 -0400 Received: from quimby.gnus.org ([80.91.231.51]:39800) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hg6M3-0002At-Ay for 6891@debbugs.gnu.org; Wed, 26 Jun 2019 07:44:48 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hg6Ly-0004Of-19; Wed, 26 Jun 2019 13:44:44 +0200 From: Lars Ingebrigtsen To: Stefan Kangas Subject: Re: bug#6891: `string-to-number' doesn't recognize `#'' read syntax References: Date: Wed, 26 Jun 2019 13:44:41 +0200 In-Reply-To: (Stefan Kangas's message of "Wed, 26 Jun 2019 13:37:32 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Stefan Kangas writes: > This bug was tagged as wontfix three years ago. > > Is it desirable to close it too? I think so. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 6891 Cc: 6891@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Stefan Kangas writes: > This bug was tagged as wontfix three years ago. > > Is it desirable to close it too? I think so. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 26 11:16:01 2019 Received: (at 6891-done) by debbugs.gnu.org; 26 Jun 2019 15:16:01 +0000 Received: from localhost ([127.0.0.1]:36809 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hg9eN-000533-RQ for submit@debbugs.gnu.org; Wed, 26 Jun 2019 11:15:59 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34549) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hg9eI-0004tA-2R for 6891-done@debbugs.gnu.org; Wed, 26 Jun 2019 11:15:53 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:53960) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hg9eC-0004Zp-6b; Wed, 26 Jun 2019 11:15:44 -0400 Received: from [176.228.60.248] (port=2611 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hg9eB-0000OV-I7; Wed, 26 Jun 2019 11:15:44 -0400 Date: Wed, 26 Jun 2019 18:15:27 +0300 Message-Id: <83zhm4js34.fsf@gnu.org> From: Eli Zaretskii To: Lars Ingebrigtsen In-reply-to: (message from Lars Ingebrigtsen on Wed, 26 Jun 2019 13:44:41 +0200) Subject: Re: bug#6891: `string-to-number' doesn't recognize `#'' read syntax References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 6891-done Cc: stefan@marxist.se, 6891-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Lars Ingebrigtsen > Date: Wed, 26 Jun 2019 13:44:41 +0200 > Cc: 6891@debbugs.gnu.org > > Stefan Kangas writes: > > > This bug was tagged as wontfix three years ago. > > > > Is it desirable to close it too? > > I think so. Agreed and done. Thanks. From unknown Thu Aug 14 21:22:03 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 25 Jul 2019 11:24:12 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator