From unknown Mon Jun 16 23:51:18 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#42222 <42222@debbugs.gnu.org> To: bug#42222 <42222@debbugs.gnu.org> Subject: Status: 26.3; `called-interactively-p' doc is incorrect and misleading Reply-To: bug#42222 <42222@debbugs.gnu.org> Date: Tue, 17 Jun 2025 06:51:18 +0000 retitle 42222 26.3; `called-interactively-p' doc is incorrect and misleading reassign 42222 emacs submitter 42222 Drew Adams severity 42222 normal tag 42222 notabug thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 05 19:33:45 2020 Received: (at submit) by debbugs.gnu.org; 5 Jul 2020 23:33:46 +0000 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 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 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 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 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== 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 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 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 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 MIME-Version: 1.0 Message-ID: Date: Sun, 5 Jul 2020 16:33:33 -0700 (PDT) From: Drew Adams To: bug-gnu-emacs@gnu.org Subject: 26.3; `called-interactively-p' doc is incorrect and misleading X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5017.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable 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-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit 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: -2.3 (--) 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'' From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 11 06:02:10 2020 Received: (at 42222) by debbugs.gnu.org; 11 Jul 2020 10:02:10 +0000 Received: from localhost ([127.0.0.1]:43855 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1juCKf-0000z8-Og for submit@debbugs.gnu.org; Sat, 11 Jul 2020 06:02:10 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56600) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1juCKd-0000yq-Sa; Sat, 11 Jul 2020 06:02:08 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:53926) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1juCKY-0007Eq-DO; Sat, 11 Jul 2020 06:02:02 -0400 Received: from [176.228.60.248] (port=4755 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1juCKT-0005EF-C6; Sat, 11 Jul 2020 06:02:00 -0400 Date: Sat, 11 Jul 2020 13:01:46 +0300 Message-Id: <83tuyenzed.fsf@gnu.org> From: Eli Zaretskii To: Drew Adams In-Reply-To: (message from Drew Adams on Sun, 5 Jul 2020 16:33:33 -0700 (PDT)) Subject: Re: bug#42222: 26.3; `called-interactively-p' doc is incorrect and misleading References: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 42222 Cc: 42222@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 (---) tags 42222 notabug thanks > Date: Sun, 5 Jul 2020 16:33:33 -0700 (PDT) > From: Drew Adams > > 1. Wrong signature: > > called-interactively-p is a compiled Lisp function in 'subr.el'. > > (called-interactively-p KIND) This is intentional, due to the 'advertised-calling-convention' form. > 2. Nothing is said about the case where KIND is absent or nil. See above. > Nothing is said about the behavior where KIND is anything other than > `interactive' or `any'. We don't have to. It means that any other value invokes undefined behavior. > 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"). Signaling an error is backward-incompatible, so it is not always TRT. > Probably introduced at or before Emacs version 22.1. > > Such meta-information should not be placed up front like that. We clearly disagree. There's no bug here. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 12 20:29:06 2020 Received: (at 42222-done) by debbugs.gnu.org; 13 Aug 2020 00:29:06 +0000 Received: from localhost ([127.0.0.1]:46013 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k617C-0004g3-CF for submit@debbugs.gnu.org; Wed, 12 Aug 2020 20:29:06 -0400 Received: from mail-yb1-f177.google.com ([209.85.219.177]:44962) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k6177-0004eX-0D for 42222-done@debbugs.gnu.org; Wed, 12 Aug 2020 20:29:02 -0400 Received: by mail-yb1-f177.google.com with SMTP id i10so2336342ybt.11 for <42222-done@debbugs.gnu.org>; Wed, 12 Aug 2020 17:29:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:user-agent :mime-version:date:message-id:subject:to:cc; bh=UIEwp6k6CZdKzdLO4/JB4kk9X9MNx/u4rby2x9qnKTU=; b=Y4AJilW9mG/NEjh9+MxpoYM1zQSUHx6ab9//PM6fFif+Dsk5/54+YXFyDPmoTr1JdZ X9ZmM5qxtNmeO93GzToF7xIhpBstnkkTtRIaaQItLDK5C4eZ1hP1c0ibReVo2nn3CKMV 4PA3DXunimF+JNyzFqsD8AqyaLRorifUzd5dg5uzNykQE/InqY1wu6JKkby7M2uvo2v/ UMnF947JwqiQQaUGc59dlXt/2z1WiwCD0v2Mp/L+e++5fnMMJ0IMGl2uQRUXbvyOrUiL d07K+fGm4N/66rg7eJFc5AN96nleTEjppycCcONWkpg2EBpuDrpgVnK/Qh+AczAW8OTQ 4Mlg== X-Gm-Message-State: AOAM531NaCzH3NFia8e5w+Y1pX+tdoN1xFUIaUqS8BvkX5VToxf3F7wr fKBXbFdE9DsmEnDfz4IxROBn7ixEUZNkO6y07BIrgn78TJE= X-Google-Smtp-Source: ABdhPJxHBn1jdiGDmbmA6V5uGSpUJLxjFNX4S00Nylzar0JWQ35wirVjc8axn5lHCSpD+S/r+Mr/xb7L5EcyqmlYFBs= X-Received: by 2002:a25:b88b:: with SMTP id w11mr3082109ybj.129.1597278534183; Wed, 12 Aug 2020 17:28:54 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 12 Aug 2020 17:28:53 -0700 From: Stefan Kangas In-Reply-To: <83tuyenzed.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 11 Jul 2020 13:01:46 +0300") References: <83tuyenzed.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Date: Wed, 12 Aug 2020 17:28:53 -0700 Message-ID: Subject: Re: bug#42222: 26.3; `called-interactively-p' doc is incorrect and misleading To: Eli Zaretskii Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 42222-done Cc: 42222-done@debbugs.gnu.org, Drew Adams 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 (-) Eli Zaretskii writes: > There's no bug here. I'm therefore closing this bug report. From unknown Mon Jun 16 23:51:18 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, 10 Sep 2020 11:24:07 +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