From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#42222: 26.3; `called-interactively-p' doc is incorrect and misleading Date: Sun, 5 Jul 2020 16:33:33 -0700 (PDT) Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34566"; mail-complaints-to="usenet@ciao.gmane.io" To: 42222@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 06 01:34:09 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 1jsE9B-0008sn-KU for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 06 Jul 2020 01:34:09 +0200 Original-Received: from localhost ([::1]:40646 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jsE9A-0008Au-Mq for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 05 Jul 2020 19:34:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50298) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jsE94-0008Af-6M for bug-gnu-emacs@gnu.org; Sun, 05 Jul 2020 19:34:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49792) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jsE93-0001MW-TU for bug-gnu-emacs@gnu.org; Sun, 05 Jul 2020 19:34:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jsE93-0000Yi-RC for bug-gnu-emacs@gnu.org; Sun, 05 Jul 2020 19:34:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Jul 2020 23:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 42222 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15939920262123 (code B ref -1); Sun, 05 Jul 2020 23:34:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 5 Jul 2020 23:33:46 +0000 Original-Received: from localhost ([127.0.0.1]:33105 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jsE8n-0000YB-L2 for submit@debbugs.gnu.org; Sun, 05 Jul 2020 19:33:45 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:39250) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jsE8k-0000Y2-3t for submit@debbugs.gnu.org; Sun, 05 Jul 2020 19:33:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50208) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jsE8j-00086S-Rl for bug-gnu-emacs@gnu.org; Sun, 05 Jul 2020 19:33:41 -0400 Original-Received: from aserp2120.oracle.com ([141.146.126.78]:50766) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jsE8h-0001Jg-N6 for bug-gnu-emacs@gnu.org; Sun, 05 Jul 2020 19:33:41 -0400 Original-Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 065NXZBC188625 for ; Sun, 5 Jul 2020 23:33:35 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : subject : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=TTufBjk/JpRNVEgpnuUhSRnJ2P2N+Do2f3frTCi7AkI=; b=rj8ZiBP2ED/ZbcXhtvYcta9ioBpWt9FQmUnupZYKMl7QlzR4bhJoqAA3ssYF970NLf7y tZp1x4OtORwQek68grRF0Q/fD6shTl85SH8fdCmY825J3WAwPS2tNtIAxuo5CctVYwOu JjqEvoShJm7KjzT3JhR8ytVoB6sbRmfMW4luSjyN8Dl129ilDAfTJKXL852JyZTEhzER T6pGHywNWgNtKmZixlof5JdqR4uM4smCvCQS36bIo1RZtMJNRaTLmFw4VI8FCSW49zzp 60MFBJJfspN6OFo1/NylHpq/4PSyhq+0uPceA+yjPiiwfXDcOsGZbn9hOYv6LZyNf0fw YQ== Original-Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2120.oracle.com with ESMTP id 322kv63dpn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Sun, 05 Jul 2020 23:33:35 +0000 Original-Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 065NS5Gv194287 for ; Sun, 5 Jul 2020 23:33:35 GMT Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3030.oracle.com with ESMTP id 3233pudkkv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Sun, 05 Jul 2020 23:33:35 +0000 Original-Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 065NXY05021156 for ; Sun, 5 Jul 2020 23:33:34 GMT X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5017.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9673 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 adultscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 bulkscore=0 phishscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2007050182 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9673 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 lowpriorityscore=0 bulkscore=0 malwarescore=0 suspectscore=1 mlxlogscore=999 phishscore=0 spamscore=0 priorityscore=1501 clxscore=1015 impostorscore=0 mlxscore=0 adultscore=0 cotscore=-2147483648 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2007050183 Received-SPF: pass client-ip=141.146.126.78; envelope-from=drew.adams@oracle.com; helo=aserp2120.oracle.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/05 19:33:36 X-ACL-Warn: Detected OS = Linux 3.1-3.10 [fuzzy] X-Spam_score_int: -63 X-Spam_score: -6.4 X-Spam_bar: ------ X-Spam_report: (-6.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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:182756 Archived-At: 1. Wrong signature: called-interactively-p is a compiled Lisp function in 'subr.el'. (called-interactively-p KIND) It should be (called-interactively-p &optional KIND). 2. Nothing is said about the case where KIND is absent or nil. Nothing is said about the behavior where KIND is anything other than `interactive' or `any'. It seems that it returns nil for anything other than those two symbols, regardless of whether the calling function was called interactively. How misleading is that? No error - nil (as "false") presumably means called non-interatively, but in fact it means nothing in this=20 case. Result: bugged code, with no help from Emacs about the bug. 3. The same problems exist for the Elisp manual, node `Distinguish Interactive'. 4. On the other hand, if the intention really is to _require_ KIND, so that what the Elisp manual says is true: "KIND should be either the symbol 'interactive' or the symbol 'any'", then the function should raise an error when KIND is missing (and the "should" should then be changed to "must"). 5. This bug seems to still be present in Emacs 28 (recent snapshot). There, there's the additional bug that this appears right after the first doc-string line, for `C-h f': Probably introduced at or before Emacs version 22.1. Such meta-information should not be placed up front like that. It's not in any sense the most important info. If it's shown at all, it should be placed at the end, after a horizontal separator. It's essentially a footnote. Yes, This (#5) is a separate, unrelated bug. I don't feel like filing it separately. But it should be fixed. In GNU Emacs 26.3 (build 1, x86_64-w64-mingw32) of 2019-08-29 Repository revision: 96dd0196c28bc36779584e47fffcca433c9309cd Windowing system distributor `Microsoft Corp.', version 10.0.18362 Configured using: `configure --without-dbus --host=3Dx86_64-w64-mingw32 --without-compress-install 'CFLAGS=3D-O2 -static -g3''