From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#39557: 27.0.60; Elisp manual, doc about bignums Date: Mon, 17 Feb 2020 15:52:56 -0800 Organization: UCLA Computer Science Department Message-ID: <8deb3c37-79a4-b10f-87ed-6265dedb07d7@cs.ucla.edu> References: <8c6ed478-db97-8abc-de79-f5c10498ad0c@cs.ucla.edu> <216cb392-3b01-466d-8fa2-eabcba3283cd@default> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="56315"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 Cc: Noam Postavsky , 39557@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 18 00:54:11 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 1j3qDK-000EXQ-LI for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 18 Feb 2020 00:54:10 +0100 Original-Received: from localhost ([::1]:54694 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j3qDJ-0002Ic-Ni for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 17 Feb 2020 18:54:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34142) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j3qDC-0002IU-PB for bug-gnu-emacs@gnu.org; Mon, 17 Feb 2020 18:54:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j3qDB-00074J-Ny for bug-gnu-emacs@gnu.org; Mon, 17 Feb 2020 18:54:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33389) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j3qDB-00074E-L2 for bug-gnu-emacs@gnu.org; Mon, 17 Feb 2020 18:54:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j3qDB-0000LW-Kk for bug-gnu-emacs@gnu.org; Mon, 17 Feb 2020 18:54:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 17 Feb 2020 23:54: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.15819835901272 (code B ref 39557); Mon, 17 Feb 2020 23:54:01 +0000 Original-Received: (at 39557) by debbugs.gnu.org; 17 Feb 2020 23:53:10 +0000 Original-Received: from localhost ([127.0.0.1]:39362 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j3qCM-0000KR-3B for submit@debbugs.gnu.org; Mon, 17 Feb 2020 18:53:10 -0500 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:33114) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j3qCI-0000K8-V6 for 39557@debbugs.gnu.org; Mon, 17 Feb 2020 18:53:07 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 3BC26160091; Mon, 17 Feb 2020 15:53:01 -0800 (PST) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 2yOgorlhwsbI; Mon, 17 Feb 2020 15:53:00 -0800 (PST) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 6E9DB160093; Mon, 17 Feb 2020 15:53:00 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id NvF6sG9s6GpZ; Mon, 17 Feb 2020 15:53:00 -0800 (PST) Original-Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 41E5A160091; Mon, 17 Feb 2020 15:53:00 -0800 (PST) In-Reply-To: <216cb392-3b01-466d-8fa2-eabcba3283cd@default> Content-Language: en-US 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:176168 Archived-At: On 2/17/20 3:19 PM, Drew Adams wrote: >>> 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. That's clear from context. This section is titled "Integer Basics" and it's all about integers. Personally I'd even trim some text from the above quote, as it's not basic to integers. I would rather not make that text longer or trickier. >>> if you compare an integer >>> against an integer numeral then you had better use >>> `eql', unless you know that both are fixnums >> >> 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. I'd rather not. Again, this section is "Integer Basics" and the reference manual should not bog itself down various possible ways to use integers in programs (there are too many ways). > If we're going to talk about "older" code then > we should specify older than what. I originally wrote "older than Emacs 27" but trimmed it as being nonessential before installing the patch. It's not a big deal either way. > I don't > think there should be any need to talk about > older code or say "should now". This bug report assumed that Emacs is basically like Common Lisp in this area. However, Emacs is not there yet (though we've made progress), and it's better if the documentation reflects that fact rather than pretending there's no difference from Common Lisp. > Any code - > old or new - that uses `eq' to compare > integers needs to know that at least one of > the operands is a fixnum. It's sometimes OK to use eq even when both arguments are bignums. It depends on the circumstances.