From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#39557: 27.0.60; Elisp manual, doc about bignums Date: Mon, 17 Feb 2020 15:19:54 -0800 (PST) Message-ID: <216cb392-3b01-466d-8fa2-eabcba3283cd@default> References: <8c6ed478-db97-8abc-de79-f5c10498ad0c@cs.ucla.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="25781"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Noam Postavsky , 39557@debbugs.gnu.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 18 00:21:13 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j3phP-0006Yg-0t for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 18 Feb 2020 00:21:11 +0100 Original-Received: from localhost ([::1]:54336 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j3phO-0000eS-3f for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 17 Feb 2020 18:21:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58408) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j3phH-0000ZW-1l for bug-gnu-emacs@gnu.org; Mon, 17 Feb 2020 18:21:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j3phF-0004ve-Sw for bug-gnu-emacs@gnu.org; Mon, 17 Feb 2020 18:21:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33380) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j3phF-0004vY-Ps for bug-gnu-emacs@gnu.org; Mon, 17 Feb 2020 18:21:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j3phF-00082y-Lf for bug-gnu-emacs@gnu.org; Mon, 17 Feb 2020 18:21:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 17 Feb 2020 23:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39557 X-GNU-PR-Package: emacs Original-Received: via spool by 39557-submit@debbugs.gnu.org id=B39557.158198162130862 (code B ref 39557); Mon, 17 Feb 2020 23:21:01 +0000 Original-Received: (at 39557) by debbugs.gnu.org; 17 Feb 2020 23:20:21 +0000 Original-Received: from localhost ([127.0.0.1]:39353 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j3pgb-00081i-BZ for submit@debbugs.gnu.org; Mon, 17 Feb 2020 18:20:21 -0500 Original-Received: from userp2130.oracle.com ([156.151.31.86]:53084) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j3pgY-00081U-P5 for 39557@debbugs.gnu.org; Mon, 17 Feb 2020 18:20:20 -0500 Original-Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 01HNIueT142586; Mon, 17 Feb 2020 23:20:03 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=5kixXwP+EfmLr+/3nh/K5EfT78UafLhI9z+6dTSIR48=; b=qWubXMe6qJsICL48NAmj5EFdKR2yHCIz0cwGg0C3Ock6QNaRGlXauetbVUo+AsihACRH n4aaBcM8Jn97P3o67KCjnxmh+L+63YGKHsFR2WTAeUWOWAfQVWcMbrWp3EXpx1jaJq1M Vm4Y5OYX6oOoT4MSUiqnanbAlOWKnHhQ0MltVg6dUsNocduMRIU6HvNj/Fp4WghfhLmv 3BLHnw1Av0N8UFEFwPn1a/3pFD6LK2O3z7A94Jm75yuza8EnBcY1lDxJ5aPiikja9OTB WXNExNGkejddiWszZJy5bcYDnbTQE/DXjJF7fv7bxBMv9BeIOT1wdmXOx/3Xt+S56ZSp WA== Original-Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by userp2130.oracle.com with ESMTP id 2y7aq5ng37-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 17 Feb 2020 23:20:02 +0000 Original-Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 01HNJOQ6098510; Mon, 17 Feb 2020 23:20:02 GMT Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserp3020.oracle.com with ESMTP id 2y6temdqg5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 17 Feb 2020 23:20:02 +0000 Original-Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 01HNJt0O028894; Mon, 17 Feb 2020 23:19:55 GMT In-Reply-To: <8c6ed478-db97-8abc-de79-f5c10498ad0c@cs.ucla.edu> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4954.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9534 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 phishscore=0 bulkscore=0 suspectscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2002170191 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9534 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 impostorscore=0 adultscore=0 spamscore=0 priorityscore=1501 suspectscore=0 clxscore=1015 bulkscore=0 phishscore=0 mlxlogscore=999 lowpriorityscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2002170191 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:176167 Archived-At: Thanks for working on this. > > That's really the _last_ thing we should tell users, not the first. >=20 > I installed the first attached patch to move the distinction between fixn= ums > and > bignums to the end of the section. Thanks. > > Shouldn't it tell you that you get a fixnum whenever the value > > is within the fixnum range (if that's in fact the case)? >=20 > It already said that, but apparently not clearly enough. I installed the > second > attached patch to try to make things clearer. Thanks. > > this doc should probably also mention that the numerical value of > > a marker is an integer ^^^^^^^ > It already says "Many of the functions described in this chapter accept > markers for arguments in place of numbers.... When the argument value > is a marker, its position value is used and its buffer is ignored." Not really the same thing. Nothing there says that a marker position is an integer (fixnum or bignum), and not some other kind of number. Sure, many readers will know (but not from here) that buffer positions are integers. And they can guess that marker positions are buffer positions, hence integers... But it's not hard to tell them that the numerical value of a marker is an integer. (This isn't a big deal. I said "should probably also mention". I could have said "maybe". Just a suggestion.) > > if you compare an integer > > against an integer numeral then you had better use > > `eql', unless you know that both are fixnums >=20 > No, it suffices if *either* is a fixnum. For example, (eq 0 FOO) tests > whether > FOO is the integer zero, and works regardless of whether FOO is a bignum. I see. Then please say that. As for the proposed changes - If we're going to talk about "older" code then we should specify older than what. I don't think there should be any need to talk about older code or say "should now". The general rule's simple: use `eql' - worked before, works now. If some code uses `eq', it couldn't possibly have worked before with two integers big enough to now be bignums, right? Any code - old or new - that uses `eq' to compare integers needs to know that at least one of the operands is a fixnum. We should just say that you can use `eql' to compare any integers, and add that you can't use `eq' to compare integers if they're both bignums. How complicated is that? Emphasize `=3D' and `eql'. `eq' should just be a footnote. That's my suggestion.