From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#32064: 26; doc string of `eval-last-sexp' Date: Thu, 5 Jul 2018 14:56:48 -0700 (PDT) Message-ID: References: <0d7bb132-057e-431e-a5fa-86e15b99879a@default> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1530827706 7796 195.159.176.226 (5 Jul 2018 21:55:06 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 5 Jul 2018 21:55:06 +0000 (UTC) To: 32064@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jul 05 23:55:02 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fbCDN-0001sh-Dp for geb-bug-gnu-emacs@m.gmane.org; Thu, 05 Jul 2018 23:55:01 +0200 Original-Received: from localhost ([::1]:54951 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fbCFU-00031i-KD for geb-bug-gnu-emacs@m.gmane.org; Thu, 05 Jul 2018 17:57:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37049) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fbCFN-00031b-Kk for bug-gnu-emacs@gnu.org; Thu, 05 Jul 2018 17:57:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fbCFK-0005RL-I3 for bug-gnu-emacs@gnu.org; Thu, 05 Jul 2018 17:57:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:40148) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fbCFK-0005RB-ER for bug-gnu-emacs@gnu.org; Thu, 05 Jul 2018 17:57:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fbCFK-0000sy-4u for bug-gnu-emacs@gnu.org; Thu, 05 Jul 2018 17:57:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 05 Jul 2018 21:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32064 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 32064-submit@debbugs.gnu.org id=B32064.15308278213397 (code B ref 32064); Thu, 05 Jul 2018 21:57:02 +0000 Original-Received: (at 32064) by debbugs.gnu.org; 5 Jul 2018 21:57:01 +0000 Original-Received: from localhost ([127.0.0.1]:48045 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fbCFJ-0000sj-2l for submit@debbugs.gnu.org; Thu, 05 Jul 2018 17:57:01 -0400 Original-Received: from userp2120.oracle.com ([156.151.31.85]:46872) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fbCFF-0000sU-E1 for 32064@debbugs.gnu.org; Thu, 05 Jul 2018 17:56:58 -0400 Original-Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w65LrnJW152526 for <32064@debbugs.gnu.org>; Thu, 5 Jul 2018 21:56:51 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2017-10-26; bh=2uM1RbOU5CbX6mG2R60Vdx85za/MhvGKyjIIipgahXY=; b=AiEvKZgx2tjCBYFRNHEi0Vq/dqewdV5VOMziNEF45NGNW2yicVXFBmuJ0aeP6bVd8T0E +gO8MSy9gUrwxF96DmPue7za0ZyYWwPyzGdgzTgDWG45bmQrUp1yXDajcTACisHdCmWI 7bfQ/lAANg2Ndh5BYYpZ7Z5ivWFjPAkM9AONlyR+UyffSVGurb6ddDZq1iIPzWXFn9Jo wXFuPvo5rxm8vs5Lr8F2cv1M6+ATozN8tQSuXqYgxeu7z0ThcoMXxB4kMopGuohuGqg9 jnALKUEoKbZT69ayA4zjvceNJQPBvxr0OEFAC0CLbkf04tA3Ap9NJf6QMSyXGrZCnjVF 0A== Original-Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2120.oracle.com with ESMTP id 2k0dnjqh2j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <32064@debbugs.gnu.org>; Thu, 05 Jul 2018 21:56:51 +0000 Original-Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w65Luo6m015166 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <32064@debbugs.gnu.org>; Thu, 5 Jul 2018 21:56:50 GMT Original-Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w65Lunj2001855 for <32064@debbugs.gnu.org>; Thu, 5 Jul 2018 21:56:50 GMT In-Reply-To: <0d7bb132-057e-431e-a5fa-86e15b99879a@default> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4705.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8945 signatures=668704 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=13 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1807050241 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: 208.118.235.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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:148232 Archived-At: Looking at `eval-expression-get-print-arguments' and the doc string for `ev= al-expression', things are a bit clearer. At least please incorporate some= thing like what is said for `eval-expression' in the doc of `eval-last-sexp= '.=20 But even the `eval-expression' doc is not very good for the description of = CHAR-PRINT-LIMIT. It's not true that "unless given a positive prefix argum= ent" a number value is printed in several... Try a prefix arg of -9, for in= stance. The doc of `eval-expression-get-print-arguments' says that it determines th= e prefix-arg behavior for `eval-last-sexp'. Is that true? The doc of `eval-expression-get-print-arguments' needs to specify the logic= of what it does, and that info needs to be included in the doc of `eval-ex= pression' and (if appropriate) the doc of `eval-last-sexp'. Or at least th= eir doc needs to point to such info. The doc string for `eval-expression-print-format' is not great either. It = says only what the result will "typically" look like. It needs to specify = what formats it outputs, under what conditions. It seems that this is the situation for `eval-expression-get-print-argument= s': No prefix arg : no insert, truncate, 127 - : no insert, truncate, 127 0 : insert, no truncate, 127 -1 : insert, truncate, biggest fixnum else : insert, truncate, nil Is that right? If so, the doc should spell that out. There's no way a user will guess this or get it easily from the current doc. And the various doc strings seem to suggest that the handling of the last a= rg, CHAR-PRINT-LIMIT by `eval-exprresion' is different from its handling by= `eval-last-sexp'. But is that true? This is all a confusing mess, I'm afraid. And the code (e.g. of `eval-last= -sexp' and its helper `elisp--eval-last-sexp') is not very clear either.