From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.help Subject: Re: Making a function than can only be used interactively Date: Mon, 04 Jul 2022 12:55:34 +0200 Message-ID: <87pmiljgah.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6813"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.8.3; emacs 29.0.50 Cc: Stefan Monnier , help-gnu-emacs@gnu.org To: carlmarcos@tutanota.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 04 12:59:24 2022 Return-path: Envelope-to: geh-help-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 1o8JnY-0001bq-3C for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 04 Jul 2022 12:59:24 +0200 Original-Received: from localhost ([::1]:59542 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o8JnW-0006d7-Sn for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 04 Jul 2022 06:59:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:32910) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8JmU-0006an-6r for help-gnu-emacs@gnu.org; Mon, 04 Jul 2022 06:58:18 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:50876) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8JmT-0001dZ-Kd; Mon, 04 Jul 2022 06:58:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-reply-to:Date:Subject:To:From: References; bh=vL5I3HbHf7nXelHuZZu0N63yNRb+n8aVvNqpd8r3cbc=; b=Y8PSMDU+rQQvTD jrIGta/Go/94nfELE09Y0VXcZSCmY5TWQ7pJtt2G19jJMElFUR5+Y4zqClb0E2tYbGSCyFQfEeyzG Ybs4Xn+b0Lhuyu8GiApNc3PM/+7OwEfCD3BCFTt4fbjQsYDVWJ3Y+94qdp+kGNj75/n3o+LHyDimd nguH+VwnTYsYLdoy2eKGza8XccW6UvW/dNkhZkK4OC28ejTf4+KAWHdHL7oAFdWRvVJ/eEOGLd6z0 I/KaxwYVVyi3+eOlmpZHKKpAcEjcGORVS3hgdxY6tF+Kwx5J/K/RQX+s23C1TSAlF6g6hscAMTZNV wPmg+QUpXwqvTc7OFn7w==; Original-Received: from auth2-smtp.messagingengine.com ([66.111.4.228]:40841) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o8JmT-0006Yp-Cq; Mon, 04 Jul 2022 06:58:17 -0400 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailauth.nyi.internal (Postfix) with ESMTP id 0B62527C0054; Mon, 4 Jul 2022 06:58:17 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Mon, 04 Jul 2022 06:58:17 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudehledgfeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfhgfhffvvefuffgjkfggtgfgsehtqhertddtreejnecuhfhrohhmpefvrghs shhilhhoucfjohhrnhcuoehtshguhhesghhnuhdrohhrgheqnecuggftrfgrthhtvghrnh epgfettdduiedvhfffhfefhfevhfeuvdehjeejfeelffehkeffuedthffgjeeihfegnecu vehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhrnh domhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqkeeijeefkeejkeegqdeifeeh vdelkedqthhsughhpeepghhnuhdrohhrghesfhgrshhtmhgrihhlrdhfmh X-ME-Proxy: Feedback-ID: ib2b94485:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 4 Jul 2022 06:58:16 -0400 (EDT) In-reply-to: X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:138287 Archived-At: carlmarcos--- via Users list for the GNU Emacs text editor writes: >>> Yet when I do `(arktika-workbench)` in my init file, the interactive >>> function `arktika-workbench` still gets executed. >> >> Why wouldn't it? As I said the `interactive-only` declaration only >> causes the byte-compiler (and hence flymake) to warn about >> non-interactive uses of the function. >> > Have also done a simpler function=20 > > (defun test () > =C2=A0 "TODO" > =C2=A0 (declare (interactive-only arktika-automated-workbench)) > =C2=A0 (interactive) > =C2=A0 (message "*** test") ) > > (test) > > Loading emacs I can see that the string "*** test" is being printed.=C2=A0 > I am using Emacs 27.2. Sure, the function will be executed. As Stefan said, the only effect of the declare spec is that byte-compiling the file will cause a warning that `test' is only meant for interactive use. Bye, Tassilo